Python/Maya: Select vertices in a mesh

Hi everyone,

I can’t properly store all my vertices into a list. I want every vertex to be a separate object in my list but Maya
optimizes that list for some reason and I don’t want that.

allComponents = cmds.ls( sl=True )
print(allComponents)

Response:
[u’pCube1.vtx[0:7]']

After some research I found the fl flag inside the ls command that you have to set to true.
fl: Flattens the returned list of objects so that each component is identified individually.

I’m sorry :slight_smile:

This topic was automatically closed after 120 days. New replies are no longer allowed.