No need to count layers to check empty
This commit is contained in:
parent
b9ce21fd0f
commit
0e80e3d20c
|
@ -356,7 +356,7 @@ class GreasePencilDataPanel:
|
|||
layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.data_add", unlink="gpencil.data_unlink")
|
||||
|
||||
# Grease Pencil data...
|
||||
if (gpd is None) or len(gpd.layers) == 0:
|
||||
if (gpd is None) or (not gpd.layers):
|
||||
layout.operator("gpencil.layer_add", text="New Layer")
|
||||
else:
|
||||
self.draw_layers(context, layout, gpd)
|
||||
|
|
Loading…
Reference in New Issue