|
Hi all, I have a problem with MFnMesh! Here’s the detail:
I use MFnMesh::split on an MObject object to cut out a new edge, so the edge number should increase by 1. then I use a MItMeshEdge initialized with that Mobject object, how ever, the iterator seems could NOT “see” the new edge.
Here’s a brief pseudo code, hope this can help to express what I mean:
MObject mesh = genMesh(); // mesh handle MFnMesh fnMesh(mesh); MS stat =fnMesh.split(...); // split, and I would get a MS::kSuccess, without any problem
fnMesh.updateSurface();
MItMeshEdge eIter(mesh);
for (eIter.reset();!eIter.isDone();eIter.next()) {
print (eIter.index());
// Now I get the problem, the iteration would stop without access the new edge,
// but I need the new edge indeed. }
I found that after splitting, I get a increased num use MFnMesh::numEdge(), which is correct and exciting, but when use MItMeshEdge::count(), the result doesn’t change at all.
Anyone has such experience? Or did I ask in wrong way?
Help…… Really need help!!
|