Vertex adiacency



I’m try to convert an edge into a list of vertex. Using the polyListComponentConversion I retrieve a list of vertex that is order from lower vertex index to greater.
I would like a list with vertex ordered in adiacency sorting mode.
I hope I explained my problem.


Going to assume you mean “adjacency” as that is what google tells me. With pymel MeshVertex has a method connectedVertices()

So guess you would have to iterate the flattened vertex list and set next index to be currents neighbor.

Unless you meant adjacent as closest in distance, you can get a vector for each vertex position and get distanceTo(other)


yes the first one is perfect. Sorry for my bad english.
Do I have only this solution? do we have some equivalent in the python command reference?


cmds.polyListComponentConversion(vert, toEdge=True) for each individual vertex should get you the connected edges.

import maya.api.OpenMaya as om

def vv():
    vit =om.MItMeshVertex()
    res =vit.getConnectedVertices()
    return res