Hello,
I am building an add-on that duplicates keyframes. My approach is:
- iterate through the selected F-Curves and creating copies of the keyframes’ data
- manipulate the copied keyframe data
- write the new keyframes to the selected F-Curves using this code:
new_key = fcurve.keyframe_points.insert(keyframe.co[0], keyframe.co[1], options={"FAST"})
- After everything is done, redraw all animation-related UI with
region.tag_redraw
My questions are:
- Is this the most performant way to approach this?
- Is FCurveKeyframePoints.insert the fastest method to use for creating new keyframes?
- Are there any existing Blender add-ons that do something similar or leverage native commands?
Thank you very much!