Panda3D
Public Member Functions | Public Attributes | List of all members
MayaNodeTree Class Reference

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

#include "mayaNodeTree.h"

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

Public Attributes

PN_stdfloat _fps
 
std::string _subroot_parent_name
 

Detailed Description

Describes a complete tree of maya nodes for conversion.

Definition at line 37 of file mayaNodeTree.h.

Member Function Documentation

◆ add_blend_desc()

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 538 of file mayaNodeTree.cxx.

◆ build_hierarchy()

bool MayaNodeTree::build_hierarchy ( )

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

Definition at line 68 of file mayaNodeTree.cxx.

References build_node().

◆ build_node()

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 57 of file mayaNodeTree.cxx.

References MayaNodeDesc::from_dag_path().

Referenced by build_hierarchy().

◆ clear()

void MayaNodeTree::clear ( )

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

Definition at line 272 of file mayaNodeTree.cxx.

Referenced by MayaToEggConverter::clear().

◆ clear_egg()

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 288 of file mayaNodeTree.cxx.

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

◆ get_blend_desc()

MayaBlendDesc * MayaNodeTree::get_blend_desc ( int  n) const

Returns the nth MayaBlendDesc object discovered in the tree.

Definition at line 557 of file mayaNodeTree.cxx.

◆ get_egg_anim()

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 481 of file mayaNodeTree.cxx.

References get_egg_table().

◆ get_egg_group()

EggGroup * MayaNodeTree::get_egg_group ( MayaNodeDesc node_desc)

Returns the EggGroupNode corresponding to the group or joint for the indicated node.

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

Definition at line 307 of file mayaNodeTree.cxx.

◆ get_egg_slider()

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 491 of file mayaNodeTree.cxx.

◆ get_egg_table()

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 447 of file mayaNodeTree.cxx.

Referenced by get_egg_anim().

◆ get_node()

MayaNodeDesc * MayaNodeTree::get_node ( int  n) const

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

Definition at line 263 of file mayaNodeTree.cxx.

◆ get_num_blend_descs()

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 549 of file mayaNodeTree.cxx.

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

◆ get_num_nodes()

int MayaNodeTree::get_num_nodes ( ) const

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

Definition at line 255 of file mayaNodeTree.cxx.

◆ ignore_slider()

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

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

Definition at line 511 of file mayaNodeTree.cxx.

References MayaToEggConverter::ignore_slider().

◆ report_ignored_slider()

void MayaNodeTree::report_ignored_slider ( const std::string &  name)

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

Each slider is only reported once.

Definition at line 520 of file mayaNodeTree.cxx.

◆ reset_sliders()

void MayaNodeTree::reset_sliders ( )

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

Definition at line 566 of file mayaNodeTree.cxx.

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

◆ tag_all()

void MayaNodeTree::tag_all ( )

Tags the entire hierarchy for conversion.

This is the normal behavior.

Definition at line 142 of file mayaNodeTree.cxx.

Referenced by tag_selected().

◆ tag_joint_all()

void MayaNodeTree::tag_joint_all ( )

Tags the entire hierarchy for conversion.

This is the normal behavior.

Definition at line 112 of file mayaNodeTree.cxx.

◆ tag_joint_named()

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 122 of file mayaNodeTree.cxx.

References GlobPattern::matches().

◆ tag_named()

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 152 of file mayaNodeTree.cxx.

References GlobPattern::matches().

◆ tag_selected()

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 196 of file mayaNodeTree.cxx.

References tag_all().

◆ untag_named()

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 174 of file mayaNodeTree.cxx.

References GlobPattern::matches().


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