@classmethod
def poll(cls, context):
scene = context.scene
- return scene and (scene.render.engine in cls.COMPAT_ENGINES)
+ return scene and (scene.view_render.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@classmethod
def poll(cls, context):
- ob = context.object
- return ob and (ob.mode == 'OBJECT')
+ workspace = context.workspace
+ return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'OBJECT')
def draw(self, context):
layout = self.layout
@classmethod
def poll(cls, context):
- ob = context.object
- return ob and (ob.mode == 'EDIT')
+ workspace = context.workspace
+ return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'EDIT')
def draw(self, context):
layout = self.layout
@classmethod
def poll(cls, context):
- ob = context.object
- return ob and (ob.mode == 'WEIGHT_PAINT')
+ workspace = context.workspace
+ return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'WEIGHT_PAINT')
def draw(self, context):
layout = self.layout
@classmethod
def poll(cls, context):
- ob = context.object
- return ob and (ob.mode == 'VERTEX_PAINT')
+ workspace = context.workspace
+ return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'VERTEX_PAINT')
def draw(self, context):
layout = self.layout