Skip to main content

History: AnimationSerializer

Source of version: 3 (current)

Copy to clipboard
            !Introduction
This is a simple serializer to save and load an animation (animationtrack) to and from disk in binary format.

It was created for use with the ((Camcorder)) camera motion recorder, but could be used for any animationtrack keyframe based animation.

!Code
{toc}

!Usage
{CODE(wrap="1", colors="c++", caption="Saving an animation")}
AnimationSerializer animSerializer;
animSerializer.exportAnimation(animation, "theAnimation.anim");
{CODE}
{CODE(wrap="1", colors="c++", caption="Loading an animation")}
AnimationSerializer animSerializer;
Animation* anim = animSerializer.importAnimation("theAnimation.anim");
{CODE}

{TRANSCLUDE(page="seebox")}
((Camcorder)) - the last part of the page shows how to use the camera recorder helper class with the animation serializer.
{TRANSCLUDE}