[Bf-blender-cvs] [3012ea067fe] greasepencil-object: Remove various checks used in the general GP layers/data panel for isolation the GP Object
Joshua Leung
noreply at git.blender.org
Thu Jun 21 13:16:34 CEST 2018
Commit: 3012ea067fee1add2ead2a8c7a4a2f26cb9874ed
Author: Joshua Leung
Date: Thu Jun 21 22:57:59 2018 +1200
Branches: greasepencil-object
https://developer.blender.org/rB3012ea067fee1add2ead2a8c7a4a2f26cb9874ed
Remove various checks used in the general GP layers/data panel for isolation the GP Object
===================================================================
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 87cdbcac62b..8696842349e 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -820,7 +820,7 @@ class GPENCIL_MT_color_specials(Menu):
class GreasePencilDataPanel:
- bl_label = "Grease Pencil Layers"
+ bl_label = "Annotations"
bl_region_type = 'UI'
@classmethod
@@ -828,22 +828,22 @@ class GreasePencilDataPanel:
if context.gpencil_data is None:
return False
- if context.space_data.type in {'VIEW_3D', 'PROPERTIES'}:
- if context.space_data.context == 'DATA':
- if context.object.type != 'GPENCIL':
- return False
+ # Don't show for GP Object
+ # XXX: Needs review when we get annotations fully working
+ ob = context.object
+ if ob and ob.type == 'GPENCIL':
+ return False
return True
@staticmethod
def draw_header(self, context):
- if context.space_data.type != 'PROPERTIES':
- self.layout.prop(context.space_data, "show_grease_pencil", text="")
+ self.layout.prop(context.space_data, "show_grease_pencil", text="")
@staticmethod
def draw(self, context):
layout = self.layout
- layout.use_property_split = True
+ #layout.use_property_split = True
layout.use_property_decorate = False
# owner of Grease Pencil data
@@ -854,8 +854,7 @@ class GreasePencilDataPanel:
if context.space_data.type == 'CLIP_EDITOR':
layout.row().prop(context.space_data, "grease_pencil_source", expand=True)
# Grease Pencil data selector
- if context.space_data.type != 'PROPERTIES':
- layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.data_add", unlink="gpencil.data_unlink")
+ layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.data_add", unlink="gpencil.data_unlink")
# Grease Pencil data...
if (gpd is None) or (not gpd.layers):
More information about the Bf-blender-cvs
mailing list