移動先: 概要 戻り値 フラグ. Python 例.
snapTogetherCtx(
[contextName]
, [clearSelection=boolean], [exists=boolean], [history=boolean], [image1=string], [image2=string], [image3=string], [name=string], [setOrientation=boolean], [snapPolygonFace=boolean])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
snapTogetherCtx は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。
snapTogetherCtx は、サーフェスを一緒にスナップするツールを作成するためのコマンドです。
戻り値の型は照会モードでは照会フラグが基になります。
clearSelection, exists, history, image1, image2, image3, name, setOrientation, snapPolygonFace
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
# Create two nurbs spheres, then move them apart
cmds.sphere(r=3, n='nurbsSphere1')
cmds.move(5, 0, 0)
cmds.sphere(r=3, n='nurbsSphere2')
cmds.move(-5, 0, 0)
# Create a new snap together tool context, set it to move objects only, then switch to it
# You can use this tool to snap two spheres together
cmds.snapTogetherCtx('snapTogetherCtx1', so=False)
cmds.setToolTo('snapTogetherCtx1')