[Bf-blender-cvs] [ba026ff8485] greasepencil-object: UI: Hide Relations and Physics panel

Antonio Vazquez noreply at git.blender.org
Sun Jul 9 17:36:50 CEST 2017


Commit: ba026ff8485a0329125d1a7ef43df579452d4504
Author: Antonio Vazquez
Date:   Sun Jul 9 17:36:41 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBba026ff8485a0329125d1a7ef43df579452d4504

UI: Hide Relations and Physics panel

Hide these panel if enter in special GP modes

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

M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

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

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index f59a36ab3e6..28fc7b6bbfe 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -236,6 +236,13 @@ class VIEW3D_PT_tools_relations(View3DPanel, Panel):
     bl_context = "objectmode"
     bl_label = "Relations"
 
+    @classmethod
+    def poll(cls, context):
+        if context.active_object and context.active_object.mode in ('GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT'):
+            return False
+        else:
+            return True
+
     def draw(self, context):
         layout = self.layout
 
@@ -305,6 +312,13 @@ class VIEW3D_PT_tools_rigid_body(View3DPanel, Panel):
     bl_context = "objectmode"
     bl_label = "Rigid Body Tools"
 
+    @classmethod
+    def poll(cls, context):
+        if context.active_object and context.active_object.mode in ('GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT'):
+            return False
+        else:
+            return True
+
     def draw(self, context):
         layout = self.layout




More information about the Bf-blender-cvs mailing list