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?
2 Answers
$\begingroup$
$\endgroup$
16
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 :
-
$\begingroup$ i definitely need to learn more about the use of python in blender! :) $\endgroup$– BithurCommented Mar 14, 2015 at 23:25
-
$\begingroup$ @Bithur it really fun once you get started $\endgroup$– ChebhouCommented Mar 14, 2015 at 23:26
-
$\begingroup$ i just don't know where to start :) $\endgroup$– BithurCommented Mar 14, 2015 at 23:28
-
$\begingroup$ Damm i dont know how to put scripts into blender $\endgroup$– WarianosCommented 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$– ChebhouCommented Mar 15, 2015 at 0:10
$\begingroup$
$\endgroup$
4
Select both objects and use Ctrl-L>Animation data
-
$\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$– WarianosCommented 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$– WarianosCommented 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$– WarianosCommented Mar 16, 2015 at 10:24