Fix T68877: GPencil - Missing remove unused slots in menu
The operator was missing in the menu for grease pencil materials.
This commit is contained in:
parent
14c4a217eb
commit
a23e1c38f3
Notes:
blender-bot
2023-02-14 02:30:11 +01:00
Referenced by issue #68877, GPencil: Fix remove unused materials for grease pencil objects
|
@ -44,6 +44,9 @@ class GPENCIL_MT_color_context_menu(Menu):
|
|||
layout.operator("gpencil.stroke_lock_color", text="Lock Unselected")
|
||||
layout.operator("gpencil.lock_layer", text="Lock Unused")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("object.material_slot_remove_unused")
|
||||
|
||||
class GPENCIL_UL_matslots(UIList):
|
||||
def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
|
||||
|
@ -152,11 +155,7 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
|
|||
if gpcolor.use_stroke_texture_mix is True:
|
||||
col.prop(gpcolor, "mix_stroke_factor", text="Factor")
|
||||
|
||||
if (
|
||||
gpcolor.stroke_style == 'SOLID' or
|
||||
gpcolor.use_stroke_pattern or
|
||||
gpcolor.use_stroke_texture_mix
|
||||
):
|
||||
if (gpcolor.stroke_style == 'SOLID' or gpcolor.use_stroke_pattern or gpcolor.use_stroke_texture_mix):
|
||||
col.prop(gpcolor, "color", text="Color")
|
||||
|
||||
if gpcolor.mode in {'DOTS', 'BOX'}:
|
||||
|
@ -275,8 +274,7 @@ class MATERIAL_PT_gpencil_material_presets(PresetPanel, Panel):
|
|||
preset_add_operator = "scene.gpencil_material_preset_add"
|
||||
|
||||
|
||||
classes = (
|
||||
GPENCIL_UL_matslots,
|
||||
classes = (GPENCIL_UL_matslots,
|
||||
GPENCIL_MT_color_context_menu,
|
||||
MATERIAL_PT_gpencil_slots,
|
||||
MATERIAL_PT_gpencil_preview,
|
||||
|
@ -285,8 +283,7 @@ classes = (
|
|||
MATERIAL_PT_gpencil_strokecolor,
|
||||
MATERIAL_PT_gpencil_fillcolor,
|
||||
MATERIAL_PT_gpencil_options,
|
||||
MATERIAL_PT_gpencil_custom_props,
|
||||
)
|
||||
MATERIAL_PT_gpencil_custom_props,)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
from bpy.utils import register_class
|
||||
|
|
Loading…
Reference in New Issue