[Bf-blender-cvs] [399c6540424] greasepencil-object: Hide transform panel in GP modes
Antonio Vazquez
noreply at git.blender.org
Thu Jun 8 13:42:38 CEST 2017
Commit: 399c654042447c076fcfb4ee2fab6cc25638ca65
Author: Antonio Vazquez
Date: Thu Jun 8 11:15:48 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB399c654042447c076fcfb4ee2fab6cc25638ca65
Hide transform panel in GP modes
This panel only add noise to the panel while drawing
===================================================================
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 56dd692231d..356040a1d97 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -60,6 +60,13 @@ class VIEW3D_PT_tools_transform(View3DPanel, Panel):
bl_context = "objectmode"
bl_label = "Transform"
+ @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