ScriptSpot home

Forum topic · General Scripting

Copying keyframes

By F Cantin · 2013-05-15

Description

I need to copy keyframes from one object to another. I found scripts permitting such a feature but I don't understand them and I would like to learn how to do it myself.

Any help is apreciated.

Comments (7)
F Cantin

I've been having issues, I still need to be able to modify each of the objects individually. But when I animate one the other one moves the same way. Any way to break their link?

Reply to F Cantin
F Cantin

Figured it out.

It's okay I got it.

I just added «copy» to the second object so it writes

$Box002.pos.controller = copy $Box001.pos.controller

F Cantin

Thanks I've been looking a these pages and I've come up with the following script:

selectkeys $Box001
copyPasteKeys $Box002 (mapkeys) #replace

Box001 is animated
Box002 has no keys.

However even if i don't get any errors, nothing hapens.
Any ideas?

Reply to F Cantin
Branko Živković

The 'copyPasteKeys' function is more complex that you think.
It's used to copy and past keys with offset on the same controller.
Let's say that you animated Box001 position controller and you want to add all anim. keys from Box001 to Box002.

--you can copy controller(track) and paste to another node
$Box002.pos.controller = $Box001.pos.controller
-- or shorter
$Box002[3][1].track = $Box001[3][1].track

Reply to F Cantin
Branko Živković

:)

Yup. But you need to know which controller you wand to use.