[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24692] trunk/blender/release/scripts: pep8 compliance, also removed use of exec() for netrender module importing
Campbell Barton
ideasman42 at gmail.com
Fri Nov 20 00:59:37 CET 2009
Revision: 24692
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24692
Author: campbellbarton
Date: 2009-11-20 00:59:37 +0100 (Fri, 20 Nov 2009)
Log Message:
-----------
pep8 compliance, also removed use of exec() for netrender module importing
Modified Paths:
--------------
trunk/blender/release/scripts/io/netrender/client.py
trunk/blender/release/scripts/ui/properties_data_curve.py
trunk/blender/release/scripts/ui/properties_physics_smoke.py
trunk/blender/release/scripts/ui/space_console.py
Modified: trunk/blender/release/scripts/io/netrender/client.py
===================================================================
--- trunk/blender/release/scripts/io/netrender/client.py 2009-11-19 23:39:19 UTC (rev 24691)
+++ trunk/blender/release/scripts/io/netrender/client.py 2009-11-19 23:59:37 UTC (rev 24692)
@@ -257,10 +257,8 @@
conn.close()
def compatible(module):
- exec("import " + module)
- module = eval(module)
- for member in dir(module):
- subclass = getattr(module, member)
+ module = __import__(module)
+ for subclass in module.__dict__.values():
try: subclass.COMPAT_ENGINES.add('NET_RENDER')
except: pass
del module
Modified: trunk/blender/release/scripts/ui/properties_data_curve.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_curve.py 2009-11-19 23:39:19 UTC (rev 24691)
+++ trunk/blender/release/scripts/ui/properties_data_curve.py 2009-11-19 23:59:37 UTC (rev 24692)
@@ -103,7 +103,7 @@
if is_text:
col.itemL(text="Display:")
col.itemR(curve, "fast", text="Fast Editing")
-
+
if wide_ui:
col = split.column()
@@ -261,6 +261,7 @@
col = split.column()
col.itemR(act_spline, "smooth")
+
class DATA_PT_font(DataButtonsPanel):
bl_label = "Font"
@@ -350,6 +351,7 @@
class DATA_PT_textboxes(DataButtonsPanel):
bl_label = "Text Boxes"
+
def poll(self, context):
return (context.object and context.object.type == 'TEXT' and context.curve)
Modified: trunk/blender/release/scripts/ui/properties_physics_smoke.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_smoke.py 2009-11-19 23:39:19 UTC (rev 24691)
+++ trunk/blender/release/scripts/ui/properties_physics_smoke.py 2009-11-19 23:59:37 UTC (rev 24692)
@@ -82,7 +82,7 @@
col.itemR(domain, "maxres", text="Divisions")
if wide_ui:
- col = split.column()
+ col = split.column()
col.itemL(text="Behavior:")
col.itemR(domain, "alpha")
col.itemR(domain, "beta")
@@ -108,7 +108,7 @@
col = split.column()
else:
if wide_ui:
- col = split.column()
+ col = split.column()
col.itemL(text="Behavior:")
col.itemR(flow, "temperature")
col.itemR(flow, "density")
Modified: trunk/blender/release/scripts/ui/space_console.py
===================================================================
--- trunk/blender/release/scripts/ui/space_console.py 2009-11-19 23:39:19 UTC (rev 24691)
+++ trunk/blender/release/scripts/ui/space_console.py 2009-11-19 23:59:37 UTC (rev 24692)
@@ -141,7 +141,7 @@
def execute(self, context):
sc = context.space_data
- module = __import__("console_" + sc.language)
+ module = __import__("console_" + sc.language)
autocomplete = getattr(module, "autocomplete", None)
if autocomplete:
More information about the Bf-blender-cvs
mailing list