Weight Paint: add a pie menu for locking and unlocking vertex groups.
Provide different options for locking and unlocking vertex groups using bone selection, accessible via a pie menu triggered via the 'K' hotkey. To implement a variety of operations, extend the old operator with a new option to mask it by bone selection. If the X Mirror option is enabled, selection is automatically mirrored. This follows D6533 as the next step in improving accessibility of vertex group locking during weight painting. Differential Revision: https://developer.blender.org/D6618
This commit is contained in:
@@ -55,9 +55,12 @@ class MESH_MT_vertex_group_context_menu(Menu):
|
||||
layout.operator("object.vertex_group_remove", text="Delete All Unlocked Groups").all_unlocked = True
|
||||
layout.operator("object.vertex_group_remove", text="Delete All Groups").all = True
|
||||
layout.separator()
|
||||
layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All").action = 'LOCK'
|
||||
layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="UnLock All").action = 'UNLOCK'
|
||||
layout.operator("object.vertex_group_lock", text="Lock Invert All").action = 'INVERT'
|
||||
props = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All")
|
||||
props.action, props.mask = 'LOCK', 'ALL'
|
||||
props = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="UnLock All")
|
||||
props.action, props.mask = 'UNLOCK', 'ALL'
|
||||
props = layout.operator("object.vertex_group_lock", text="Lock Invert All")
|
||||
props.action, props.mask = 'INVERT', 'ALL'
|
||||
|
||||
|
||||
class MESH_MT_shape_key_context_menu(Menu):
|
||||
|
Reference in New Issue
Block a user