[Bf-blender-cvs] [a22cd6b6a95] master: UI: Weight Paint: add a menu for locking and unlocking vertex groups.
Aaron Carlisle
noreply at git.blender.org
Sat Mar 21 01:11:40 CET 2020
Commit: a22cd6b6a95138d73e9e23f7ac0d40de17a5a25f
Author: Aaron Carlisle
Date: Fri Mar 20 20:04:11 2020 -0400
Branches: master
https://developer.blender.org/rBa22cd6b6a95138d73e9e23f7ac0d40de17a5a25f
UI: Weight Paint: add a menu for locking and unlocking vertex groups.
This is a follow up on rBa1e50cfe6b4dbc360b6118c63a0dc7445023c37b
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index a2bfd711c04..0d51bef0d8d 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2939,6 +2939,32 @@ class VIEW3D_MT_gpencil_vertex_group(Menu):
layout.operator("gpencil.vertex_group_deselect", text="Deselect")
+class VIEW3D_MT_paint_weight_lock(Menu):
+ bl_label = "Vertex Group Locks"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All")
+ op.action, op.mask = 'LOCK', 'ALL'
+ op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All")
+ op.action, op.mask = 'UNLOCK', 'ALL'
+ op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Selected")
+ op.action, op.mask = 'LOCK', 'SELECTED'
+ op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Selected")
+ op.action, op.mask = 'UNLOCK', 'SELECTED'
+ op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Unselected")
+ op.action, op.mask = 'LOCK', 'UNSELECTED'
+ op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Unselected")
+ op.action, op.mask = 'UNLOCK', 'UNSELECTED'
+ op = layout.operator("object.vertex_group_lock", text="Lock Only Selected")
+ op.action, op.mask = 'LOCK', 'INVERT_UNSELECTED'
+ op = layout.operator("object.vertex_group_lock", text="Lock Only Unselected")
+ op.action, op.mask = 'UNLOCK', 'INVERT_UNSELECTED'
+ op = layout.operator("object.vertex_group_lock", text="Invert Locks")
+ op.action, op.mask = 'INVERT', 'ALL'
+
+
class VIEW3D_MT_paint_weight(Menu):
bl_label = "Weights"
@@ -2980,6 +3006,8 @@ class VIEW3D_MT_paint_weight(Menu):
layout.operator("paint.weight_set")
+ layout.menu("VIEW3D_MT_paint_weight_lock", text="Locks")
+
def draw(self, _context):
self.draw_generic(self.layout, is_editmode=False)
@@ -7302,6 +7330,7 @@ classes = (
VIEW3D_MT_vertex_group,
VIEW3D_MT_gpencil_vertex_group,
VIEW3D_MT_paint_weight,
+ VIEW3D_MT_paint_weight_lock,
VIEW3D_MT_sculpt,
VIEW3D_MT_sculpt_set_pivot,
VIEW3D_MT_mask,
More information about the Bf-blender-cvs
mailing list