made the keep-all-uvsets to propagete to the child nodes

This commit is contained in:
Asad M. Zaman 2006-03-09 01:46:57 +00:00
parent 5b2e37764a
commit 869d2afc0d
3 changed files with 23 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#include "mayaBlendDesc.h"
#include "mayaToEggConverter.h"
#include "maya_funcs.h"
#include "eggGroup.h"
#include "config_mayaegg.h"
#include "pre_maya_include.h"
@ -244,6 +245,25 @@ tag() {
_tagged = true;
}
////////////////////////////////////////////////////////////////////
// Function: MayaNodeDesc::has_object_type
// Access: Public
// Description: Returns true if this node or any of its parent
// has_object_type of object_type.
////////////////////////////////////////////////////////////////////
bool MayaNodeDesc::
has_object_type(string object_type) const {
bool ret = false;
if ((_egg_group != (EggGroup*) NULL)
&& _egg_group->has_object_type(object_type)) {
return true;
}
if (_parent != (MayaNodeDesc *)NULL) {
ret |= _parent->has_object_type(object_type);
}
return ret;
}
////////////////////////////////////////////////////////////////////
// Function: MayaNodeDesc::tag_recursively
// Access: Private

View File

@ -61,6 +61,7 @@ public:
bool is_joint_parent() const;
bool is_tagged() const;
bool has_object_type(string object_type) const;
MayaNodeTree *_tree;
MayaNodeDesc *_parent;

View File

@ -1744,7 +1744,8 @@ make_polyset(MayaNodeDesc *node_desc, const MDagPath &dag_path,
}
}
bool keep_all_uvsets = egg_group->has_object_type("keep-all-uvsets");
//bool keep_all_uvsets = egg_group->has_object_type("keep-all-uvsets");
bool keep_all_uvsets = node_desc->has_object_type("keep-all-uvsets");
if (keep_all_uvsets)
mayaegg_cat.info() << "will keep_all_uvsets" << endl;