Fix T77448: Camera Solver constraint can't be converted to f-curve

A regression caused by c57f65c088 as a fix of another issue.

Added an exception for camera solver as that is always pointing
to camera object.

Since this is a regression which happened in 2.83.0 this change is
a candidate to be ported to the 2.83.1.
This commit is contained in:
Sergey Sharybin 2020-06-09 12:26:30 +02:00
parent b7150183e7
commit 3ffb52d114
Notes: blender-bot 2023-10-12 12:49:04 +02:00
Referenced by issue #77448, Camera Solver Constraint not working (2.83.0 and 2.90.0)
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 4 additions and 1 deletions

View File

@ -486,7 +486,10 @@ class CLIP_OT_constraint_to_fcurve(Operator):
return {'FINISHED'}
# Find start and end frames.
if con.object:
if con.type == 'CAMERA_SOLVER':
# Camera solver constraint is always referring to camera.
tracks = clip.tracking.tracks
elif con.object:
tracking_object = clip.tracking.objects.get(con.object, None)
if not tracking_object:
self.report({'ERROR'}, "Motion Tracking object not found")