I'd like to use the Graph Editor to create animation curves for use in another software package. Is there a way to export the value of a curve for each frame?
For example, I have a keyframe at frame 1 and one at frame 24. The first keyframe has a value of 0 and the second one has a value of 24. There's a Bezier interpolation between the two keyframes. I'd like to get the value for each frame in the curve.
Is this possible? Possibly a Python solution? (I'm comfortable with programming)
You can bake fcurves to keyframes by selecting the keyframes in the graph editor and pressing ShiftO (or Header > Key > Sample Keyframes):
You can also use 3D view > Header > Object > Animation > Bake action, which gives you more options (and also lets you bake constraints, drivers, rigid body simulations, etc.)
Depending on the format you want to export to, you might be able to just export it. If you need to use python, having the values as keyframes makes it pretty easy to iterate over them and collect the values.
Values that are keyframed change as the current frame changes. Using python you can step through each frame and export the keyed values with something like --
scn = bpy.context.scene
obj = bpy.context.active_object
for f in range(scn.frame_start, scn.frame_end):
# use frame_set() so that keyed values are updated