How to offset keyframes for many objects

here’s a snippet you can use, select your objects and run this froma text editor…
offset is based on object names, edit values and try extra options -noise and reset-


## offset actions in time


offset = 0.25 ## offset in frames
noise = 50 ## add some offset variation (set to 0 to disable)
reset = False ## enable to align actions to frame 0


import bpy, random
objs = [o for o in bpy.context.selected_objects if o.animation_data]


for i,o in enumerate(objs):
    act = o.animation_data.action
    delta = offset * i
    delta += random.random() * noise
    if reset: delta = act.frame_range[0] * -1


    for fcu in act.fcurves:
        for k in fcu.keyframe_points:
            k.co[0] += delta
            k.handle_left[0] += delta
            k.handle_right[0] += delta

2 Likes