diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 29 |
1 files changed, 29 insertions, 0 deletions
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, |