Within maya, the MFn::kTransform forms
the base class of all transform nodes. Transforms are
ordered into a scene hierarchy that essentially describes
the spatial position of the shape nodes within the scene.
Maya stores animation data as hermite
animation curves which are attached to individual keyable
attributes. Although at first it may seem a good idea
to read the animation curves directly, bear in mind that
if the character was animated using Ik chains, constraints
or expressions, then you will have to also export this
information and re-create it within your viewing code.
Often the most reliable (and simple)
method of exporting animation data is to sample each transform
over a specified time range. In this case you could either
sample the rotation data in euler angles, quaternions
or matrices. Scale and Transformation values might also
be considered for export.
It should be noted that all example code
here only access quaternions. Consult the MFnTransform
or MFnIkJoint documentation for information on how to
access the rotation data in Euler angles or matrix form.