[Bf-blender-cvs] [9e17304] GPencil_EditStrokes: Don't show "New Layer" operator when no GPencil datablock exists anymore
Joshua Leung
noreply at git.blender.org
Wed Nov 19 15:37:16 CET 2014
Commit: 9e17304ffb14704912ec22677ae273f99ef79547
Author: Joshua Leung
Date: Wed Nov 12 19:23:17 2014 +1300
Branches: GPencil_EditStrokes
https://developer.blender.org/rB9e17304ffb14704912ec22677ae273f99ef79547
Don't show "New Layer" operator when no GPencil datablock exists anymore
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
===================================================================
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 a3fc290..0492ffc 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -249,10 +249,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:
- # even with no data, this operator will still work, as it makes gpd too
- layout.operator("gpencil.layer_add", text="New Layer", icon='ZOOMIN')
- else:
+ if gpd:
self.draw_layers(context, layout, gpd)
# only sequencer doesn't have a toolbar to show these settings in,
More information about the Bf-blender-cvs
mailing list