Notifications
Clear all

[Closed] COPY / PASTE animations between objects

So I’m a lead animator/VFX artist for Orbotix.com and I’ve been on a massive search for a script that will correct a feature in Max which I’m shocked was never implemented in the first place, and that is having the ability to highlight specific segments of animation and copy them from one object to another. As most Maya users already know, this function can be done quickly and flawlessly in the animation graph by highlighting keys, copy and paste. However in Max, the feature it’s nowhere to be found. It appears your only options are to A) copy an entire controller from one object to another–something that destroys any animation data on the target object. The second option B) load/save animation feature is far too slow and inefficient.

I’ve spend hours combing through the web as well as scriptspot.com in search for the perfect script to perform this basic function and I actually found a few which on the surface, looked like they were going to get the job done but ended up being completely incompatible with objects that have their transforms frozen (something I do with virtually every object I animate). Eventually I decided to look here and found a nice script created by our own user: jonlauf


global rl_copyPasteAnim
try(destroyDialog rl_copyPasteAnim) catch()
rollout rl_copyPasteAnim “Copy and Paste Animation”
(
global theController, theVisController
button btn_copyAnim “COPY ANIMATION”
button btn_pasteAnim “PASTE ANIMATION”

on btn_copyAnim pressed do
(
theController = theVisController = undefined
if selection[1] != undefined and selection[1].controller != undefined then
(
theController = selection[1].controller
if selection[1][1].controller != undefined then (theVisController = selection[1].visibility.controller)
)
else (messagebox “Please select an animated object”)
)

on btn_pasteAnim pressed do
(
if theController != undefined then
(
theTime = sliderTime – animationRange.start
with animate off
(
for s in selection do
(

theTM = s.transform
s.controller = copy theController
inserttime s.controller animationrange.start theTime
if theVisController != undefined then
(
if s[1].controller == undefined then s.visibility = bezier_float()
s.visibility.controller = (copy theVisController)
inserttime s.visibility.controller animationrange.start theTime
)
s.transform = theTM

)
slidertime = slidertime+1
slidertime = slidertime-1
)
)
else (messagebox “Please copy an animation”)
)

on rl_copyPasteAnim close do
(
theController = theVisController = undefined
)
)
createDialog rl_copyPasteAnim


This script is great. It’s quick, works with frozen transforms and even takes into account the timeline’s current offset, but it wipes out all of the target’s current animation. With a few modifications (something I am not currently equipped to do) I think we could potentially make the perfect script for this. I actually found a second script from dRaster.com (attachment included) which is slightly better in that it doesn’t completely wipe out the target’s animation timeline, but it also suffers from the same lack of not being able to isolate specific segments and copies the object’s entire animation. Again with some slight modifications, this script could easily get the job done. If the script could operate by recognizing keys that have been manually highlighted on the timeline, that would be an ideal way to approach this I think.

Any scripting gurus in here who can speak to this issue or know of any solutions I’m overlooking? I’ve dealt with this problem for too long and is a serious drain on my time. I’m certain I’m not the only one who could benefit from a solution to this.

7 Replies

do you need this copy/paste keys tool or want to know how make it?

Thanks for asking Denis! The learning curve involved to get me up to speed on maxscript would probably be a bit much for the moment. Just having a basic tool that could do this would be like a dream come true. I’ve seen this basic issue addressed many many times, but never really gets resolved. These two scripts are simply the closest things I can find at the moment…

script spot…Key Transfer.

Does much of what you’ll need.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

it’s pretty far from what LordRaidis wants as i understood.

Thanks for the suggestion! Key Transfer is one of the first scripts I tried using during my long journey to find a good script. This script would be perfect but unfortunately I does not recognize objects who’s controllers have had their transforms frozen

In DopeSheet mode, you can select time and copy and paste keys to other tracks.

  1. Open TrackView

  2. Select Dope Sheet mode.

  3. turn on “Select Time” button.

  4. go to the track and select time segment. If you want to select multiple track use CTRL.

  5. “Copy Time” to copy

  6. go to other track

  7. “Paste Time” to paste.

Wow! That works perfectly–thanks so much for your help!!

Honestly I never thought to check the dope-sheet to do this, but I’ll be damned… it works! I do find it odd they they wouldn’t just include this in the curve editor, but hey I’ll take it. I still think it would be really nice to have a script to speed up this process a bit. I guess I’ll just do it this way until I either figure out the scripting for it or find another script that does it.

Again–thanks for your help gandhics! You rule…