Copy, Pasting Animation keys using Animation Layers (scripting help needed)


#1

So I’ve been racking my brain for ages about how to handle this problem. Turns out, using animation layers apears to be the key. Obviously, there are dozens of Max scripts that can copy/paste animation key-controllers from one object to another. The only problem is Max’s tendency to either completely destroy all previous animation keys on that particular controller, OR the fact that pasting a selection of keys (using the time dope sheet) will nudge all subsequent animation keys over rather than simply merging the copied animation keys directly on top (as shown in my video).

Basically, it would be nice to have a quick shortcut that could carry out this procedure in a couple clicks, rather than having to do it manually (as shown in the video above) every single time I want to copy a set of animation keys from one part of the timeline to another AND between different objects.

In short, the script could have “copy” and “paste” buttons:

-COPY ANIMATION KEYS-

  1. “Select Time” based on the current min-max (Position,Rotation,Scale, etc…) key selection on the timeline (as shown in the video) for currently selected object
  2. “Enable Animation Layers”, “Add Anim Layer” named ‘PastedAnimLayer’ (or something like that)

-PASTE ANIMATION KEYS-

  1. “Paste Time” on the currently selection object at current sliderTime to congruent ‘PastedAnimLayer’ keys (Position,Rotation,Scale, etc…)
  2. “Collapse Anim Layer” to cleanly merge pasted keys with the current animation.

Anyway, it’s pretty straight forward I think.

**-Copy keys (at current time and selection). **
**-Create new animation layer. **
**-“Paste Time” to layer (at current time and selection). **
-Merge layers.

Also, having a relative/absolute paste option would be a bonus as well. If anyone has a few extra minutes to figure this one out, or has a better suggestion all together–I would be forever in your debt. As as long time Max user I can assure you that tons of other animators would love something like this as well. Again, I usually do all of this manually by hand. Unfortunately it gets pretty cumbersome and my knowledge of maxscript is limited.

Thanks! Let me know if anyone can help.