forked from bartvdbraak/blender
pep8 compliance, also removed use of exec() for netrender module importing
This commit is contained in:
parent
605e6850c2
commit
e52c5a338f
@ -257,10 +257,8 @@ class NetworkRenderEngine(bpy.types.RenderEngine):
|
|||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
def compatible(module):
|
def compatible(module):
|
||||||
exec("import " + module)
|
module = __import__(module)
|
||||||
module = eval(module)
|
for subclass in module.__dict__.values():
|
||||||
for member in dir(module):
|
|
||||||
subclass = getattr(module, member)
|
|
||||||
try: subclass.COMPAT_ENGINES.add('NET_RENDER')
|
try: subclass.COMPAT_ENGINES.add('NET_RENDER')
|
||||||
except: pass
|
except: pass
|
||||||
del module
|
del module
|
||||||
|
@ -261,6 +261,7 @@ class DATA_PT_active_spline(DataButtonsPanelActive):
|
|||||||
col = split.column()
|
col = split.column()
|
||||||
col.itemR(act_spline, "smooth")
|
col.itemR(act_spline, "smooth")
|
||||||
|
|
||||||
|
|
||||||
class DATA_PT_font(DataButtonsPanel):
|
class DATA_PT_font(DataButtonsPanel):
|
||||||
bl_label = "Font"
|
bl_label = "Font"
|
||||||
|
|
||||||
@ -350,6 +351,7 @@ class DATA_PT_paragraph(DataButtonsPanel):
|
|||||||
|
|
||||||
class DATA_PT_textboxes(DataButtonsPanel):
|
class DATA_PT_textboxes(DataButtonsPanel):
|
||||||
bl_label = "Text Boxes"
|
bl_label = "Text Boxes"
|
||||||
|
|
||||||
def poll(self, context):
|
def poll(self, context):
|
||||||
return (context.object and context.object.type == 'TEXT' and context.curve)
|
return (context.object and context.object.type == 'TEXT' and context.curve)
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
|
|||||||
col.itemR(domain, "maxres", text="Divisions")
|
col.itemR(domain, "maxres", text="Divisions")
|
||||||
|
|
||||||
if wide_ui:
|
if wide_ui:
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.itemL(text="Behavior:")
|
col.itemL(text="Behavior:")
|
||||||
col.itemR(domain, "alpha")
|
col.itemR(domain, "alpha")
|
||||||
col.itemR(domain, "beta")
|
col.itemR(domain, "beta")
|
||||||
@ -108,7 +108,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
|
|||||||
col = split.column()
|
col = split.column()
|
||||||
else:
|
else:
|
||||||
if wide_ui:
|
if wide_ui:
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.itemL(text="Behavior:")
|
col.itemL(text="Behavior:")
|
||||||
col.itemR(flow, "temperature")
|
col.itemR(flow, "temperature")
|
||||||
col.itemR(flow, "density")
|
col.itemR(flow, "density")
|
||||||
|
@ -141,7 +141,7 @@ class ConsoleAutocomplete(bpy.types.Operator):
|
|||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
sc = context.space_data
|
sc = context.space_data
|
||||||
module = __import__("console_" + sc.language)
|
module = __import__("console_" + sc.language)
|
||||||
autocomplete = getattr(module, "autocomplete", None)
|
autocomplete = getattr(module, "autocomplete", None)
|
||||||
|
|
||||||
if autocomplete:
|
if autocomplete:
|
||||||
|
Loading…
Reference in New Issue
Block a user