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 Answer 1

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$
1
  • 3
    $\begingroup$ Since the answer linked can D.actions['CubeAction'].fcurves.find("scale", index=1) to find the y scale fcurve for instance. $\endgroup$
    – batFINGER
    Commented Jan 2, 2019 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .