Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-02-19 15:53:39 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-02-19 15:53:39 +0300
commit30d0194585464631b7e75879f977355a1b125add (patch)
tree1ff3aa0317664cb183a7cf853af9fbf026c59c12 /release/scripts/startup/bl_ui/properties_collection.py
parent264691e5630fcd11516272c98bcdf2a2c980dfa3 (diff)
Fix collection object mode panels
They were broken since we moved object mode into workspace.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_collection.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_collection.py12
1 files changed, 4 insertions, 8 deletions
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