[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44900] trunk/blender/release/scripts/ startup/bl_ui: Move brush tool/paint-mode from toolbar to brush menu.
Nicholas Bishop
nicholasbishop at gmail.com
Thu Mar 15 10:11:27 CET 2012
Revision: 44900
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44900
Author: nicholasbishop
Date: 2012-03-15 09:11:24 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
Move brush tool/paint-mode from toolbar to brush menu.
Modified Paths:
--------------
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_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py 2012-03-15 09:11:16 UTC (rev 44899)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py 2012-03-15 09:11:24 UTC (rev 44900)
@@ -1048,7 +1048,20 @@
ups = context.tool_settings.unified_paint_settings
layout.prop(ups, "use_unified_size", text="Unified Size")
layout.prop(ups, "use_unified_strength", text="Unified Strength")
+ layout.separator()
+
+ # brush paint modes
+ layout.menu("VIEW3D_MT_brush_paint_modes")
+ # brush tool
+ if context.sculpt_object:
+ layout.operator("brush.reset")
+ layout.prop_menu_enum(brush, "sculpt_tool")
+ elif context.image_paint_object:
+ layout.prop_menu_enum(brush, "image_tool")
+ elif context.vertex_paint_object or context.weight_paint_object:
+ layout.prop_menu_enum(brush, "vertex_tool")
+
# skip if no active brush
if not brush:
return
@@ -1074,6 +1087,20 @@
layout.prop(brush, "use_persistent")
layout.operator("sculpt.set_persistent_base")
+class VIEW3D_MT_brush_paint_modes(Menu):
+ bl_label = "Enabled Modes"
+
+ def draw(self, context):
+ layout = self.layout
+
+ settings = UnifiedPaintPanel.paint_settings(context)
+ brush = settings.brush
+
+ layout.prop(brush, "use_paint_sculpt", text="Sculpt")
+ layout.prop(brush, "use_paint_vertex", text="Vertex Paint")
+ layout.prop(brush, "use_paint_weight", text="Weight Paint")
+ layout.prop(brush, "use_paint_image", text="Texture Paint")
+
# ********** Vertex paint menu **********
Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2012-03-15 09:11:16 UTC (rev 44899)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2012-03-15 09:11:24 UTC (rev 44900)
@@ -755,40 +755,6 @@
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
-class VIEW3D_PT_tools_brush_tool(Panel, View3DPaintPanel):
- bl_label = "Tool"
- bl_options = {'DEFAULT_CLOSED'}
-
- @classmethod
- def poll(cls, context):
- settings = cls.paint_settings(context)
- return (settings and settings.brush and
- (context.sculpt_object or context.image_paint_object or
- context.vertex_paint_object or context.weight_paint_object))
-
- def draw(self, context):
- layout = self.layout
-
- settings = self.paint_settings(context)
- brush = settings.brush
-
- col = layout.column(align=True)
-
- if context.sculpt_object:
- col.prop(brush, "sculpt_tool", expand=False, text="")
- col.operator("brush.reset")
- elif context.image_paint_object:
- col.prop(brush, "image_tool", expand=False, text="")
- elif context.vertex_paint_object or context.weight_paint_object:
- col.prop(brush, "vertex_tool", expand=False, text="")
-
- row = layout.row(align=True)
- row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
- row.prop(brush, "use_paint_vertex", text="", icon='VPAINT_HLT')
- row.prop(brush, "use_paint_weight", text="", icon='WPAINT_HLT')
- row.prop(brush, "use_paint_image", text="", icon='TPAINT_HLT')
-
-
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
bl_label = "Stroke"
bl_options = {'DEFAULT_CLOSED'}
More information about the Bf-blender-cvs
mailing list