No need to count layers to check empty

This commit is contained in:
Campbell Barton 2015-08-07 00:00:02 +10:00
parent b9ce21fd0f
commit 0e80e3d20c
1 changed files with 1 additions and 1 deletions

View File

@ -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)