The command moves the selected vertex ( control vertex ) in the specified unit direction by the given magnitude. The vertex(ices) may also be moved in the direction of unit normal ( -n flag ). For NURBS surface vertices the direction of movement could also be either in tangent along U or tangent along V. The flags -n, -u, -v and -d are mutually exclusive, ie. the selected vertices can be all moved in only -n or -u or -v or -d.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
direction (d) | float, float, float | ||
|
|||
magnitude (m) | float | ||
|
|||
normalDirection (n) | float | ||
|
|||
uDirection (u) | float | ||
move components in the direction of tangent along U at the respective components where appropriate. The flag is ignored for polygons, NURBS curves. The u direction is normalized. |
|||
uvNormalDirection (uvn) | float, float, float | ||
|
|||
vDirection (v) | float | ||
|
Derived from mel command maya.cmds.moveVertexAlongDirection
Example:
import pymel.core as pm
pm.moveVertexAlongDirection( "nurbsSurface1.cv[1][1]", "pPlane1.vtx[120]", d=[(1, 1, 1), (1, 0, 0)], m=[2.0, 1.0] )
# Move the control vertex on the surface, mesh in the normalized
# directions (1,1,1), (1,0,0) by magnitude 2.0, 1.0 respectively.
pm.moveVertexAlongDirection( "nurbsSurface1.cv[3][1]", "nurbsSurface2.cv[0][0]", "pPlane1.vtx[10]", n=[1, -1.9, 3] )
# Move the control vertex on the NURBS surfaces, mesh along their
# respective unit normals by a magnitudes 1.0, -1.9 and 3.0 respectively.
pm.moveVertexAlongDirection( "nurbsSurface1.cv[4][5]", "nurbsSurface2.cv[0][0]", u=[2.0, 1.0] )
# Move the control vertex on the NURBS surfaces in the normalized
# tangent along U by a magnitude 2.0 and 1.0 respectively.
pm.moveVertexAlongDirection( "nurbsSurface1.cv[2][3]", v=-1.0 )
# Move the control vertex on the nurbsSurface in the normalized
# tangent along V by -1.0
pm.moveVertexAlongDirection( "nurbsSurface1.cv[1][1]", uvn=(1, 2, -1) )
# Move the control vertex on the nurbsSurface in the space defined
# by triad [u,v,n] by 1,2,-1 respectively.
# If the initial vertex position is o(ox,oy,oz) and u,v and n are
# direction vectors then the new position p(px,py,pz) would be:
# p = o + 1*u + 2*v + (-1)*n ;