I'm building a script that need to act separately each selected vertex individually.
For this I'm using the following script :
string $sel[] = `ls -os`;
for($vtx in $sel)
{print $vtx};
The {print $vtx} is just temporary to see if it work but when I do it the vertices with successive index are grouped together. For example when I select vertex 20, 21 and 22, it will be labeled as "mesh.vtx[20:22]" and this group will be considered as one entry in the array.
This is very problematic because my script will just apply on the whole group instead of each vertex individually as it should.
So I wonder if there is a way to set up Maya to not group them like that on selection, or to let the script interpret the selection differently.