Is there a way to use an f-curve to interactively retime keys in Maya?
WHAT: I’m looking for a way to create an f-curve to dynamically retime an arbitrary number of keys in Maya. Something like an Animation Layer, but for timing on a per-asset basis.
WHAT NOT: I’ve got a great linear retime-from-pivot script already. Used it for years, love it, not looking for that.
WHY: Lets say I’ve animated several goblins racing toward an enemy. Maybe they start the shot behind a gate or something because I don’t want to change the timing of the start of the shot, and I don’t want to change the end of the shot because I’ve already animated the hero striking them, and I can’t change the length of the shot because the shot length is locked.
The director wants one of the goblins to get a little ahead while they are running, and then to slow back down into the current overall shot timing. This director is more of a "I’ll know it when I see it" kind of guy so I expect several rounds of revisions, and he might throw in a stumble request later for all I know, so I want to be able to mute this retime (so I’m working on whole numbered keys) and have it non-destructive (no baking).
SUMMARY: So, I want to scale an arbitrary number of keys on a selected object by a gradient with an arbitrary start and stop for the retime that can be muted, removed, or adjusted non-destructively.
I’m thinking that setting an f-curve that will affect the timing of selected keys would be perfect. Exactly like how animation layers work, but for timing.
Bonus points if a single retime curve can affect keys on several animation layers, as well.
Is this idea possible? Can you point me in some good direction for getting started, or any tools that have already been written? I’m very new to learning programming, and am just starting to learn python for maya.
This should be possible. Have a look how a scene timewarp works. Every animation curve is connected to a time node. Usually you only have one time node which is connected to all anim curves. A scene timewarp is connected to this time node. What you can try is to create a time node for every bunch of animcurves you want control seperately. And then create a animCurveTT and connect it to the corresponding time node. If this precdure works, you can script it to make it easier to control.