[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56029] trunk/blender/release/scripts/ startup/bl_ui: Code cleanup / Layout script:
Thomas Dinges
blender at dingto.org
Sun Apr 14 00:52:28 CEST 2013
Revision: 56029
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56029
Author: dingto
Date: 2013-04-13 22:52:28 +0000 (Sat, 13 Apr 2013)
Log Message:
-----------
Code cleanup / Layout script:
* Never ever use something like "rowsub" as variable.
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref.py 2013-04-13 22:29:58 UTC (rev 56028)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref.py 2013-04-13 22:52:28 UTC (rev 56029)
@@ -1114,9 +1114,9 @@
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 @@
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
Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py 2013-04-13 22:29:58 UTC (rev 56028)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py 2013-04-13 22:52:28 UTC (rev 56029)
@@ -2702,13 +2702,10 @@
if has_bg:
col = box.column()
col.prop(bg, "opacity", slider=True)
+ col.row().prop(bg, "draw_depth", expand=True)
- rowsub = col.row()
- rowsub.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")
Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2013-04-13 22:29:58 UTC (rev 56028)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2013-04-13 22:52:28 UTC (rev 56029)
@@ -244,8 +244,7 @@
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 @@
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)
More information about the Bf-blender-cvs
mailing list