PDA

View Full Version : Change Animation timing with Hotkeys


Helli
03-14-2008, 10:30 AM
Hey guys, I wrote 2 little scripts you can assign to hotkeys and change the animation timing with it.

Those scripts use the timeline ripple setting, otherwise they work like the add and remove Inbetween commands in Maya.

forward:
if GetValue("preferences.dopesheet.timeline_ripple") = TRUE then
ScaleAndOffset Application.Selection, siAnimatedParameters , 1, , GetValue( "PlayControl.Current" ), GetValue( "PlayControl.Current" ), 0,TRUE , siFCurvesAnimationSources, True, , False
else
storeTime = GetValue("PlayControl.Current")
NextKey()
ScaleAndOffset Application.Selection, siAnimatedParameters , 1, , GetValue( "PlayControl.Current" ), GetValue( "PlayControl.Current" ), 0,FALSE , siFCurvesAnimationSources, True, , False
SetValue "PlayControl.Current", storeTime
end if

back:
if GetValue("preferences.dopesheet.timeline_ripple") = TRUE then
ScaleAndOffset Application.Selection, siAnimatedParameters , -1, , GetValue( "PlayControl.Current" ), GetValue( "PlayControl.Current" ), 0,TRUE , siFCurvesAnimationSources, True, , False
else
storeTime = GetValue("PlayControl.Current")
NextKey()
ScaleAndOffset Application.Selection, siAnimatedParameters , -1, ,GetValue( "PlayControl.Current" ) , GetValue( "PlayControl.Current" ), 0,FALSE , siFCurvesAnimationSources, True, , False
SetValue "PlayControl.Current", storeTime
end if

mechis
03-14-2008, 01:27 PM
That's awesome. Thanks for sharing... I'll have to try this out!
~Mechis