[Bf-extensions-cvs] [866c2c12] master: Cleanup: camera_turnaround remove unnecessary lookup

Campbell Barton noreply at git.blender.org
Mon Jun 22 07:11:35 CEST 2020


Commit: 866c2c12089e4d1b8f0aaca47c4ab9669a24ece7
Author: Campbell Barton
Date:   Mon Jun 22 15:09:36 2020 +1000
Branches: master
https://developer.blender.org/rBA866c2c12089e4d1b8f0aaca47c4ab9669a24ece7

Cleanup: camera_turnaround remove unnecessary lookup

===================================================================

M	camera_turnaround.py

===================================================================

diff --git a/camera_turnaround.py b/camera_turnaround.py
index e80dc638..8d0fa417 100644
--- a/camera_turnaround.py
+++ b/camera_turnaround.py
@@ -163,7 +163,7 @@ class CAMERATURN_OT_RunAction(Operator):
             bpy.ops.object.constraint_add(type='TRACK_TO')
             bpy.context.object.constraints[-1].track_axis = 'TRACK_NEGATIVE_Z'
             bpy.context.object.constraints[-1].up_axis = 'UP_Y'
-            bpy.context.object.constraints[-1].target = bpy.data.objects[myempty.name]
+            bpy.context.object.constraints[-1].target = myempty
 
         # back previous configuration
         context.preferences.edit.keyframe_new_interpolation_type = savedinterpolation



More information about the Bf-extensions-cvs mailing list