diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-06 17:00:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-06 17:00:28 +0300 |
commit | 0e80e3d20c70066cea1f3aa900350c75aa868ffc (patch) | |
tree | 9a4cd4d57e0b81c11ffd87e39586324ac434d0e9 /release/scripts/startup/bl_ui/properties_grease_pencil_common.py | |
parent | b9ce21fd0fda385bcafa0e1f17385db97da60c83 (diff) |
No need to count layers to check empty
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_grease_pencil_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 9a46e6fa7a4..91a986d8e50 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -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) |