移動先: 概要 戻り値 フラグ. Python 例.
autoPlace([useMouse=boolean])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
autoPlace は 「元に戻す」が可能、「照会」が不可能、「編集」が不可能 です。
カレントのモデリング ペインの中心のポイントを取って、ライブ サーフェスに投影します。
ポイントは 3 次元で返されます。
um/useMouse フラグが設定されている場合、モデル ペインの中心ではなく、現在のマウスの位置が使用されます。
useMouse
ロング ネーム(ショート ネーム) |
引数型 |
プロパティ |
useMouse(um)
|
boolean
|
|
|
アクティブ ビューの中心ではなく、カレントのマウスの位置を使用します。
|
|
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
# Move the scene around a bit so the grid is no longer
# centered in the view.
#
cmds.track( right=10 )
cmds.track( down=10 )
# Create a sphere.
#
sphere = cmds.sphere()
# Reposition the sphere so that it is in the center of the
# view.
#
position = cmds.autoPlace()
cmds.move( position[0], position[1], position[2], sphere[0], relative=True )