[Bf-blender-cvs] [28e952dacd8] master: UI: Sort items in Weight Locks menu

Pablo Vazquez noreply at git.blender.org
Sun Nov 6 02:28:52 CET 2022


Commit: 28e952dacd83bfeff1edb303d480ae5b32cf59c9
Author: Pablo Vazquez
Date:   Sun Nov 6 02:27:52 2022 +0100
Branches: master
https://developer.blender.org/rB28e952dacd83bfeff1edb303d480ae5b32cf59c9

UI: Sort items in Weight Locks menu

Reorder the items in the `Locks` menu:
* Split into three groups: Lock, Unlock, Invert.
* Use icon only in the first item of each group, following the HIG.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D16383

===================================================================

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 39684aaf161..83f190ee5d9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3121,21 +3121,33 @@ class VIEW3D_MT_paint_weight_lock(Menu):
 
         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 = layout.operator("object.vertex_group_lock", 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 = layout.operator("object.vertex_group_lock", 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")
+
+        layout.separator()
+
+        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", text="Unlock Selected")
+        op.action, op.mask = 'UNLOCK', 'SELECTED'
+
+        op = layout.operator("object.vertex_group_lock", text="Unlock Unselected")
+        op.action, op.mask = 'UNLOCK', 'UNSELECTED'
+
+        layout.separator()
+
+        op = layout.operator("object.vertex_group_lock", icon='ARROW_LEFTRIGHT', text="Invert Locks")
         op.action, op.mask = 'INVERT', 'ALL'



More information about the Bf-blender-cvs mailing list