pymel.core.modeling.moveVertexAlongDirection

moveVertexAlongDirection(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
direction (d) float, float, float ../../../_images/create.gif
 
move the vertex along the direction as specified. The direction is normalized.
magnitude (m) float ../../../_images/create.gif
 
move by the specified magnitude in the direction vector. Flag can have multiple arguments, passed either as a tuple or a list.
normalDirection (n) float ../../../_images/create.gif
 
move components in the direction of normal by the given magnitude at the respective components. The normal is ‘normalized’.
uDirection (u) float ../../../_images/create.gif
 

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 ../../../_images/create.gif
 
move in the triad space [u,v,n] at the respective components by the specified displacements. The flag is ignored for polygons, NURBS curves.
vDirection (v) float ../../../_images/create.gif
 
move components in the direction of tangent along V at the respective components where appropriate. The flag is ignored for polygons, NURBS curves.

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 ;

Previous topic

pymel.core.modeling.manipOptions

Next topic

pymel.core.modeling.multiProfileBirailSurface

Core

Core Modules

Other Modules

This Page