Right now I am trying to make a loop animation, and I need to copy 1st keyframe of active fcurve and paste it into fcurve's last+1 keyframe using python script. And this is the python script I am using right now.
Scene_Name = bpy.context.scene.name
current = bpy.data.scenes[Scene_Name].frame_current
endframe = bpy.data.scenes[Scene_Name].frame_end+1
# I need to select active F-curve's 1st keyframe here
bpy.ops.graph.copy()
bpy.context.scene.frame_set(endframe)
bpy.ops.graph.paste(offset='START', merge='MIX', flipped=False)
bpy.context.scene.frame_set(current)
it works fine but I need to select 1st keyframe of active fcurve manually before using this script.
Image below shows orange keyframes, and it is active keyframes. I would like to select those keyframes using python to make my script work automatically. Is it possible?
