diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-05 19:20:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-05 19:21:14 +0300 |
commit | 1c24c04e6023f2d2a328dfcdc9f86cd381d029a3 (patch) | |
tree | 7a5af59ce078cb66fb17ec33cf111ffc8d5fb328 /release/scripts/startup/bl_operators/freestyle.py | |
parent | 57329304b061efe756e3a4ce1b828e9a7c7f7030 (diff) |
Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
Diffstat (limited to 'release/scripts/startup/bl_operators/freestyle.py')
-rw-r--r-- | release/scripts/startup/bl_operators/freestyle.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py index 9b1d054cc15..0cfe78879db 100644 --- a/release/scripts/startup/bl_operators/freestyle.py +++ b/release/scripts/startup/bl_operators/freestyle.py @@ -53,7 +53,6 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator): def execute(self, context): import sys - workspace = context.workspace scene = context.scene view_layer = scene.view_layers.active lineset = view_layer.freestyle_settings.linesets.active @@ -80,7 +79,7 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator): return {'CANCELLED'} # Find selected vertices in editmesh ob = context.active_object - if ob.type == 'MESH' and workspace.object_mode == 'EDIT' and ob.name != ref.name: + if ob.type == 'MESH' and ob.mode == 'EDIT' and ob.name != ref.name: bpy.ops.object.mode_set(mode='OBJECT') selected_verts = [v for v in ob.data.vertices if v.select] bpy.ops.object.mode_set(mode='EDIT') @@ -144,7 +143,6 @@ class SCENE_OT_freestyle_add_edge_marks_to_keying_set(bpy.types.Operator): def execute(self, context): # active keying set - workspace = context.workspace scene = context.scene ks = scene.keying_sets.active if ks is None: @@ -152,7 +150,7 @@ class SCENE_OT_freestyle_add_edge_marks_to_keying_set(bpy.types.Operator): ks.bl_description = "" # add data paths to the keying set ob = context.active_object - ob_mode = workspace.object_mode + ob_mode = ob.mode mesh = ob.data bpy.ops.object.mode_set(mode='OBJECT', toggle=False) for i, edge in enumerate(mesh.edges): @@ -176,7 +174,6 @@ class SCENE_OT_freestyle_add_face_marks_to_keying_set(bpy.types.Operator): def execute(self, context): # active keying set - workspace = context.workspace scene = context.scene ks = scene.keying_sets.active if ks is None: @@ -184,7 +181,7 @@ class SCENE_OT_freestyle_add_face_marks_to_keying_set(bpy.types.Operator): ks.bl_description = "" # add data paths to the keying set ob = context.active_object - ob_mode = workspace.object_mode + ob_mode = ob.mode mesh = ob.data bpy.ops.object.mode_set(mode='OBJECT', toggle=False) for i, polygon in enumerate(mesh.polygons): |