diff --git a/development_icon_get.py b/development_icon_get.py index f25377e6d46004b15b20968befe8dbb97ba2c903..858e8a1d8f47cd3a81dc12fdd30d17a7d1886c3e 100644 --- a/development_icon_get.py +++ b/development_icon_get.py @@ -43,21 +43,21 @@ import bpy def create_icon_list_all(): icons = bpy.types.UILayout.bl_rna.functions['prop'].parameters['icon'].\ enum_items.keys() - + icons.remove("NONE") - + return icons def create_icon_list(): icons = create_icon_list_all() search = bpy.context.scene.icon_props.search.lower() - + if search == "": pass else: icons = [key for key in icons if search in key.lower()] - + return icons @@ -67,7 +67,7 @@ class WM_OT_icon_info(bpy.types.Operator): bl_description = "Click to copy this icon name to the clipboard" icon = bpy.props.StringProperty() icon_scroll = bpy.props.IntProperty() - + def invoke(self, context, event): bpy.data.window_managers['WinMan'].clipboard = self.icon self.report({'INFO'}, "Icon ID: %s" % self.icon) @@ -78,11 +78,11 @@ class OBJECT_PT_icons(bpy.types.Panel): bl_space_type = "TEXT_EDITOR" bl_region_type = "UI" bl_label = "All icons" - + def __init__(self): self.amount = 10 self.icon_list = create_icon_list() - + def draw(self, context): props = context.scene.icon_props # polling for updates @@ -92,7 +92,7 @@ class OBJECT_PT_icons(bpy.types.Panel): # IconProps.scroll = bpy.props.IntProperty(default=1, min=1, # max=max(1, len(self.icon_list) - self.amount + 1), # description="Drag to scroll icons") - + box = self.layout.box() # scroll view if not props.expand: @@ -107,7 +107,7 @@ class OBJECT_PT_icons(bpy.types.Panel): row = toprow.row() row.active = props.bl_rna.scroll[1]['max'] > 1 row.prop(props, "scroll") - + # icons row = box.row(align=True) if len(self.icon_list) == 0: @@ -121,7 +121,7 @@ class OBJECT_PT_icons(bpy.types.Panel): for i in range(self.amount - len(self.icon_list) \ % self.amount): row.label("") - + # expanded view else: # expand button @@ -135,7 +135,7 @@ class OBJECT_PT_icons(bpy.types.Panel): row = toprow.row() row.active = False row.prop(props, "scroll") - + # icons col = box.column(align=True) if len(self.icon_list) == 0: @@ -154,11 +154,11 @@ class OBJECT_PT_icons(bpy.types.Panel): class CONSOLE_HT_icons(bpy.types.Header): bl_space_type = 'CONSOLE' _search_old = "" - + def __init__(self): self.amount = 10 self.icon_list = create_icon_list() - + def draw(self, context): props = context.scene.icon_props # polling for updates @@ -169,7 +169,7 @@ class CONSOLE_HT_icons(bpy.types.Header): # IconProps.scroll = bpy.props.IntProperty(default=1, min=1, # max=max(1, len(self.icon_list) - self.amount + 1), # description="Drag to scroll icons") - + # scroll view if props.console: layout = self.layout @@ -181,7 +181,7 @@ class CONSOLE_HT_icons(bpy.types.Header): row = layout.row() row.active = props.bl_rna.scroll[1]['max'] > 1 row.prop(props, "scroll") - + # icons row = layout.row(align=True) if len(self.icon_list) == 0: @@ -199,10 +199,10 @@ def menu_func(self, context): def register(): global IconProps - + icons_total = len(create_icon_list_all()) icons_per_row = 10 - + class IconProps(bpy.types.PropertyGroup): """ Fake module like class @@ -217,7 +217,7 @@ def register(): scroll = bpy.props.IntProperty(default=1, min=1, max=max(1, icons_total - icons_per_row + 1), description="Drag to scroll icons") - + bpy.utils.register_module(__name__) bpy.types.Scene.icon_props = bpy.props.PointerProperty(type=IconProps) bpy.types.CONSOLE_MT_console.append(menu_func) @@ -235,7 +235,7 @@ def unregister(): # unregistering is only done automatically when run as add-on bpy.utils.unregister_class(OBJECT_PT_icons) bpy.utils.unregister_class(CONSOLE_HT_icons) - + bpy.utils.unregister_module(__name__) diff --git a/mesh_looptools.py b/mesh_looptools.py index 76b471507d839587170a82a338c1a63e69f8907e..2a403dd3118c029fdff14bc7232d52f5924182e1 100644 --- a/mesh_looptools.py +++ b/mesh_looptools.py @@ -16,8 +16,6 @@ # # ##### END GPL LICENSE BLOCK ##### -# <pep8 compliant> - bl_info = { 'name': "LoopTools", 'author': "Bart Crouch", diff --git a/render_povray/render.py b/render_povray/render.py index f449d7b1412dde5a18e61948bf86e687b4a322a4..c64de4839239f3644d658e3b63746870346ba34b 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -1647,13 +1647,13 @@ class PovrayRender(bpy.types.RenderEngine): self._process = subprocess.Popen([pov_binary, self._temp_file_ini] + extra_args) # This would work too but means we have to wait until its done: # os.system("%s %s" % (pov_binary, self._temp_file_ini)) - + except OSError: # someone might run povray 32 bits on a 64 bits blender machine try: pov_binary = winreg.QueryValueEx(regKey, "Home")[0] + "\\bin\\pvengine" self._process = subprocess.Popen([pov_binary, self._temp_file_ini] + extra_args) - + except OSError: # TODO, report api print("POV-Ray 3.7: could not execute '%s', possibly POV-Ray isn't installed" % pov_binary) @@ -1661,29 +1661,29 @@ class PovrayRender(bpy.types.RenderEngine): traceback.print_exc() print ("***-DONE-***") return False - + else: print("POV-Ray 3.7 64 bits could not execute, running 32 bits instead") print("Command line arguments passed: " + str(extra_args)) return True - + else: print("POV-Ray 3.7 64 bits found") print("Command line arguments passed: " + str(extra_args)) return True - + #32 bits blender else: try: pov_binary = winreg.QueryValueEx(regKey, "Home")[0] + "\\bin\\pvengine" self._process = subprocess.Popen([pov_binary, self._temp_file_ini] + extra_args) - + # someone might also run povray 64 bits with a 32 bits build of blender. except OSError: try: pov_binary = winreg.QueryValueEx(regKey, "Home")[0] + "\\bin\\pvengine64" self._process = subprocess.Popen([pov_binary, self._temp_file_ini] + extra_args) - + except OSError: # TODO, report api print("POV-Ray 3.7: could not execute '%s', possibly POV-Ray isn't installed" % pov_binary) @@ -1691,17 +1691,16 @@ class PovrayRender(bpy.types.RenderEngine): traceback.print_exc() print ("***-DONE-***") return False - + else: print("Running POV-Ray 3.7 64 bits build with 32 bits Blender, \nYou might want to run Blender 64 bits as well.") print("Command line arguments passed: " + str(extra_args)) return True - + else: print("POV-Ray 3.7 32 bits found") print("Command line arguments passed: " + str(extra_args)) return True - else: # DH - added -d option to prevent render window popup which leads to segfault on linux