Addon: Don't show led panell in empty materials

This commit is contained in:
Artem30801
2020-08-04 14:56:25 +03:00
parent 72fa8d3c0c
commit 4672885690

View File

@@ -7,6 +7,11 @@ class LedPanel(Panel):
bl_region_type = 'WINDOW'
bl_context = "material"
@classmethod
def poll(cls, context):
mat = context.material
return mat and not mat.grease_pencil
def draw_header(self, context):
self.layout.prop(context.material.led, "is_led", text="")