always extract all joints even if -subset is specified

This commit is contained in:
David Rose 2003-12-11 01:38:30 +00:00
parent 9bd879333e
commit 335370b515

View File

@ -607,10 +607,8 @@ convert_hierarchy(EggGroupNode *egg_root) {
_tree.clear_egg(&get_egg_data(), egg_root, NULL); _tree.clear_egg(&get_egg_data(), egg_root, NULL);
for (int i = 0; i < num_nodes; i++) { for (int i = 0; i < num_nodes; i++) {
MayaNodeDesc *node = _tree.get_node(i); MayaNodeDesc *node = _tree.get_node(i);
if (node->is_tagged()) { if (!process_model_node(node)) {
if (!process_model_node(node)) { return false;
return false;
}
} }
} }
@ -693,15 +691,17 @@ process_model_node(MayaNodeDesc *node_desc) {
} else if (dag_path.hasFn(MFn::kNurbsSurface)) { } else if (dag_path.hasFn(MFn::kNurbsSurface)) {
EggGroup *egg_group = _tree.get_egg_group(node_desc); EggGroup *egg_group = _tree.get_egg_group(node_desc);
get_transform(node_desc, dag_path, egg_group); get_transform(node_desc, dag_path, egg_group);
MFnNurbsSurface surface(dag_path, &status); if (node_desc->is_tagged()) {
if (!status) { MFnNurbsSurface surface(dag_path, &status);
mayaegg_cat.info() if (!status) {
<< "Error in node " << path mayaegg_cat.info()
<< ":\n" << "Error in node " << path
<< " it appears to have a NURBS surface, but does not.\n"; << ":\n"
} else { << " it appears to have a NURBS surface, but does not.\n";
make_nurbs_surface(dag_path, surface, egg_group); } else {
make_nurbs_surface(dag_path, surface, egg_group);
}
} }
} else if (dag_path.hasFn(MFn::kNurbsCurve)) { } else if (dag_path.hasFn(MFn::kNurbsCurve)) {
@ -711,14 +711,16 @@ process_model_node(MayaNodeDesc *node_desc) {
if (_animation_convert != AC_model) { if (_animation_convert != AC_model) {
EggGroup *egg_group = _tree.get_egg_group(node_desc); EggGroup *egg_group = _tree.get_egg_group(node_desc);
get_transform(node_desc, dag_path, egg_group); get_transform(node_desc, dag_path, egg_group);
MFnNurbsCurve curve(dag_path, &status); if (node_desc->is_tagged()) {
if (!status) { MFnNurbsCurve curve(dag_path, &status);
mayaegg_cat.info() if (!status) {
<< "Error in node " << path << ":\n" mayaegg_cat.info()
<< " it appears to have a NURBS curve, but does not.\n"; << "Error in node " << path << ":\n"
} else { << " it appears to have a NURBS curve, but does not.\n";
make_nurbs_curve(dag_path, curve, egg_group); } else {
make_nurbs_curve(dag_path, curve, egg_group);
}
} }
} }
@ -726,13 +728,15 @@ process_model_node(MayaNodeDesc *node_desc) {
EggGroup *egg_group = _tree.get_egg_group(node_desc); EggGroup *egg_group = _tree.get_egg_group(node_desc);
get_transform(node_desc, dag_path, egg_group); get_transform(node_desc, dag_path, egg_group);
MFnMesh mesh(dag_path, &status); if (node_desc->is_tagged()) {
if (!status) { MFnMesh mesh(dag_path, &status);
mayaegg_cat.info() if (!status) {
<< "Error in node " << path << ":\n" mayaegg_cat.info()
<< " it appears to have a polygon mesh, but does not.\n"; << "Error in node " << path << ":\n"
} else { << " it appears to have a polygon mesh, but does not.\n";
make_polyset(dag_path, mesh, egg_group); } else {
make_polyset(dag_path, mesh, egg_group);
}
} }
} else if (dag_path.hasFn(MFn::kLocator)) { } else if (dag_path.hasFn(MFn::kLocator)) {
@ -742,19 +746,21 @@ process_model_node(MayaNodeDesc *node_desc) {
mayaegg_cat.debug() mayaegg_cat.debug()
<< "Locator at " << path << "\n"; << "Locator at " << path << "\n";
} }
// Presumably, the locator's position has some meaning to the if (node_desc->is_tagged()) {
// end-user, so we will implicitly tag it with the DCS flag so it // Presumably, the locator's position has some meaning to the
// won't get flattened out. // end-user, so we will implicitly tag it with the DCS flag so it
if (_animation_convert != AC_model) { // won't get flattened out.
// For now, don't set the DCS flag on locators within if (_animation_convert != AC_model) {
// character models, since egg-optchar doesn't understand // For now, don't set the DCS flag on locators within
// this. Perhaps there's no reason to ever change this, since // character models, since egg-optchar doesn't understand
// locators within character models may not be meaningful. // this. Perhaps there's no reason to ever change this, since
egg_group->set_dcs_type(EggGroup::DC_net); // locators within character models may not be meaningful.
egg_group->set_dcs_type(EggGroup::DC_net);
}
get_transform(node_desc, dag_path, egg_group);
make_locator(dag_path, dag_node, egg_group);
} }
get_transform(node_desc, dag_path, egg_group);
make_locator(dag_path, dag_node, egg_group);
} else { } else {
// Just a generic node. // Just a generic node.