UI: Add "Remove All Materials" operator
Added a new operator `OBJECT_OT_material_slot_remove_all` that removes all materials from the material slots of selected objects This was inspired by a request proposal on RCS. Pull Request: https://projects.blender.org/blender/blender/pulls/138402
This commit is contained in:
committed by
Pratik Borhade
parent
16c87b62e4
commit
dd43ea4e9e
@@ -21,6 +21,7 @@ class MATERIAL_MT_context_menu(Menu):
|
||||
layout.operator("object.material_slot_copy")
|
||||
layout.operator("material.paste", icon='PASTEDOWN')
|
||||
layout.operator("object.material_slot_remove_unused")
|
||||
layout.operator("object.material_slot_remove_all")
|
||||
|
||||
|
||||
class MATERIAL_UL_matslots(UIList):
|
||||
|
||||
@@ -40,6 +40,7 @@ class GPENCIL_MT_material_context_menu(Menu):
|
||||
).only_active = False
|
||||
|
||||
layout.operator("object.material_slot_remove_unused")
|
||||
layout.operator("object.material_slot_remove_all")
|
||||
|
||||
|
||||
class GPENCIL_UL_matslots(UIList):
|
||||
|
||||
@@ -3351,6 +3351,7 @@ class VIEW3D_MT_object_cleanup(Menu):
|
||||
layout.separator()
|
||||
|
||||
layout.operator("object.material_slot_remove_unused", text="Remove Unused Material Slots")
|
||||
layout.operator("object.material_slot_remove_all", text="Remove All Materials")
|
||||
|
||||
|
||||
class VIEW3D_MT_object_asset(Menu):
|
||||
|
||||
Reference in New Issue
Block a user