diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-20 02:59:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-20 02:59:37 +0300 |
commit | e52c5a338f5fc521eda8b7b25af3aab8452cb592 (patch) | |
tree | b312148fb16a268d32f8e6eead19f7121e3c422a | |
parent | 605e6850c2c0006ad1c1adc65f131ac3f075535d (diff) |
pep8 compliance, also removed use of exec() for netrender module importing
-rw-r--r-- | release/scripts/io/netrender/client.py | 6 | ||||
-rw-r--r-- | release/scripts/ui/properties_data_curve.py | 4 | ||||
-rw-r--r-- | release/scripts/ui/properties_physics_smoke.py | 4 | ||||
-rw-r--r-- | release/scripts/ui/space_console.py | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/release/scripts/io/netrender/client.py b/release/scripts/io/netrender/client.py index 9a28fb2f7a9..8fdedde3f52 100644 --- a/release/scripts/io/netrender/client.py +++ b/release/scripts/io/netrender/client.py @@ -257,10 +257,8 @@ class NetworkRenderEngine(bpy.types.RenderEngine): 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 diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py index 8e863c3db31..e563c7e1fe5 100644 --- a/release/scripts/ui/properties_data_curve.py +++ b/release/scripts/ui/properties_data_curve.py @@ -103,7 +103,7 @@ class DATA_PT_shape_curve(DataButtonsPanel): if is_text: col.itemL(text="Display:") col.itemR(curve, "fast", text="Fast Editing") - + if wide_ui: col = split.column() @@ -261,6 +261,7 @@ class DATA_PT_active_spline(DataButtonsPanelActive): col = split.column() col.itemR(act_spline, "smooth") + class DATA_PT_font(DataButtonsPanel): bl_label = "Font" @@ -350,6 +351,7 @@ class DATA_PT_paragraph(DataButtonsPanel): class DATA_PT_textboxes(DataButtonsPanel): bl_label = "Text Boxes" + def poll(self, context): return (context.object and context.object.type == 'TEXT' and context.curve) diff --git a/release/scripts/ui/properties_physics_smoke.py b/release/scripts/ui/properties_physics_smoke.py index c90e6c50bd9..631c91a5487 100644 --- a/release/scripts/ui/properties_physics_smoke.py +++ b/release/scripts/ui/properties_physics_smoke.py @@ -82,7 +82,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel): 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 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel): 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") diff --git a/release/scripts/ui/space_console.py b/release/scripts/ui/space_console.py index 8aa4df7b16a..e4d65e8eff6 100644 --- a/release/scripts/ui/space_console.py +++ b/release/scripts/ui/space_console.py @@ -141,7 +141,7 @@ class ConsoleAutocomplete(bpy.types.Operator): 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: |