distrubte vertices evenly on an edgeloop



I recall a very cool tool called “zentools” that could do that… but I don’t know If there is any other tool in inside Maya may to distribute vertices along an edgeloop.

using Maya 2016

thank you in advance


please guide me if you can.
very appreciated.



Can you elaborate what exactly you want? A picture would help too.


like this:


Try “Edit Edge Flow”.
I took a plane and moved some edges around in a loop then selected “Continuous Edges”.
Then hit “Edit Edge Flow” and it snapped those edges back into alignment.
The only thing is on my plane the edge loops beside the messed up edge loop were normal so I don’t know if will work for you but simple enough to try.


edit edgeflow does not help here…
why not use the zentools…?


nope Edit Edge flow doesn’t work as expected…

zenTools was great… unfortunately It is for older versions of maya, in Maya 2016 and 2015 It gives errors.

I contacted the developer, he promised me an update… but sadly he is not available anymore.

I don’t know any equivalent script to do that.




any help would be great! :slight_smile:


Well, I’ve been meaning to make this script. So here you go.

Run on selected mesh components

def redistributeVertex(ch=False):
    ''' redistribute vertex based on a uniform curve '''
    selection = cmds.ls(sl=True, fl=True)
    orgSel = selection
    verts = cmds.polyListComponentConversion(selection,
        toVertex=True, internal=False)
    verts = cmds.ls(verts, fl=True)
    # convert to edge so we can use polyToCurve to fix vert order issues
    edges = cmds.polyListComponentConversion(selection,
        toEdge=True, internal=True)

    vertData = {}
    positions = []
    for ii, vert in enumerate(verts):
        pos = cmds.xform(vert, q=True, ws=True, t=True)
        data = {'vertex':vert,'vertexPos':pos,'cv':None,'cvPos':None}
        vertData[ii] = data

    #create Curve
    cmds.select(edges, r=True)
    curve = cmds.polyToCurve( form=2, degree=1)[0]

    #find the matching cv
    cvList = []
    cvs = cmds.getAttr('{}.cv[li]'.format(curve))
[/li]    for i in range(len(cvs)):
        curveCV = '{}.cv[{}]'.format(curve,i)
        cvPos = cmds.xform(curveCV, q=True, ws=True, t=True)
        for vert, data in vertData.items():
            vertex = vertData[vert]['vertex']
            pos = cmds.xform(vertex, q=True, ws=True, t=True)
            roundCvPos = [round(x, 3) for x in cvPos]
            roundPos = [round(x, 3) for x in pos]
            if roundCvPos == roundPos:
                vertData[vert]['cv'] = curveCV

            curve, ch=1, rpo=1, rt=0, end=1, kr=0, kcp=0, kep=1, kt=0, s=0, d=1, tol=0.01)
    #set New vertex postion
    for vert, data in vertData.items():
        vertex = vertData[vert]['vertex']
        curveCV = vertData[vert]['cv']
        if curveCV:
            cvPos = cmds.xform(curveCV, q=True, ws=True, t=True)
            vertData[vert]['cvPos'] = cvPos
            cmds.xform(vertex, ws=True, t=cvPos)
            print "No matchign Cv found for vertex",  vertex
    if not ch:
    if orgSel:
        cmds.select(orgSel, r=True)
    return vertData


Castius that script is doing nothing here…
is there a special trick…?


Thanks, man! Works great )) It’s exactly what I was looking for.


oglu does that script still not work for you?


still nothing… i have no clue…


Yeah for some reason it’s not working for me either. But in my case I am sure I am doing something wrong.


It seems two spaces slipped in your code.

change this:

data = {'vertex':vert,'vertexPos':pos,'cv':None,'cvPos':N  one}


data = {'vertex':vert,'vertexPos':pos,'cv':None,'cvPos':None}

Now it should work :slight_smile:

Okay, for whatever reason the spaces get inserted automatically. :smiley:
There shouldn’t be any between “N” and “one”.

Great script by the way!


wow that is odd. why is the forum inserting an space.

Good find and thanks


For some reason doesnt work the zenTools in MaYa 2017 SP5 on this computer.

Im looking for a script like this (I guess)
But unfortunately the script doesnt do nothing at all.

I selected 3 Vertex and run the python script.
Nothing happens.
I also select the whole Vertex loop that I need to adjust and nothing happens.

By selecting edges doesnt work either.

Can some body help me?
What Im doing wrong?

Im using MaYa 2017 SP5
Thank you in advance!


With the “ZhCG_Polytools” script you have the command “average line”
(don’t pay attention to the custom menu, it’s the same command)


I dont have that option directly in the submenu like you, but is over the main menu.
I tried all the option that offers and I think we are speaking to a different approach.

If you tried to un-organize your vertex Like the pic below you will never have a perfect arranged vertices like the pic below.

Vertices properly arranged .