I would like to move multiple vertices the same distance in different directions

I would like to move multiple vertices the same distance in different directions

vordermand
Contributor Contributor
748 Views
2 Replies
Message 1 of 3

I would like to move multiple vertices the same distance in different directions

vordermand
Contributor
Contributor

vordermand_0-1649755456973.png

Hello people,

I would like to move these vertices as such. This is going to be a TV screen. I want the one vertex to move X amount to the right, the other one X (the same) amount to the top, and I want to do this for all 4 corners of the screen. So the same value for 4 different directions, for 8 vertices. The move settings in the Modeling Toolkit aren't precise enough.

0 Likes
749 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor

Hi!

 

If it needs to be this exact, you're probably best of using code to do it.

 

Here is a python program, it moves selected vertexes in worldspace as much as specified in the last line:

import maya.cmds as mc

def moveVtx(x = 0,y= 0, z= 0):
    
    sel = mc.ls(selection = True)
    for s in sel:
        mc.move(x,y,z,s, r= True, ws = True)

moveVtx(x = 0.5, y = 0,z = 0)

So all you need to do is select each vertex, change the value in the code and execute it from a Python tab.

 

I hope this helps!

0 Likes
Message 3 of 3

hamsterHamster
Advisor
Advisor

same thing possible with existing UI

hamsterHamster_0-1649856671024.png

here, the function of the same code snippet could be done with RelativeTransform fields and MoveTool selected; saves script editing and execution.


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

0 Likes