I'm writing a tool for may that returns the vertices in the same order as selected, but I get them in numerical order.
import maya.cmds as cmds
cmds.selectPref(tso=True)
print(cmds.ls( orderedSelection=True))
print(cmds.ls( sl=True,))
I'm writing a tool for may that returns the vertices in the same order as selected, but I get them in numerical order.
import maya.cmds as cmds
cmds.selectPref(tso=True)
print(cmds.ls( orderedSelection=True))
print(cmds.ls( sl=True,))
For some reason, this started working, when I had tried it before and it didn't
import maya.cmds as cmds
if (cmds.selectPref(tso=True, q=True)==0):
cmds.selectPref(tso=True)
print(cmds.ls( orderedSelection=True))