ID:2688363
 
Resolved
Two new features have been added to animate() to simplify the construction of more complex animations and to preview them. First, a delay argument has been added, so the first step in a sequence can be pushed forward or back in time, relative to when animate() is called; this for instance allows a later animation sequence to happen without having to sleep(). Additionally, a new ANIMATION_SLICE flag has been added for previewing a portion of an animation; see the reference for more details.
Applies to:DM Language
Status: Resolved (515.1590)

This issue has been resolved.
Let's say I've got an animation that I want to run on an object that repeats, but I don't want the animation to start at the beginning for the first run. I'd like to be able to pass a time offset into the first step of the animation so that the animation appears to begin at an arbitrary point in the cycle rather than from the beginning.

        animate(stars,transform=matrix(120,MATRIX_ROTATE),time=600,loop=-1,start=300)
animate(transform=matrix(240,MATRIX_ROTATE),time=600)
animate(transform=matrix(),time=600)


The above would begin an animation 30 seconds from the first keyframe of the animation. In this example, the first frame of animation would begin with the object rotated 60 degrees.

This would ease some of the maf developers have to do to begin cycling animations at a fixed point, which becomes time consuming and annoying once easing gets into play.
Additionally, I'd like to be able to specify a keyframe to halt a call to animate() so that I can stop a sequence at an arbitrary point between two keyframes.

I've developed a tool that runs animations on objects based on data from JSON and constructs hierarchical object models, and I'd like to write a tool that allows me to visually see calls to animate() frame by frame, tweak the animation data, and preview my changes live.

Having the ability to specify a both start and stop would allow me to feed the server an entire animation and then pick one specific frame from it to hold on to make the construction of this tool much more representative of how things will look in-engine.

animate(stars,transform=matrix(120,MATRIX_ROTATE),time=600,loop=-1,start=300,end=300)
animate(transform=matrix(240,MATRIX_ROTATE),time=600)
animate(transform=matrix(),time=600)


The above would give me a still animation keyframe on demand at 300 ticks from the beginning. This would be useful for stepping through animations frame by frame as well as getting objective appearance related variables for debugging.
I like these ideas. I'm gonna pop this on the list for consideration in 515.
Babump
Lummox JR resolved issue with message:
Two new features have been added to animate() to simplify the construction of more complex animations and to preview them. First, a delay argument has been added, so the first step in a sequence can be pushed forward or back in time, relative to when animate() is called; this for instance allows a later animation sequence to happen without having to sleep(). Additionally, a new ANIMATION_SLICE flag has been added for previewing a portion of an animation; see the reference for more details.