forked from bartvdbraak/blender
Fix object mode/edit mode panels not visible in collections
This was broken since e8c15e0ed15f83. When object_mode moved from workspace to window.
This commit is contained in:
parent
6249c59609
commit
e6064b412a
@ -91,8 +91,8 @@ class COLLECTION_PT_object_mode_settings(CollectionButtonsPanel, Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
workspace = context.workspace
|
window = context.window
|
||||||
return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'OBJECT')
|
return window and hasattr(window, 'object_mode') and (window.object_mode == 'OBJECT')
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -110,8 +110,8 @@ class COLLECTION_PT_edit_mode_settings(CollectionButtonsPanel, Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
workspace = context.workspace
|
window = context.window
|
||||||
return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'EDIT')
|
return window and hasattr(window, 'object_mode') and (window.object_mode == 'EDIT')
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -134,8 +134,8 @@ class COLLECTION_PT_paint_weight_mode_settings(CollectionButtonsPanel, Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
workspace = context.workspace
|
window = context.window
|
||||||
return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'WEIGHT_PAINT')
|
return window and hasattr(window, 'object_mode') and (window.object_mode == 'WEIGHT_PAINT')
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -153,8 +153,8 @@ class COLLECTION_PT_paint_vertex_mode_settings(CollectionButtonsPanel, Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
workspace = context.workspace
|
window = context.window
|
||||||
return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'VERTEX_PAINT')
|
return window and hasattr(window, 'object_mode') and (window.object_mode == 'VERTEX_PAINT')
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
Loading…
Reference in New Issue
Block a user