diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-24 12:18:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-24 12:27:05 +0300 |
commit | 31c49493d14a68d4f7bf35162c6b16765d1433a0 (patch) | |
tree | d80cbd63cff1495a359d20c1ab8cec6d4deb8ae4 /release/scripts/startup/bl_operators/clip.py | |
parent | 9284c051d62833960ff836f2f48bf5a3b18b369c (diff) |
Fix incorrect active object setting in scripts.
Diffstat (limited to 'release/scripts/startup/bl_operators/clip.py')
-rw-r--r-- | release/scripts/startup/bl_operators/clip.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py index 2717a4f62a3..a94076ab61b 100644 --- a/release/scripts/startup/bl_operators/clip.py +++ b/release/scripts/startup/bl_operators/clip.py @@ -238,7 +238,7 @@ class CLIP_OT_track_to_empty(Operator): ob = bpy.data.objects.new(name=track.name, object_data=None) ob.select_set(action='SELECT') context.scene.objects.link(ob) - context.scene.objects.active = ob + context.view_layer.objects.active = ob for con in ob.constraints: if con.type == 'FOLLOW_TRACK': @@ -314,7 +314,7 @@ class CLIP_OT_bundles_to_mesh(Operator): ob.matrix_world = matrix context.scene.objects.link(ob) ob.select = True - context.scene.objects.active = ob + context.view_layer.objects.active = ob else: self.report({'WARNING'}, "No usable tracks selected") |