1
$\begingroup$

I need to get the values from an fcurve at specific frames using a script.These frames do not necessarily have keys on them. Lets say I have an object selected and I need to retrieve the y position at frame 7. (I am not a python coder, this is to be used in conjunction with the Animation Nodes addon.) Is it possible?

Thanks! Sahin

$\endgroup$
1
$\begingroup$

I think this will do what you're asking:

object.animation_data.action.fcurves[1].evaluate(7)

In this example, fcurves1 would access the Y location curve in the collection of fcurves belonging to 'object'. And the Evaluate function will return the value of fcurves1 at frame 7.

This question has a more thorough answer.

$\endgroup$
  • 2
    $\begingroup$ Since the answer linked can D.actions['CubeAction'].fcurves.find("scale", index=1) to find the y scale fcurve for instance. $\endgroup$ – batFINGER Jan 2 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.