diff options
author | Thomas Dinges <blender@dingto.org> | 2013-04-14 02:52:28 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-04-14 02:52:28 +0400 |
commit | 98f78fde23df2da1e78659726ee99e7cecdf2a30 (patch) | |
tree | a76d78c16516c8e51abd9d2b8a0a9d7d4510d822 /release | |
parent | 7c4be992818e2286dd795bca023243bb268653d5 (diff) |
Code cleanup / Layout script:
* Never ever use something like "rowsub" as variable.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 16 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 7 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 9 |
3 files changed, 14 insertions, 18 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 944df961306..b2a6dec0cf7 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1114,9 +1114,9 @@ class USERPREF_PT_addons(Panel): def draw_error(layout, message): lines = message.split("\n") box = layout.box() - rowsub = box.row() - rowsub.label(lines[0]) - rowsub.label(icon='ERROR') + sub = box.row() + sub.label(lines[0]) + sub.label(icon='ERROR') for l in lines[1:]: box.label(l) @@ -1199,14 +1199,14 @@ class USERPREF_PT_addons(Panel): row.operator("wm.addon_expand", icon='TRIA_DOWN' if info["show_expanded"] else 'TRIA_RIGHT', emboss=False).module = module_name - rowsub = row.row() - rowsub.active = is_enabled - rowsub.label(text='%s: %s' % (info["category"], info["name"])) + sub = row.row() + sub.active = is_enabled + sub.label(text='%s: %s' % (info["category"], info["name"])) if info["warning"]: - rowsub.label(icon='ERROR') + sub.label(icon='ERROR') # icon showing support level. - rowsub.label(icon=self._support_icon_mapping.get(info["support"], 'QUESTION')) + sub.label(icon=self._support_icon_mapping.get(info["support"], 'QUESTION')) if is_enabled: row.operator("wm.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False).module = module_name diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 9ac527cf3c0..1c05bc7e556 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2702,13 +2702,10 @@ class VIEW3D_PT_background_image(Panel): if has_bg: col = box.column() col.prop(bg, "opacity", slider=True) - - rowsub = col.row() - rowsub.prop(bg, "draw_depth", expand=True) + col.row().prop(bg, "draw_depth", expand=True) if bg.view_axis in {'CAMERA', 'ALL'}: - rowsub = col.row() - rowsub.prop(bg, "frame_method", expand=True) + col.row().prop(bg, "frame_method", expand=True) row = col.row(align=True) row.prop(bg, "offset_x", text="X") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 5eded5ef68d..1ca7bbce90b 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -244,8 +244,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): if mesh.show_weight: col.label("Show Zero Weights:") - rowsub = col.row() - rowsub.prop(tool_settings, "vertex_group_user", expand=True) + col.row().prop(tool_settings, "vertex_group_user", expand=True) # ********** default tools for editmode_curve **************** @@ -1091,9 +1090,9 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel): col.prop(wpaint, "input_samples") col.label("Show Zero Weights:") - rowsub = col.row() - rowsub.active = (not tool_settings.use_multipaint) - rowsub.prop(tool_settings, "vertex_group_user", expand=True) + sub = col.row() + sub.active = (not tool_settings.use_multipaint) + sub.prop(tool_settings, "vertex_group_user", expand=True) self.unified_paint_settings(col, context) |