[Bf-blender-cvs] [76c80cf124c] greasepencil-object: Annotations: Don't display Annotations properties panel when GP data in context is for GP Object
Joshua Leung
noreply at git.blender.org
Tue Jul 10 07:22:13 CEST 2018
Commit: 76c80cf124cf30067b7860eb4cd6a87e54eb8af6
Author: Joshua Leung
Date: Tue Jul 10 17:21:59 2018 +1200
Branches: greasepencil-object
https://developer.blender.org/rB76c80cf124cf30067b7860eb4cd6a87e54eb8af6
Annotations: Don't display Annotations properties panel when GP data in context is for 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 805823d6f6a..b93b1e4c855 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -18,7 +18,7 @@
# <pep8 compliant>
-
+import bpy
from bpy.types import Menu, UIList
from bpy.app.translations import pgettext_iface as iface_
@@ -734,10 +734,13 @@ class GreasePencilDataPanel:
@classmethod
def poll(cls, context):
# Show this panel as long as someone that might own this exists
+ # AND the owner isn't an object (e.g. GP Object)
if context.gpencil_data_owner is None:
return False
-
- return True
+ elif type(context.gpencil_data_owner) is bpy.types.Object:
+ return False
+ else:
+ return True
@staticmethod
def draw_header(self, context):
@@ -750,7 +753,6 @@ class GreasePencilDataPanel:
layout.use_property_decorate = False
# owner of Grease Pencil data
- # XXX: Review this for the 3D view when there's a GP object active
gpd_owner = context.gpencil_data_owner
gpd = context.gpencil_data
More information about the Bf-blender-cvs
mailing list