mayaAnimation node

author: Ben Chang (ben@bcchang.com)

This is a YG node that can use maya .anim files to animate hierarchical object files.  
It reads one or more.anim files, and animates its children.

The node names in the .anim file should match named transform nodes inside the child
object node (not YG node names), and the internal transforms must be interpreted as
named Performer DCS (dynamic transform) nodes.  Not all Performer file loaders support 
this feature; the B3D loader from bcchang.com is one that does.  It may work with other
formats such as VRML/X3D, Open Inventor, or OpenFlight.

This node uses the animEngine code from Alias|Wavefront's Maya DevKit.

INSTALLATION

1. copy the mayaAnimation directory into your yg/modules/ directory (either user or system)
2. make
3. mayaAnimation.so should be created and copied into your dso.linux or dso.sgi directory.

EXPORTING FROM MAYA

1. create your scene, setting up hierarchies if needed.
2. keyframe animate your objects.  only transforms and visibilities are supported; animating vertices, uvs, lights, materials, etc is not.
3. when you keyframe the objects, set keys for all attributes, not just current manipulator handles.  If you are only animating rotation, 
for instance, you should still set at least one key at the beginning of the clip to set the values for other transform attributes.  Otherwise,
in YG, the animationEngine will default to setting those values to 0.
4. export your objects, as B3D or another hierarchical format.  In B3D, set the export options to include the full hierarchy - otherwise, the 
objects will be flattened and cannot be animated individually.  
5. select the objects, and use the Export Selected command to export the .anim file.  

*tip*: poly combine any objects which do NOT need to be animated individually, and delete unused empty transforms from the Outliner before exporting.

Using the mayaAnimation node:

mayaAnimation (file(clip1.anim),file(clip2.anim),...,start(1))
{
	object (file(animatedobject.b3d))
}

the file() message loads a file from your yg/data directory.  you can load multiple files, so you can have more than one clip with one object.
the start() message starts one of the animation clips; they are numbered in the order they're loaded.  use this message to flip between different clips.
the actual geometry is a child of the animation engine node.
you often may want to put a delay on the start message, to give the node time to load its .anim file.

To loop an animation:
In Maya, go into the Graph Editor
Select the curves you want to loop
Set the POST-INFINITY to CYCLE

Known Bugs and Limitations:

* there is no stop() message yet
* any attributes without keys in the file get set to 0, instead of keeping their default values
* you cannot animate vertices or other attributes besides transforms
* trying to animate an object with mismatched DCS nodes may cause a crash
* resetting the scene causes a crash
* this node is not yet networked




