ジャンプ先: 概要. 戻り値. フラグ. Python 例.

概要

moveVertexAlongDirection([direction=[float, float, float]], [magnitude=linear], [normalDirection=linear], [uDirection=linear], [uvNormalDirection=[linear, linear, linear]], [vDirection=linear])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

moveVertexAlongDirection は、取り消し可能、照会不可能、および編集不可能です。

選択したコントロール頂点(CV)が、指定した単位方向に特定規模だけ移動します。頂点は、単位法線(-n フラグ)の方向にも移動できます。NURBS サーフェス頂点の場合、移動方向は、U に沿った接線か V に沿った接線になります。フラグ -n、-u、-v、および -d は、相互に排他的です。つまり、選択した頂点はすべて、-n、-u、-v、または -d でのみ移動することができます。

戻り値

なし

フラグ

direction, magnitude, normalDirection, uDirection, uvNormalDirection, vDirection
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
direction(d) [float, float, float] createmultiuse
指定した方向に頂点が移動します。方向は正規化されます。
magnitude(m) linear createmultiuse
指定した規模だけ方向ベクトルで移動します。
normalDirection(n) linear createmultiuse
それぞれのコンポーネントの特定規模だけ、法線方向にコンポーネントが移動します。法線は「正規化」されます。
uDirection(u) linear createmultiuse
適切である場合は、それぞれのコンポーネントで U に沿った接線方向にコンポーネントが移動します。このフラグは、ポリゴンと NURBS カーブで無視されます。U 方向は正規化されます。
uvNormalDirection(uvn) [linear, linear, linear] createmultiuse
指定したディスプレイスメントでそれぞれのコンポーネントの三つ組み空間 [u,v,n] で移動されます。このフラグは、ポリゴンと NURBS カーブで無視されます。
vDirection(v) linear createmultiuse
適切である場合は、それぞれのコンポーネントで V に沿った接線方向にコンポーネントが移動します。このフラグは、ポリゴンと NURBS カーブで無視されます。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

import maya.cmds as cmds

cmds.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.

cmds.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.

cmds.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.

cmds.moveVertexAlongDirection( "nurbsSurface1.cv[2][3]", v=-1.0 )
# Move the control vertex on the nurbsSurface in the normalized
# tangent along V by -1.0

cmds.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 ;