Commit: c5dc05b038958b81254217c8749e2ed89431338e
Author: Antonio Vazquez
Date:   Fri Feb 9 17:07:16 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBc5dc05b038958b81254217c8749e2ed89431338e

Fix on previous commit to use active_object

Need to use active_object, not object

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

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 2d46f6f05e3..3365ae16324 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.object_mode == 
'GPENCIL_PAINT'
+        return context.active_object and workspace.active_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 ab30199c0fd..51d8a37cadc 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.object_mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 
'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
+                  workspace.active_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 fed2d862d33..f0ed2c92149 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.object_mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 
'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
+                workspace.active_object_mode in {'GPENCIL_EDIT', 
'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
     return not is_gpmode

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to