I have an object, which has two keyframes to make a short animation.
I have a script which duplicates this object and its animation and changes the start frame of the animation. I currently have this code :
line = duplicateObject(bpy.data.scenes["Scene"], "Line", bpy.data.objects["Line"])
line.location[0] = value[0]
line.hide = False
line.animation_data_create()
line.animation_data.action = bpy.data.objects['Line'].animation_data.action.copy()
frame_range = line.animation_data.action.frame_range
line.animation_data.action.frame_range = mathutils.Vector([frame + frame_range[0], frame + frame_range[1]])
Which doesn't work because I can't assign the frame_range variable, it's read only.
Any suggestion?