# import animation channels independently

I wonder if I can import keyframes (with a python script) only as x keyframe. It seems like I can only set the whole object location at a keyframe, but I want only set the x location, since y location may have different keyframes. Is there any solution for this? I cant get it to work with object.insert_keyframe(data_path='location', frame = key.frame)

Otherwise I don't understand why the channels can be exported independently. I already tried to import the specific x value by setting the current frames to the keyframe and use the objects frame location for y and z value.

• Import from where? Do you mean append keyframes form a different blender file? Export independently to?
– user1853
Jun 7, 2016 at 17:23

bpy.context.object.keyframe_insert('location', index=1)