GPencil: Add lock icon to Vertex Groups list

Also check this flag in operators.

Note: This is required for the development of the new Normalize All operator.
This commit is contained in:
Antonioya
2019-04-16 11:27:36 +02:00
parent a8852ade8a
commit 5494926ee5
3 changed files with 40 additions and 13 deletions

View File

@@ -342,8 +342,8 @@ class GPENCIL_UL_vgroups(UIList):
vgroup = item
if self.layout_type in {'DEFAULT', 'COMPACT'}:
layout.prop(vgroup, "name", text="", emboss=False, icon_value=icon)
# icon = 'LOCKED' if vgroup.lock_weight else 'UNLOCKED'
# layout.prop(vgroup, "lock_weight", text="", icon=icon, emboss=False)
icon = 'LOCKED' if vgroup.lock_weight else 'UNLOCKED'
layout.prop(vgroup, "lock_weight", text="", icon=icon, emboss=False)
elif self.layout_type == 'GRID':
layout.alignment = 'CENTER'
layout.label(text="", icon_value=icon)