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

概要

autoPlace([useMouse=boolean])

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

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

現在のモデリング ペインの中心のポイントを取って、ライブ サーフェスに投影します。ポイントは 3 次元で返されます。um/useMouse フラグが設定されている場合、モデル ペインの中心ではなく、現在のマウスの位置が使用されます。

戻り値

float[]3D 空間での配置場所

フラグ

useMouse
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
useMouse(um) boolean create
アクティブ ビューの中心ではなく、現在のマウスの位置を使用します。

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

Python 例

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 )