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:
@@ -57,8 +57,9 @@ class MeshMirrorUV(Operator):
|
||||
precision = self.precision
|
||||
double_warn = 0
|
||||
|
||||
workspace = context.workspace
|
||||
ob = context.active_object
|
||||
is_editmode = (ob.mode == 'EDIT')
|
||||
is_editmode = (workspace.object_mode == 'EDIT')
|
||||
if is_editmode:
|
||||
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user