Commit: 30d0194585464631b7e75879f977355a1b125add
Author: Dalai Felinto
Date:   Mon Feb 19 09:53:39 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB30d0194585464631b7e75879f977355a1b125add

Fix collection object mode panels

They were broken since we moved object mode into workspace.

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_collection.py 
b/release/scripts/startup/bl_ui/properties_collection.py
index 9a8e0a7562a..f093b373251 100644
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ b/release/scripts/startup/bl_ui/properties_collection.py
@@ -91,8 +91,7 @@ class 
COLLECTION_PT_object_mode_settings(CollectionButtonsPanel, Panel):
 
     @classmethod
     def poll(cls, context):
-        window = context.window
-        return window and hasattr(window, 'object_mode') and 
(window.object_mode == 'OBJECT')
+        return context.workspace.object_mode == 'OBJECT'
 
     def draw(self, context):
         layout = self.layout
@@ -110,8 +109,7 @@ class 
COLLECTION_PT_edit_mode_settings(CollectionButtonsPanel, Panel):
 
     @classmethod
     def poll(cls, context):
-        window = context.window
-        return window and hasattr(window, 'object_mode') and 
(window.object_mode == 'EDIT')
+        return context.workspace.object_mode == 'EDIT'
 
     def draw(self, context):
         layout = self.layout
@@ -134,8 +132,7 @@ class 
COLLECTION_PT_paint_weight_mode_settings(CollectionButtonsPanel, Panel):
 
     @classmethod
     def poll(cls, context):
-        window = context.window
-        return window and hasattr(window, 'object_mode') and 
(window.object_mode == 'WEIGHT_PAINT')
+        return context.workspace.object_mode == 'WEIGHT_PAINT'
 
     def draw(self, context):
         layout = self.layout
@@ -153,8 +150,7 @@ class 
COLLECTION_PT_paint_vertex_mode_settings(CollectionButtonsPanel, Panel):
 
     @classmethod
     def poll(cls, context):
-        window = context.window
-        return window and hasattr(window, 'object_mode') and 
(window.object_mode == 'VERTEX_PAINT')
+        return context.workspace.object_mode == 'VERTEX_PAINT'
 
     def draw(self, context):
         layout = self.layout

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

Reply via email to