keyframe time offset

hey all,
I want to slide objects keyframe by an offset value. ex: select object keyframes then slide the keyframes from starting at 0 to 15 (offset value = 15)
clear?
any idea?

hi loran, you could start with something like this:


val = 15
import bpy
sel = [o for o in bpy.context.selected_objects if o.animation_data]

for obj in sel:
    act = obj.animation_data.action
    for fcu in act.fcurves:
        for kp in fcu.keyframe_points:
            kp.co[0] += val
            kp.handle_left[0] += val
            kp.handle_right[0] += val

see that shapekey animation data for instance is stored somewhere elseā€¦