I have an empty that moves between two points. It moves because it has two COPY_LOCATION constraints (with the two points as the targets) applied to it. The two influence slider are animated to make the empty move.
So I want to turn that animation into a “real” keyframe location animation then discard the constraints. But because the location is always the same, the bake routine I use makes a bunch of keyframes that are always the same value.
ob_reframe = bpy.data.object["re_frame"] localScene = bpy.data.scenes fs = 1 #localScene.frame_start fe = localScene.frame_end frame_current = localScene.frame_current # We have our source, our target and an action. for fc in range(fe-fs): localScene.frame_set(fc) # Change the frame. ob_reframe.location = ob_reframe.location * ob_reframe.matrix_world localScene.update() ob_reframe.keyframe_insert(data_path="location", frame=fc)
How do I get the true location of an object that is being positioned by a constraint?
Then, after I have that value, how do I insert a keyframe with that value so it actually works?