Direct FCurve Editing

I’m trying to find a way to directly edit fcurves. For example I can read an fcurve at any frame with:


But how can I insert a keyframe at a specific frame and with a specific value? Like:

D.actions[‘Action’].fcurves[0].key(frame, value)

thanks and have a great weekend

Daniel Salazar

You can add keyframe points:


Then set their co attribute.

Or set the property value, then use the RNA method keyframe_insert().

Thak you CoDEmanX, that got me to discover the insert() function which is exactly what I needed