[Bf-blender-cvs] [f7a6d72c832] greasepencil-object: WIP: More UI panel reorganization

Antonio Vazquez noreply at git.blender.org
Wed Jun 7 14:02:20 CEST 2017


Commit: f7a6d72c832762d50b0f3662bf53f6b17950ef65
Author: Antonio Vazquez
Date:   Wed Jun 7 14:02:01 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBf7a6d72c832762d50b0f3662bf53f6b17950ef65

WIP: More UI panel reorganization

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.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 cd896930581..603c8189254 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -287,7 +287,7 @@ class GreasePencilBrushPanel:
     # subclass must set
     # bl_space_type = 'IMAGE_EDITOR'
     bl_label = "Drawing Brushes"
-    bl_category = "Grease Pencil"
+    bl_category = "Tools"
     bl_region_type = 'TOOLS'
 
     @classmethod
@@ -432,7 +432,7 @@ class GreasePencilBrushCurvesPanel:
     # subclass must set
     # bl_space_type = 'IMAGE_EDITOR'
     bl_label = "Brush Curves"
-    bl_category = "Grease Pencil"
+    bl_category = "Tools"
     bl_region_type = 'TOOLS'
     bl_options = {'DEFAULT_CLOSED'}
 
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 8a9362516e9..68f65cce56b 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 == 'GPENCIL_PAINT':
+            return False
+        else:
+            return True
+
     def draw(self, context):
         layout = self.layout
 
@@ -77,6 +84,13 @@ class VIEW3D_PT_tools_object(View3DPanel, Panel):
     bl_context = "objectmode"
     bl_label = "Edit"
 
+    @classmethod
+    def poll(cls, context):
+        if context.active_object and context.active_object.mode == 'GPENCIL_PAINT':
+            return False
+        else:
+            return True
+
     def draw(self, context):
         layout = self.layout
 
@@ -118,6 +132,13 @@ class VIEW3D_PT_tools_add_object(View3DPanel, Panel):
     bl_context = "objectmode"
     bl_label = "Add Primitive"
 
+    @classmethod
+    def poll(cls, context):
+        if context.active_object and context.active_object.mode == 'GPENCIL_PAINT':
+            return False
+        else:
+            return True
+
     @staticmethod
     def draw_add_mesh(layout, label=False):
         if label:




More information about the Bf-blender-cvs mailing list