PDA

View Full Version : C++ API: iterate over vertices in an edge selection (in a mel command)


Wixman
12-13-2010, 05:35 AM
If I've got a selection of edges - how do I iterate over the vertices within that selection?

I know I can use MItMeshEdge to iterate over the individual edges themselves, but how do I access the vertex position/color/count etc. I'm also worried that if I loop over the edges individually and access the vertices that way, I'll operate on certain vertices twice as certain edges will share vertices.

any help, much appreciated.

Wixman
12-16-2010, 03:08 PM
didn't get a reply, but this was solved using the MItGeometry iterator, which treats all selections as a list of points. I then used MItGeometry::index() to get a list of all selected vertices to operate on.

CGTalk Moderation
12-16-2010, 03:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.