GPencil: Material panel is hidden after adding new material
This bug was introduced by previous Pin fix commit. Maybe it's not the best solution, but this bug is critical and need a quick fix. This commit fix the problem, but not totally sure this is working fine with pin. @dfelinto Could you review and adapt if required.
This commit is contained in:
parent
9c43520010
commit
ba4d07cc5c
@ -85,13 +85,20 @@ class GPMaterialButtonsPanel:
|
||||
return ma and ma.grease_pencil
|
||||
|
||||
|
||||
class MATERIAL_PT_gpencil_slots(GreasePencilMaterialsPanel, GPMaterialButtonsPanel, Panel):
|
||||
class MATERIAL_PT_gpencil_slots(GreasePencilMaterialsPanel, Panel):
|
||||
bl_label = "Grease Pencil Material Slots"
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
bl_context = "material"
|
||||
bl_options = {'HIDE_HEADER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
ob = context.object
|
||||
ma = context.material
|
||||
|
||||
return (ma and ma.grease_pencil) or (ob and ob.type == 'GPENCIL')
|
||||
|
||||
|
||||
# Used as parent for "Stroke" and "Fill" panels
|
||||
class MATERIAL_PT_gpencil_surface(GPMaterialButtonsPanel, Panel):
|
||||
|
Loading…
Reference in New Issue
Block a user