I am not a coder but delved into python/blender for simple stuff a while back. I had this short script to help me do a peel-off (like doing the wave in a stadium) with hundreds of objects:
interval = 0.0
for object in bpy.context.selected_objects:
interval += 0.5
fcurves = object.animation_data.action.fcurves
for curve in fcurves:
curve.keyframe_points[-1].co.x += interval
So I could select a ton of objects and peel off the the last keyframe. I’ve since forgotten how the API works and I want to modify this snippet to move ALL of the keyframes of selected objects and not just the last one. Any advice? I figure I need to set up a third nested for loop for the keyframe_points index but can’t figure out the syntax.
[edit] So I figured it out after all, doy. Just took a while to relearn what I was doing since I only learned enough python to do what I needed to do then promptly forgot how to do it…
replace the last line with the following:
keyframepoints = curve.keyframe_points
for point in keyframepoints:
point.co.x += interval