AnimationServer
ReferencesThe animation server owns the named animations belonging to a document, and runs them.
Animations are an offline batch process. A frame takes as long as it takes to solve the document and capture the images, which is typically far longer than a frame is meant to last on playback, so the server writes numbered images to disk rather than trying to keep any kind of real time schedule. Only one animation may run at a time, and a run may be cancelled or resumed.
Properties
StoredCount
#Gets how many animations would actually be written to a file, which is every one except the placeholders.
Deleting the last animation leaves an empty one behind so the animation window still has something to show. That stand-in is not saved, so a document holding nothing else has nothing to write and should not be asked to.
Methods
Adopt
#Find the animation which drives an object, or create one for it. This is what the 'animate this' entry point on an object calls.
Returns: An animation containing a binding for the object.
Cancel
#Ask the running animation to stop. The current frame is abandoned rather than finished, and the document is put back the way it was.
public void Cancel()
FindByObject
#Find the first animation which drives a specific object.
Run
#Run an animation. The returned task completes when the run does; it does not fault, every failure is reported through the resulting report instead.
public Task<AnimationReport> Run()
animation,
Animation to run. Must belong to this document.
resume
True to leave frames which are already on disk alone.
Events
Progress
#Raised once per frame while an animation runs. Raised on the animation thread, so a handler which touches the user interface must marshal.