[Bf-blender-cvs] [9fc8ec1817a] greasepencil-object: Redo Fix in previous commit and add missing lines

Antonio Vazquez noreply at git.blender.org
Tue Nov 7 11:30:32 CET 2017


Commit: 9fc8ec1817af3f5f7ef70728221f591336a39a52
Author: Antonio Vazquez
Date:   Tue Nov 7 11:30:21 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rB9fc8ec1817af3f5f7ef70728221f591336a39a52

Redo Fix in previous commit and add missing lines

===================================================================

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 638df4904dd..46b3cf60405 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -1036,21 +1036,14 @@ class GreasePencilDataPanel:
 
     @classmethod
     def poll(cls, context):
-        ts = context.scene.tool_settings
 
         if context.gpencil_data is None:
             return False
 
         if context.space_data.type in ('VIEW_3D', 'PROPERTIES'):
-            if context.space_data.context != 'DATA':
-                return False
-
             if context.space_data.context == 'DATA':
                 if context.object.type != 'GPENCIL':
                     return False
-                else:
-                    if context.object.grease_pencil != context.gpencil_data:
-                        return False
 
         return True
 
@@ -1144,16 +1137,9 @@ class GreasePencilLayerOptionPanel:
             return False
 
         if context.space_data.type in ('VIEW_3D', 'PROPERTIES'):
-            if ts.grease_pencil_source == 'OBJECT':
-                if context.space_data.context != 'DATA':
-                    return False
-
             if context.space_data.context == 'DATA':
                 if context.object.type != 'GPENCIL':
                     return False
-                else:
-                    if context.object.grease_pencil != context.gpencil_data:
-                        return False
 
         gpl = context.active_gpencil_layer
         if gpl is None:
@@ -1189,7 +1175,7 @@ class GreasePencilLayerOptionPanel:
         row.prop(gpl, "line_change", text="Thickness Change", slider=True)
         row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="")
 
-        if ts.grease_pencil_source == 'OBJECT' and context.space_data.type in ('VIEW_3D', 'PROPERTIES'):
+        if context.space_data.type in ('VIEW_3D', 'PROPERTIES'):
             row = layout.row(align=True)
             row.prop(gpl, "use_stroke_location", text="Draw on Stroke Location")
 
@@ -1207,16 +1193,9 @@ class GreasePencilOnionPanel:
             return False
 
         if context.space_data.type in ('VIEW_3D', 'PROPERTIES'):
-            if ts.grease_pencil_source == 'OBJECT':
-                if context.space_data.context != 'DATA':
-                    return False
-
             if context.space_data.context == 'DATA':
                 if context.object.type != 'GPENCIL':
                     return False
-                else:
-                    if context.object.grease_pencil != context.gpencil_data:
-                        return False
 
         gpl = context.active_gpencil_layer
         if gpl is None:
@@ -1342,16 +1321,9 @@ class GreasePencilParentLayerPanel:
             return False
 
         if context.space_data.type in ('VIEW_3D', 'PROPERTIES'):
-            if ts.grease_pencil_source == 'OBJECT':
-                if context.space_data.context != 'DATA':
-                    return False
-
             if context.space_data.context == 'DATA':
                 if context.object.type != 'GPENCIL':
                     return False
-                else:
-                    if context.object.grease_pencil != context.gpencil_data:
-                        return False
 
         gpl = context.active_gpencil_layer
         if gpl is None:
@@ -1443,16 +1415,9 @@ class GreasePencilInfoPanel:
             return False
 
         if context.space_data.type in ('VIEW_3D', 'PROPERTIES'):
-            if ts.grease_pencil_source == 'OBJECT':
-                if context.space_data.context != 'DATA':
-                    return False
-
             if context.space_data.context == 'DATA':
                 if context.object.type != 'GPENCIL':
                     return False
-                else:
-                    if context.object.grease_pencil != context.gpencil_data:
-                        return False
 
         return True



More information about the Bf-blender-cvs mailing list