diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-07-22 06:03:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-07-22 06:03:15 +0400 |
commit | 200dd87de1726d7b6f61b9cfa3b2beea6ceba6cd (patch) | |
tree | 222e5faf2726fb5b78e489d900d7227848745cf0 /release/scripts | |
parent | 88f126f2ebd615aac01272e2284392b48a5f90ec (diff) |
Cleanup: pep8 & redundant vars
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/rna_prop_ui.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/object.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_texture.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_clip.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 8 |
6 files changed, 14 insertions, 12 deletions
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index e9c96d59eae..e278b0d20fe 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -57,6 +57,7 @@ def rna_idprop_ui_prop_clear(item, prop): except: pass + def rna_idprop_context_value(context, context_member, property_type): space = context.space_data @@ -73,11 +74,13 @@ def rna_idprop_context_value(context, context_member, property_type): return rna_item, context_member + def rna_idprop_has_properties(rna_item): keys = rna_item.keys() nbr_props = len(keys) return (nbr_props > 1) or (nbr_props and '_RNA_UI' not in keys) + def draw(layout, context, context_member, property_type, use_edit=True): def assign_props(prop, val, key): diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index 29b75e64fca..d1d2341a614 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -249,9 +249,9 @@ class SubdivisionSet(Operator): if mod.type == 'MULTIRES': if not relative: if level > mod.total_levels: - sub = level - mod.total_levels - for i in range (0, sub): - bpy.ops.object.multires_subdivide(modifier="Multires") + sub = level - mod.total_levels + for i in range (0, sub): + bpy.ops.object.multires_subdivide(modifier="Multires") if obj.mode == 'SCULPT': if mod.sculpt_levels != level: diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 626cdaa8b1b..faf0d4cb0e8 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -1172,7 +1172,6 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel): col = split.column() factor_but(col, "use_map_alpha", "alpha_factor", "Alpha") - layout.separator() if not isinstance(idblock, ParticleSettings): diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 96ad70e0015..13aad4c3888 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -261,7 +261,7 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel): layout = self.layout sc = context.space_data - clip = sc.clip + # clip = sc.clip col = layout.column(align=True) row = col.row(align=True) diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 978c326c83a..95384c1ee8b 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -160,14 +160,14 @@ class SEQUENCER_MT_view(Menu): if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: layout.operator_context = 'INVOKE_REGION_PREVIEW' layout.operator("sequencer.view_all_preview", text="Fit preview in window") - + layout.separator() - + ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1)) for a, b in ratios: layout.operator("sequencer.view_zoom_ratio", text=iface_("Zoom %d:%d") % (a, b), translate=False).ratio = a / b - + layout.separator() layout.operator_context = 'INVOKE_DEFAULT' diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 256110a5d80..5e7e91c1b88 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1036,7 +1036,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel): class TEXTURE_UL_texpaintslots(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): - ma = data + # ma = data ima = item if self.layout_type in {'DEFAULT', 'COMPACT'}: @@ -1061,7 +1061,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): layout = self.layout settings = context.tool_settings.image_paint - brush = settings.brush + # brush = settings.brush ob = context.active_object col = layout.column() @@ -1383,7 +1383,7 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): def draw(self, context): layout = self.layout - scene = context.scene + # scene = context.scene toolsettings = context.tool_settings sculpt = toolsettings.sculpt @@ -1604,7 +1604,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel): mesh = ob.data toolsettings = context.tool_settings ipaint = toolsettings.image_paint - settings = toolsettings.image_paint + # settings = toolsettings.image_paint col = layout.column() |