I am trying to develop an addon that involves placing a keyframe on a specific fcurve (like for example the X Location) and then making changes to the coordinates of the handles of that keyframe (as well as the successor and predecessor keyframes) but the problem is if there are multiple fcurves how do I know which curve I just added a keyframe to.
I know how to place the keyframe using bpy.ops.graphframe_insert but if I want to script some change to the newly added keyframe just looping through all the fcurves isn't helpful as they do not seem to have properties indicating exactly what fcurve they belong to.
Just to give an example: A user places the keyframe for the Y Location and there are 9 fcurves I can place the keyframe just fine in the Y Location fcurve but I cannot find a way to distinguish one fcurve from another unless I know the exact index.
Any help would be greatly appreciated, thanks!