[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56449] trunk/blender/release/scripts/ startup/bl_ui: Fix Show Brush button being missing from the UI for paint modes, the feature was

Brecht Van Lommel brechtvanlommel at pandora.be
Wed May 1 17:28:56 CEST 2013


Revision: 56449
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56449
Author:   blendix
Date:     2013-05-01 15:28:56 +0000 (Wed, 01 May 2013)
Log Message:
-----------
Fix Show Brush button being missing from the UI for paint modes, the feature was
already implemented, it's in the Appearance panel now. Also added that panel to
the image editor now since it's relevant there too.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_image.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_image.py	2013-05-01 14:59:50 UTC (rev 56448)
+++ trunk/blender/release/scripts/startup/bl_ui/space_image.py	2013-05-01 15:28:56 UTC (rev 56449)
@@ -882,6 +882,35 @@
         row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
 
 
+class IMAGE_PT_tools_brush_appearance(BrushButtonsPanel, Panel):
+    bl_label = "Appearance"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    def draw(self, context):
+        layout = self.layout
+
+        toolsettings = context.tool_settings.image_paint
+        brush = toolsettings.brush
+
+        if brush is None:  # unlikely but can happen
+            layout.label(text="Brush Unset")
+            return
+
+        col = layout.column()
+        col.prop(toolsettings, "show_brush");
+
+        col = col.column()
+        col.prop(brush, "cursor_color_add", text="")
+        col.active = toolsettings.show_brush
+
+        layout.separator()
+
+        col = layout.column(align=True)
+        col.prop(brush, "use_custom_icon")
+        if brush.use_custom_icon:
+            col.prop(brush, "icon_filepath", text="")
+
+
 class IMAGE_UV_sculpt_curve(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-05-01 14:59:50 UTC (rev 56448)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-05-01 15:28:56 UTC (rev 56449)
@@ -1025,7 +1025,6 @@
 
         layout.prop(sculpt, "use_threaded", text="Threaded Sculpt")
         layout.prop(sculpt, "show_low_resolution")
-        layout.prop(sculpt, "show_brush")
         layout.prop(sculpt, "use_deform_only")
         layout.prop(sculpt, "show_diffuse_color")
 
@@ -1081,16 +1080,22 @@
             return
 
         col = layout.column()
+        col.prop(settings, "show_brush");
 
+        col = col.column()
+        col.active = settings.show_brush
+
         if context.sculpt_object and context.tool_settings.sculpt:
             if brush.sculpt_capabilities.has_secondary_color:
-                col.prop(brush, "cursor_color_add", text="Add Color")
-                col.prop(brush, "cursor_color_subtract", text="Subtract Color")
+                col.row().prop(brush, "cursor_color_add", text="Add")
+                col.row().prop(brush, "cursor_color_subtract", text="Subtract")
             else:
-                col.prop(brush, "cursor_color_add", text="Color")
+                col.prop(brush, "cursor_color_add", text="")
         else:
-            col.prop(brush, "cursor_color_add", text="Color")
+            col.prop(brush, "cursor_color_add", text="")
 
+        layout.separator()
+
         col = layout.column(align=True)
         col.prop(brush, "use_custom_icon")
         if brush.use_custom_icon:




More information about the Bf-blender-cvs mailing list