Hello. I need small help. Anyone knows how to get to graph editor?
I would like to know value of points in location.z for example( frame 0. location.z=100 , kind of interpolation, left/right handle position)
How I would know how many points is? Where is that data stored?
I found something like
# Save old area typeold_type = bpy.context.area.type
# Switch to graph editor
bpy.context.area.type = 'GRAPH_EDITOR'
# Do some graph stuff, e.g.
bpy.ops.graph.interpolation_type(type='CONSTANT')
# Switch back again
bpy.context.area.type = old_type
But this is general and it doesn’t give me information of single point.
Any help, link?
Thanks for any reply:)
>>> action = D.actions['Action_Jump']
>>> fcurve = action.fcurves[0]
>>> fcurve.data_path
'location'
>>> fcurve.array_index
0
# this is the fcurve for location.x
>>> len(fcurve.keyframe_points)
4
# it has 4 keyframes
>>> fcurve.evaluate(10)
0.006748685613274574
# its value at frame 10
>>> fcurve.keyframe_points[0].co
Vector((0.0, 0.0))
# point 0 is at 0,0
>>> fcurve.keyframe_points[0].handle_
left
left_type
right
right_type
# access the handles.
>>> fcurve.keyframe_points[0].handle_left_type
'ALIGNED'
>>> fcurve.keyframe_points[0].interpolation
'BEZIER'