Hi!
I'm having trouble doing something I thought would be very simple to do, which 
is adding a vertex to a selection list as the question title states. I have a 
function that takes in a selection list, iterates through all the vertices and 
groups them into 2 separate sections.

The first thing I tried was to copy the selection list to 2 empty lists, get 
the current vertex index in the MItMeshVertex and remove said index from the 
corresponding list. Doing this crashes maya so it seems those are 2 different 
kind of indices, I'm still very new to the API so I mix up things a lot.

What I am doing right now is way too ugly to be the right way. I build a string 
with all the vertex IDs that I get from the iterator, add it to a MEL command 
to select those vertices on the specified object and finally use 
MGlobal::getActiveSelectionList to store that selection into a new list.
Here's a pastebin with the snippet http://pastebin.com/HeraQg6q

There has to be a better way to do this, I thought about storing each vertex in 
the iterator as an MObject and adding them to the lists but I'm not sure if I 
can do that. Any help would be appreciated.
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/4d322ab3-ec0e-4dff-b62c-70362d2c361a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to