GPv3: Copy Materials to Selected operator

Conversion of GPv2 operator to duplicate materials between grease pencil objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/115535
This commit is contained in:
Antonio Vazquez
2024-01-12 11:20:35 +01:00
committed by Falk David
parent da1ed32f76
commit c964b79edf
7 changed files with 110 additions and 16 deletions

View File

@@ -27,6 +27,13 @@ class GPENCIL_MT_material_context_menu(Menu):
layout.operator("grease_pencil.material_unlock_all", icon='UNLOCKED', text="Unlock All")
layout.operator("grease_pencil.material_lock_unselected", text="Lock Unselected")
layout.operator("grease_pencil.material_lock_unused", text="Lock Unused")
layout.separator()
layout.operator("grease_pencil.material_copy_to_object", text="Copy Material to Selected").only_active = True
layout.operator("grease_pencil.material_copy_to_object",
text="Copy All Materials to Selected").only_active = False
else:
layout.operator("gpencil.material_reveal", icon='RESTRICT_VIEW_OFF', text="Show All")
layout.operator("gpencil.material_hide", icon='RESTRICT_VIEW_ON', text="Hide Others").unselected = True