diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-02-19 15:53:39 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-02-19 15:53:39 +0300 |
commit | 30d0194585464631b7e75879f977355a1b125add (patch) | |
tree | 1ff3aa0317664cb183a7cf853af9fbf026c59c12 /release/scripts/startup/bl_ui | |
parent | 264691e5630fcd11516272c98bcdf2a2c980dfa3 (diff) |
Fix collection object mode panels
They were broken since we moved object mode into workspace.
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_collection.py | 12 |
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 |