I need to get all selected vertices and store them in an array so that I can execute a loop and find out information about each vertex.
Although I canβt figure it out.
sel = cmds.ls(sl=1) print sel
Return:
//[u'pCube1.vtx[50:53]', u'pCube1.vtx[74:77]']
More or less, I need my sel variable to print:
pCube1.vtx[50] pCube1.vtx[51] pCube1.vtx[52] pCube1.vtx[53] pCube1.vtx[74] pCube1.vtx[75] pCube1.vtx[76] pCube1.vtx[77]
Does anyone know how to do this without breaking the column separately? I think this is a very dirty way to get around it and would like to know if there is another possibility! Maybe with the Maya API using OpenMaya?
source share