Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-03-15 13:11:24 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-03-15 13:11:24 +0400
commit32a92a65e50a59601b92a296f119c5bd4c81ca8a (patch)
treee5634144b0b9c1cadc55ef7587ce2d05c3c702f9 /release
parentf1d652aa11894be160b35c5f45615f7f47294c34 (diff)
Move brush tool/paint-mode from toolbar to brush menu.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py27
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py34
2 files changed, 27 insertions, 34 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index da67d63dcad..03f56238181 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1048,6 +1048,19 @@ class VIEW3D_MT_brush(Menu):
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:
@@ -1074,6 +1087,20 @@ class VIEW3D_MT_brush(Menu):
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 **********
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index c7afbc86a3b..e6c89478287 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -755,40 +755,6 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
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'}