Object Mode: move to workspace struct
- Read-only access can often use EvaluationContext.object_mode - Write access to go to WorkSpace.object_mode. - Some TODO's remain (marked as "TODO/OBMODE") - Add-ons will need updating (context.active_object.mode -> context.workspace.object_mode) - There will be small/medium issues that still need resolving this does work on a basic level though. See D3037
This commit is contained in:
@@ -73,9 +73,10 @@ class QuickFur(Operator):
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
workspace = context.workspace
|
||||
fake_context = context.copy()
|
||||
mesh_objects = [obj for obj in context.selected_objects
|
||||
if obj.type == 'MESH' and obj.mode == 'OBJECT']
|
||||
if obj.type == 'MESH' and workspace.object_mode == 'OBJECT']
|
||||
|
||||
if not mesh_objects:
|
||||
self.report({'ERROR'}, "Select at least one mesh object")
|
||||
|
Reference in New Issue
Block a user