Page 1 of 1
REQUEST
Posted: Wed Apr 22, 2009 9:21 am
by AMIN
IS THERE ANY SCRIPT THAT COPY KEY ANIMATION OF BONE TO ANOTHER BONE?
Posted: Wed Apr 22, 2009 9:07 pm
by TheChewanater
That's not really a feature request, but you should check out Vern's tools. I think one of them did that.
viewtopic.php?t=7842
Posted: Wed Apr 22, 2009 10:50 pm
by heyvern
At this point there's no easy way to copy animation from one bone to another bone on the same layer.
My scripts focused on copying all bone animation from one bone LAYER to another bone LAYER with the same bones. It won't work copying within the same layer.
-vern
Posted: Fri Apr 24, 2009 3:18 am
by Rudiger
Writing a script to do this should be fairly straight-forward. Just a matter of copying keys from a channel on one bone to the same channel on another. I can have a crack over the weekend if you like. The only issue would be how to distinguish between the source and destination bones. Unless you've got a better idea, I could implement it as two separate button tools, one to copy the bone animation and another to paste it.
Posted: Fri Apr 24, 2009 4:08 am
by heyvern
You will have the same problems I did when doing the copy paste bones and saving bone animation scripts. Key interpolation is NOT in the script interface. So yes, you can copy the keys but you couldn't copy the interpolation; smooth, step, ease, etc.
Also you need to store the info in a variable before pasting it to a new bone if you have two different buttons. That should work pretty well actually. two buttons makes sense. With a one button solution you would need a "pop up" window with a list of bones to choose as the "destination". With two buttons you don't need all that hassle since you just use the ID of the selected bone.
Of course you have to decide WHICH channels get copied. You may not want to copy the position channel or any other channel but rotation (there are BUNCHES of channels for a bone... more than you realize). You would need a list in a pop up for that.
I would suggest a simple choice before pasting that pops up with only two options; position and/or rotation.... maybe scaling.
-vern
Posted: Fri Apr 24, 2009 8:36 am
by Rudiger
Thanks for the tips, Heyvern. That's true about not being able to preserve the interpolation type. I recently created a pair of button tools that let you shift all keyframes to the right of the cursor forward and backward with the cursor. It worked really great, but obviously the interpolation mode got lost and it couldn't shift keyframes in the point curvature or layer order channels. I really hope both these issues get fixed in version 6.0.
I like the idea of the pop-up for selecting the channels. I was also toying with the idea of a having a third tool with it's own context-dependent menu that let you choose which channels, but using up 3 tools for one small feature is probably overkill.
hi dear heyvern
Posted: Sat Apr 25, 2009 6:18 am
by AMIN
My scripts focused on copying all bone animation from one bone LAYER to another bone LAYER with the same bones.
I want this exactlly : copy all bone animation one bone layer to another layer with the same bone....do me a favior and let me know if u have it....
Posted: Sat Apr 25, 2009 12:32 pm
by heyvern
My script is currently a work in progress. It works but no key interpolation is saved. It defaults to linear at the moment I believe.
Basically it only copies or saves bone animation for named bones. YOU MUST NAME THE BONES It saves this to a plain text file which you then load into a new document or layer with the same named bone...
... it just occurred to me... you could change the name of a bone after saving the animation and load it back into the same layer but now adding that animation to ANOTHER bone in the layer that you changed the name... huh... that would work.
It's located here with more explanation:
viewtopic.php?t=7842
It's the third one down.
I can't guarantee the performance at this stage. Make sure you back stuff up or be prepared to "revert" the file if anything goes wrong. As it says in the documentation the key frames default to "linear interpolation". You would need to change them after importing if you want an "exact" copy.
I will get back on this and improve it soon I hope.
-vern