Fix: Wrong Grease Pencil icons in context menu
Fix context menu using the wrong icon for Active Layer and Grease Pencil Layer icons. Pull Request: https://projects.blender.org/blender/blender/pulls/129450
This commit is contained in:
committed by
Pablo Vazquez
parent
97e9a722fc
commit
7a9aab4574
@@ -8119,7 +8119,7 @@ class GREASE_PENCIL_MT_Layers(Menu):
|
||||
for i in range(len(grease_pencil.layers) - 1, -1, -1):
|
||||
layer = grease_pencil.layers[i]
|
||||
if layer == grease_pencil.layers.active:
|
||||
icon = 'GREASEPENCIL'
|
||||
icon = 'DOT'
|
||||
else:
|
||||
icon = 'NONE'
|
||||
layout.operator("grease_pencil.layer_active", text=layer.name, icon=icon).layer = i
|
||||
@@ -8165,7 +8165,7 @@ class VIEW3D_PT_greasepencil_draw_context_menu(Panel):
|
||||
layout.label(text="Active Layer")
|
||||
row = layout.row(align=True)
|
||||
row.operator_context = 'EXEC_REGION_WIN'
|
||||
row.menu("GREASE_PENCIL_MT_Layers", text="", icon='GREASEPENCIL')
|
||||
row.menu("GREASE_PENCIL_MT_Layers", text="", icon='OUTLINER_DATA_GP_LAYER')
|
||||
row.prop(layer, "name", text="")
|
||||
row.operator("grease_pencil.layer_remove", text="", icon='X')
|
||||
|
||||
@@ -8200,7 +8200,7 @@ class VIEW3D_PT_greasepencil_sculpt_context_menu(Panel):
|
||||
layout.label(text="Active Layer")
|
||||
row = layout.row(align=True)
|
||||
row.operator_context = 'EXEC_REGION_WIN'
|
||||
row.menu("GREASE_PENCIL_MT_Layers", text="", icon='GREASEPENCIL')
|
||||
row.menu("GREASE_PENCIL_MT_Layers", text="", icon='OUTLINER_DATA_GP_LAYER')
|
||||
row.prop(layer, "name", text="")
|
||||
row.operator("grease_pencil.layer_remove", text="", icon='X')
|
||||
|
||||
@@ -8245,7 +8245,7 @@ class VIEW3D_PT_greasepencil_vertex_paint_context_menu(Panel):
|
||||
layout.label(text="Active Layer")
|
||||
row = layout.row(align=True)
|
||||
row.operator_context = 'EXEC_REGION_WIN'
|
||||
row.menu("GREASE_PENCIL_MT_Layers", text="", icon='GREASEPENCIL')
|
||||
row.menu("GREASE_PENCIL_MT_Layers", text="", icon='OUTLINER_DATA_GP_LAYER')
|
||||
row.prop(layer, "name", text="")
|
||||
row.operator("grease_pencil.layer_remove", text="", icon='X')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user