[Bf-blender-cvs] [753e83e6088] greasepencil-object: UI: Back Brush appearance panel and fix active mode

Antonio Vazquez noreply at git.blender.org
Sun Feb 11 11:35:02 CET 2018


Commit: 753e83e6088ce3b2473a955d2767000559629c9d
Author: Antonio Vazquez
Date:   Sun Feb 11 11:34:48 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB753e83e6088ce3b2473a955d2767000559629c9d

UI: Back Brush appearance panel and fix active mode

Back the brush appearance panel to separated tab and fix error introduced in previous commit because workspace hasn't active_object_mode

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	release/scripts/startup/bl_ui/space_view3d.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 3365ae16324..2d46f6f05e3 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -314,7 +314,7 @@ class GreasePencilEraserPanel:
         if context.gpencil_data is None:
             return False
         workspace = context.workspace
-        return context.active_object and workspace.active_object_mode == 'GPENCIL_PAINT'
+        return context.active_object and workspace.object_mode == 'GPENCIL_PAINT'
 
     @staticmethod
     def draw(self, context):
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 51d8a37cadc..ab30199c0fd 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -198,7 +198,7 @@ class VIEW3D_MT_editor_menus(Menu):
         mode_string = context.mode
         edit_object = context.edit_object
         gp_edit = context.active_object and \
-                  workspace.active_object_mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
+                  workspace.object_mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
 
         layout.menu("VIEW3D_MT_view")
 
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index f0ed2c92149..61724f27f2f 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -68,7 +68,7 @@ def draw_vpaint_symmetry(layout, vpaint):
 def is_not_gpencil_edit_mode(context):
     workspace = context.workspace
     is_gpmode = context.active_object and \
-                workspace.active_object_mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
+                workspace.object_mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
     return not is_gpmode
 
 
@@ -2455,8 +2455,8 @@ class VIEW3D_PT_tools_grease_pencil_falloff(Panel):
 # Grease Pencil drawing brushes
 class VIEW3D_PT_tools_grease_pencil_appearance(Panel):
     bl_space_type = 'VIEW_3D'
-    bl_label = "Brush Appearance"
-    bl_category = "Tools"
+    bl_label = "Appearance"
+    bl_category = "Options"
     bl_region_type = 'TOOLS'
     bl_options = {'DEFAULT_CLOSED'}



More information about the Bf-blender-cvs mailing list