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.