Re-Key the translation keyframes of a bone-rig to fix translation problems...

Hi,

Great site.
Had a good look around and found some great info, but not found what I'm looking for and so asking for help =)

OK

Here is the problem.

I have some character animations that have a scale on them.
I need to reset the scales and then export the animations.

No problem there except the translational keys are messed up.

I have a solution... (it's the best one I could find that works - so far - on all cases).

The solution is:-

Open the animation.
Use 'snapshot' to create a new node (mesh) for the position of the root node (the only one carrying translation keyframes) for evry key frame.
Reset the bones to get everything to a nice clean 100%.
Use Auto Key to snap the root node of each of the created 'dummy' nodes over the length of the animation. (this is the bit I need the script for)... I've tried and failed to write my own. =(

The script needs to start at frame 0 and for every frame snap and key the position of the selected object to the position of one of the dummy objects that bears the same number as the frame.

For example:-

Frame 0 - Align 'rootnode' to 'dummynode000' - save keyframe for x.y.z position
Frame 1 - Align 'rootnode' to 'dummynode001' - save keyframe for x.y.z position
Frame 2 - Align 'rootnode' to 'dummynode002' - save keyframe for x.y.z position

etc

all the way up to the last frame in the animation length.

It seems simple enough... It's a simple enough repetetive and mind-numbingly dull process to do manually... but it's out of my league, script wise..

Can anyone help?

Thanks

AttachmentSize
snapping_nodes_to_fix_animations.jpg125.72 KB