Toolbar UI code:
authorThomas Dinges <blender@dingto.org>
Wed, 2 Nov 2011 15:58:56 +0000 (15:58 +0000)
committerThomas Dinges <blender@dingto.org>
Wed, 2 Nov 2011 15:58:56 +0000 (15:58 +0000)
* More cleanup.

release/scripts/startup/bl_ui/space_view3d_toolbar.py

index 9518ccb..d8ef991 100644 (file)
@@ -481,12 +481,9 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
             col.template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
 
         # Particle Mode #
-
-        # XXX This needs a check if psys is editable.
         if context.particle_edit_object:
             tool = settings.tool
 
-            # XXX Select Particle System
             layout.column().prop(settings, "tool", expand=True)
 
             if tool != 'NONE':
@@ -825,13 +822,11 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, Panel):
 
             if brush.use_anchor:
                 col.separator()
-                row = col.row()
-                row.prop(brush, "use_edge_to_edge", "Edge To Edge")
+                col.prop(brush, "use_edge_to_edge", "Edge To Edge")
 
             if brush.use_airbrush:
                 col.separator()
-                row = col.row()
-                row.prop(brush, "rate", text="Rate", slider=True)
+                col.prop(brush, "rate", text="Rate", slider=True)
 
             if brush.use_space:
                 col.separator()
@@ -857,8 +852,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, Panel):
                 row.prop(brush, "use_pressure_jitter", toggle=True, text="")
 
         else:
-            row = col.row()
-            row.prop(brush, "use_airbrush")
+            col.prop(brush, "use_airbrush")
 
             row = col.row()
             row.active = brush.use_airbrush and (not brush.use_space) and (not brush.use_anchor)
@@ -867,8 +861,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, Panel):
             col.separator()
 
             if not image_paint:
-                row = col.row()
-                row.prop(brush, "use_smooth_stroke")
+                col.prop(brush, "use_smooth_stroke")
 
                 col = layout.column()
                 col.active = brush.use_smooth_stroke
@@ -879,9 +872,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, Panel):
 
             col = layout.column()
             col.active = (not brush.use_anchor) and (brush.sculpt_tool not in {'GRAB', 'THUMB', 'ROTATE', 'SNAKE_HOOK'})
-
-            row = col.row()
-            row.prop(brush, "use_space")
+            col.prop(brush, "use_space")
 
             row = col.row()
             row.active = brush.use_space
@@ -1011,14 +1002,10 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, Panel):
         else:
             col.prop(brush, "cursor_color_add", text="Color")
 
-        col = layout.column()
-        col.label(text="Icon:")
-
-        row = col.row(align=True)
-        row.prop(brush, "use_custom_icon")
+        col = layout.column(align=True)
+        col.prop(brush, "use_custom_icon")
         if brush.use_custom_icon:
-            row = col.row(align=True)
-            row.prop(brush, "icon_filepath", text="")
+            col.prop(brush, "icon_filepath", text="")
 
 # ********** default tools for weight-paint ****************