5
$\begingroup$

I would like to know how to copy keyframes from one armature to another. The thing is, I have the same object, the same armature - the same everything - but in diferent blend files. I want to have all the animation in a single blend file. Can any one explain how to do that?

$\endgroup$

2 Answers 2

10
$\begingroup$

this script will copy the animation data from the active Object to the selected object:

import bpy

active_obj = bpy.context.object
ad = bpy.context.object.animation_data

properties = [p.identifier for p in ad.bl_rna.properties if not p.is_readonly]
objects = [o for o in bpy.context.selected_objects if o.type == active_obj.type]
objects.remove(active_obj)

for obj in objects :
    if obj.animation_data == None :
        obj.animation_data_create()
    ad2 = obj.animation_data

    for prop in properties:
        setattr(ad2, prop, getattr(ad, prop))

here is test run : enter image description here

$\endgroup$
16
  • $\begingroup$ i definitely need to learn more about the use of python in blender! :) $\endgroup$
    – Bithur
    Commented Mar 14, 2015 at 23:25
  • $\begingroup$ @Bithur it really fun once you get started $\endgroup$
    – Chebhou
    Commented Mar 14, 2015 at 23:26
  • $\begingroup$ i just don't know where to start :) $\endgroup$
    – Bithur
    Commented Mar 14, 2015 at 23:28
  • $\begingroup$ Damm i dont know how to put scripts into blender $\endgroup$
    – Warianos
    Commented Mar 15, 2015 at 0:07
  • $\begingroup$ @Warianos open the text editor (it's inside blender ), click +New then copy and paste the script in there, and select your objects , then click Run script $\endgroup$
    – Chebhou
    Commented Mar 15, 2015 at 0:10
7
$\begingroup$

Select both objects and use Ctrl-L>Animation data

$\endgroup$
4
  • $\begingroup$ Thanks for the quick reply, i tried but i failed dunno if im doing it correctlly, here´s a screen shot gyazo.com/c5c8e97316a19ed5260aa2e9eb83a46c I want to copy the keyframes from the other armature to the lowest one :S $\endgroup$
    – Warianos
    Commented Mar 14, 2015 at 22:41
  • $\begingroup$ You selected it in object mode, correct? $\endgroup$ Commented Mar 14, 2015 at 23:12
  • $\begingroup$ Yes yes, i did it in object mode $\endgroup$
    – Warianos
    Commented Mar 15, 2015 at 0:07
  • $\begingroup$ Thanks for the help, it really links de animation, but i couldnt put it in the same armature without destroying the other animations $\endgroup$
    – Warianos
    Commented Mar 16, 2015 at 10:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .