Getting mesh from selected vertex? Python/Pymel

Getting mesh from selected vertex? Python/Pymel

gcoleman7779
Enthusiast Enthusiast
2,076 Views
2 Replies
Message 1 of 3

Getting mesh from selected vertex? Python/Pymel

gcoleman7779
Enthusiast
Enthusiast

I know how to get vertices, edges, etc from a selected mesh, but how do you find the opposite?

 

If I have one vert selected how do I get the entire mesh in python?

0 Likes
Accepted solutions (1)
2,077 Views
2 Replies
Replies (2)
Message 2 of 3

stuzzz
Collaborator
Collaborator
Accepted solution

hi,

 

let say you know the the vertex, here a command that would help

vertexIKnow = "pCube1.vtx[5]"
shapesOfTheMesh = cmds.polyListComponentConversion(vertexIKnow, fv=True)
#it will return a list of mesh shapes nodes.
Message 3 of 3

gcoleman7779
Enthusiast
Enthusiast

Thank you!