移動先: 概要 戻り値 フラグ. MEL 例.

概要

buttonManip [-icon string] script [selectionItem]

buttonManip は 「元に戻す」が可能、「照会」が不可能「編集」が不可能 です。

このコマンドは、ボタン マニピュレータを作成します。このマニピュレータは空間内に位置し、位置決めのために 3 ポイント マニピュレータを持っています。マニピュレータの上部をクリックすると、1 番目の引数によって定義されたコマンドが実行されます。このコマンドは、作成されたときのマニピュレータに関連付けられています。

DAG オブジェクトがコマンド ラインに含まれる場合、マニピュレータはそのオブジェクトにペアレント化されます。これは、オブジェクトを移動すると、マニピュレータも移動することを意味します。三つ組のマニピュレータを使って、マニピュレータをオブジェクトと独立して移動することができます。

buttonManip は複数のオブジェクトに対してペアレント化できないことに注意してください。

戻り値

なし

フラグ

icon
ロング ネーム(ショート ネーム) 引数型 プロパティ
-icon(-i) string create
マニピュレータを表すアイコンを指定します。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : 1 つのコマンドで複数回使用可能なフラグ

MEL 例

//    Example 1.
//
//    Create a button manipulator that will be parented to a sphere and will
//    print "Button Manipulator" whenever it is pressed.
//
//    Note that moving the sphere will also move the manipulator.
//
string $sphere[] = `sphere`;
buttonManip "print \"Button Manipulator\\n\"" $sphere[0];

//    Example 2.
//
//    Create a button manipulator that will execute the 'setKeyframe' command
//    when it is pressed.
//
buttonManip "setKeyframe";