Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / SDK / Problem with MFnMesh- Internal data doesn't update
  RSS 2.0 ATOM  

Problem with MFnMesh- Internal data doesn't update
Rate this thread
 
60138
 
Permlink of this thread  
avatar
  • Total Posts: 2
  • Joined: 11 March 2008 05:17 PM

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!!



Replies: 0