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-05-11 00:36:13 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-05-11 00:36:13 +0400
commitee9f917f08c5c90235b4f216a1736dbb3d39d730 (patch)
tree7efffa9a97b0df1524b963f63fa944794f7032d8 /release
parent415d346db65976a531a44a106b0eb2cdcfc153dc (diff)
Add keymap and menu entries for masking.
* Add CTRL+IKEY to invert the mask. * Add ALT+MKEY to clear the mask. * Change the 'Hide' menu in sculpt mode to 'Hide/Mask', adds entires for clearing, filling, and inverting the mask, as well as hiding masked regions.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py23
1 files changed, 20 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 7e53cfed282..3b7eb314bab 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -55,7 +55,7 @@ class VIEW3D_HT_header(Header):
if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE'}:
sub.menu("VIEW3D_MT_brush")
if mode_string == 'SCULPT':
- sub.menu("VIEW3D_MT_hide")
+ sub.menu("VIEW3D_MT_hide_mask")
else:
sub.menu("VIEW3D_MT_object")
@@ -1269,8 +1269,8 @@ class VIEW3D_MT_sculpt(Menu):
layout.prop(sculpt, "use_deform_only")
-class VIEW3D_MT_hide(Menu):
- bl_label = "Hide"
+class VIEW3D_MT_hide_mask(Menu):
+ bl_label = "Hide/Mask"
def draw(self, context):
layout = self.layout
@@ -1286,6 +1286,23 @@ class VIEW3D_MT_hide(Menu):
op = layout.operator("paint.hide_show", text="Show Bounding Box")
op.action = 'SHOW'
op.area = 'INSIDE'
+
+ op = layout.operator("paint.hide_show", text="Hide Masked")
+ op.area = 'MASKED'
+ op.action = 'HIDE'
+
+ layout.separator()
+
+ op = layout.operator("paint.mask_flood_fill", text="Invert Mask")
+ op.mode = 'INVERT'
+
+ op = layout.operator("paint.mask_flood_fill", text="Fill Mask")
+ op.mode = 'VALUE'
+ op.value = 1
+
+ op = layout.operator("paint.mask_flood_fill", text="Clear Mask")
+ op.mode = 'VALUE'
+ op.value = 0
# ********** Particle menu **********