MayaNodeTree Class Reference

Describes a complete tree of maya nodes for conversion. More...

#include "mayaNodeTree.h"

List of all members.

Public Member Functions

 MayaNodeTree (MayaToEggConverter *converter)
MayaBlendDescadd_blend_desc (MayaBlendDesc *blend_desc)
 Adds the indicated MayaBlendDesc object to the list of blends collected so far.
bool build_hierarchy ()
 Walks through the complete Maya hierarchy but does not tag any nodes for conversion.
MayaNodeDescbuild_node (const MDagPath &dag_path)
 Returns a pointer to the node corresponding to the indicated dag_path object, creating it first if necessary.
void clear ()
 Resets the entire tree in preparation for repopulating with a new scene.
void clear_egg (EggData *egg_data, EggGroupNode *egg_root, EggGroupNode *skeleton_node, EggGroupNode *morph_node)
 Removes all of the references to generated egg structures from the tree, and prepares the tree for generating new egg structures.
MayaBlendDescget_blend_desc (int n) const
 Returns the nth MayaBlendDesc object discovered in the tree.
EggXfmSAnimget_egg_anim (MayaNodeDesc *node_desc)
 Returns the anim table corresponding to the joint for the indicated node.
EggGroupget_egg_group (MayaNodeDesc *node_desc)
 Returns the EggGroupNode corresponding to the group or joint for the indicated node.
EggSAnimDataget_egg_slider (MayaBlendDesc *blend_desc)
 Returns the anim table corresponding to the slider for the indicated blend.
EggTableget_egg_table (MayaNodeDesc *node_desc)
 Returns the EggTable corresponding to the joint for the indicated node.
MayaNodeDescget_node (int n) const
 Returns the nth node in the hierarchy, in an arbitrary ordering.
int get_num_blend_descs () const
 Returns the number of unique MayaBlendDesc objects (and hence the number of morph sliders) discovered in the tree.
int get_num_nodes () const
 Returns the total number of nodes in the hierarchy, not counting the root node.
bool ignore_slider (const string &name) const
 Returns true if the indicated name is on the list of sliders to ignore, false otherwise.
 PT (MayaNodeDesc) _root
void report_ignored_slider (const string &name)
 Outputs a message to the user reporting that a slider was ignored.
void reset_sliders ()
 Resets all of the sliders associated with all blend shapes down to 0.
void tag_all ()
 Tags the entire hierarchy for conversion.
void tag_joint_all ()
 Tags the entire hierarchy for conversion.
bool tag_joint_named (const GlobPattern &glob)
 Tags nodes matching the indicated glob (and all of their children) for conversion.
bool tag_named (const GlobPattern &glob)
 Tags nodes matching the indicated glob (and all of their children) for conversion.
bool tag_selected ()
 Tags the just the selected hierarchy for conversion, or the entire hierarchy if nothing is selected.
bool untag_named (const GlobPattern &glob)
 Un-tags nodes matching the indicated glob (and all of their children) for conversion.

Public Attributes

float _fps
string _subroot_parent_name

Detailed Description

Describes a complete tree of maya nodes for conversion.

Definition at line 40 of file mayaNodeTree.h.


Member Function Documentation

MayaBlendDesc * MayaNodeTree::add_blend_desc ( MayaBlendDesc blend_desc)

Adds the indicated MayaBlendDesc object to the list of blends collected so far.

If a MayaBlendDesc object with the same name is already part of the tree, the supplied object is discarded and the previously-added object is returned; otherwise, the supplied object is added to the tree and the same object is returned.

In either case, the return value is the MayaBlendDesc that should be used henceforth.

Definition at line 598 of file mayaNodeTree.cxx.

bool MayaNodeTree::build_hierarchy ( )

Walks through the complete Maya hierarchy but does not tag any nodes for conversion.

Definition at line 74 of file mayaNodeTree.cxx.

References build_node().

Referenced by MayaToEggConverter::convert_maya().

MayaNodeDesc * MayaNodeTree::build_node ( const MDagPath &  dag_path)

Returns a pointer to the node corresponding to the indicated dag_path object, creating it first if necessary.

Definition at line 61 of file mayaNodeTree.cxx.

References MayaNodeDesc::from_dag_path().

Referenced by build_hierarchy(), and tag_selected().

void MayaNodeTree::clear ( void  )

Resets the entire tree in preparation for repopulating with a new scene.

Definition at line 307 of file mayaNodeTree.cxx.

Referenced by MayaToEggConverter::clear().

void MayaNodeTree::clear_egg ( EggData egg_data,
EggGroupNode egg_root,
EggGroupNode skeleton_node,
EggGroupNode morph_node 
)

Removes all of the references to generated egg structures from the tree, and prepares the tree for generating new egg structures.

Definition at line 326 of file mayaNodeTree.cxx.

References ordered_vector< Key, Compare >::begin(), and ordered_vector< Key, Compare >::end().

MayaBlendDesc * MayaNodeTree::get_blend_desc ( int  n) const

Returns the nth MayaBlendDesc object discovered in the tree.

Definition at line 623 of file mayaNodeTree.cxx.

References ordered_vector< Key, Compare >::size().

EggXfmSAnim * MayaNodeTree::get_egg_anim ( MayaNodeDesc node_desc)

Returns the anim table corresponding to the joint for the indicated node.

Creates the table node if it has not already been created.

Definition at line 530 of file mayaNodeTree.cxx.

References get_egg_table().

EggSAnimData * MayaNodeTree::get_egg_slider ( MayaBlendDesc blend_desc)

Returns the anim table corresponding to the slider for the indicated blend.

Creates the table node if it has not already been created.

Definition at line 543 of file mayaNodeTree.cxx.

References EggGroupNode::add_child().

EggTable * MayaNodeTree::get_egg_table ( MayaNodeDesc node_desc)

Returns the EggTable corresponding to the joint for the indicated node.

Creates the table node if it has not already been created.

Definition at line 493 of file mayaNodeTree.cxx.

References EggGroupNode::add_child(), EggData::get_coordinate_system(), and MayaNodeDesc::is_joint().

Referenced by get_egg_anim().

MayaNodeDesc * MayaNodeTree::get_node ( int  n) const

Returns the nth node in the hierarchy, in an arbitrary ordering.

Definition at line 295 of file mayaNodeTree.cxx.

int MayaNodeTree::get_num_blend_descs ( ) const

Returns the number of unique MayaBlendDesc objects (and hence the number of morph sliders) discovered in the tree.

Definition at line 612 of file mayaNodeTree.cxx.

References ordered_vector< Key, Compare >::size().

int MayaNodeTree::get_num_nodes ( ) const

Returns the total number of nodes in the hierarchy, not counting the root node.

Definition at line 284 of file mayaNodeTree.cxx.

bool MayaNodeTree::ignore_slider ( const string &  name) const

Returns true if the indicated name is on the list of sliders to ignore, false otherwise.

Definition at line 565 of file mayaNodeTree.cxx.

References MayaToEggConverter::ignore_slider().

void MayaNodeTree::report_ignored_slider ( const string &  name)

Outputs a message to the user reporting that a slider was ignored.

Each slider is only reported once.

Definition at line 576 of file mayaNodeTree.cxx.

void MayaNodeTree::reset_sliders ( )

Resets all of the sliders associated with all blend shapes down to 0.

Definition at line 635 of file mayaNodeTree.cxx.

References ordered_vector< Key, Compare >::begin(), and ordered_vector< Key, Compare >::end().

void MayaNodeTree::tag_all ( )

Tags the entire hierarchy for conversion.

This is the normal behavior.

Definition at line 158 of file mayaNodeTree.cxx.

Referenced by MayaToEggConverter::convert_maya(), and tag_selected().

void MayaNodeTree::tag_joint_all ( )

Tags the entire hierarchy for conversion.

This is the normal behavior.

Definition at line 121 of file mayaNodeTree.cxx.

Referenced by MayaToEggConverter::convert_maya().

bool MayaNodeTree::tag_joint_named ( const GlobPattern glob)

Tags nodes matching the indicated glob (and all of their children) for conversion.

Returns true on success, false otherwise (e.g. the named node does not exist).

Definition at line 134 of file mayaNodeTree.cxx.

References GlobPattern::matches().

Referenced by MayaToEggConverter::convert_maya().

bool MayaNodeTree::tag_named ( const GlobPattern glob)

Tags nodes matching the indicated glob (and all of their children) for conversion.

Returns true on success, false otherwise (e.g. the named node does not exist).

Definition at line 171 of file mayaNodeTree.cxx.

References GlobPattern::matches().

Referenced by MayaToEggConverter::convert_maya().

bool MayaNodeTree::tag_selected ( )

Tags the just the selected hierarchy for conversion, or the entire hierarchy if nothing is selected.

Returns true on success, false on failure.

Definition at line 222 of file mayaNodeTree.cxx.

References build_node(), and tag_all().

Referenced by MayaToEggConverter::convert_maya().

bool MayaNodeTree::untag_named ( const GlobPattern glob)

Un-tags nodes matching the indicated glob (and all of their children) for conversion.

Returns true on success, false otherwise (e.g. the named node does not exist).

Definition at line 197 of file mayaNodeTree.cxx.

References GlobPattern::matches().

Referenced by MayaToEggConverter::convert_maya().


The documentation for this class was generated from the following files: