diff --git a/pandatool/src/mayaegg/mayaToEggConverter.cxx b/pandatool/src/mayaegg/mayaToEggConverter.cxx index 3417b6a059..094fead575 100644 --- a/pandatool/src/mayaegg/mayaToEggConverter.cxx +++ b/pandatool/src/mayaegg/mayaToEggConverter.cxx @@ -51,6 +51,8 @@ #include #include #include +#include +#include #include #include #include @@ -1948,7 +1950,7 @@ get_vertex_weights(const MDagPath &dag_path, const MFnMesh &mesh, // creates the mesh is named "inMesh" // MObject attr = mesh.attribute("inMesh"); - + // Create the plug to the "inMesh" attribute then use the // DG iterator to walk through the DG, at the node level. // @@ -1963,6 +1965,7 @@ get_vertex_weights(const MDagPath &dag_path, const MFnMesh &mesh, // spot a skinCluster node. // MObject c_node = it.thisNode(); + //mayaegg_cat.info() << "thisNode type: " << c_node.apiTypeStr() << endl; if (c_node.hasFn(MFn::kSkinClusterFilter)) { // We've found the cluster handle. Try to get the weight // data. @@ -1973,10 +1976,13 @@ get_vertex_weights(const MDagPath &dag_path, const MFnMesh &mesh, return false; } + mayaegg_cat.info() << "getting weights of mesh: " << dag_path.fullPathName() << endl; + mayaegg_cat.info() << "and cluster: " << cluster.name() << endl; + // Get the set of objects that influence the vertices of this // mesh. Hopefully these will all be joints. MDagPathArray influence_objects; - cluster.influenceObjects(influence_objects, &status); + cluster.influenceObjects(influence_objects, &status); if (!status) { status.perror("MFnSkinCluster::influenceObjects"); @@ -1984,36 +1990,59 @@ get_vertex_weights(const MDagPath &dag_path, const MFnMesh &mesh, // Fill up the vector with the corresponding table of egg // groups for each joint. joints.clear(); + int numWeights = 0; for (unsigned oi = 0; oi < influence_objects.length(); oi++) { MDagPath joint_dag_path = influence_objects[oi]; + //mayaegg_cat.info() << "influence joint[" << oi << "]:" << joint_dag_path.partialPathName() <