Sunday, August 7, 2011

Wreckless Conduct: Copy and Pasting Animations

Copying and pasting animations for the rigs in Wreckless now goes something like this:

For the curious, there are about 54 items in the current rig that are used to animate. With the tool, we only have to copy animations from 9 of these objects.

Open up unanimated rig.

Import the animated rig.

Find and select the animated rig's "Root" node. Then copy the animations from it.

Find and select the unanimated rig's "Root" node. Paste the animations to it.

As the script's not in control of importing the rig, I haven't added any capabilities to find and match names of the 2 rigs. You also have to copy and paste for all the IK handles and rig controls. This does cut down the process to about 1 minute so I can't complain. The best part, most of the work is done in 4 lines of code which look like this:

proc CopyKeys() {
string $sourceRoot[] = `ls -selection`;
copyKey -time ":" -option keys -hierarchy below -controlPoints 1 -shape 1 {$sourceRoot[0]};
}//END CopyKeys

proc PasteKeys() {
string $rootNode[] = `ls -selection`;
pasteKey -option replaceCompletely -copies 1 -connect 0 -timeOffset 0 -floatOffset 0 -valueOffset 0 {$rootNode[0]};
}//END PasteKeys

No comments:

Post a Comment