移動先: 概要 戻り値 関連項目. フラグ. MEL 例.

概要

attachDeviceAttr [-attribute string] [-axis string] [-camera] [-cameraRotate] [-cameraTranslate] [-clutch string] [-device string] [-selection]

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

このコマンドは、デバイス/軸ペアをノード/アトリビュート ペアに関連付けます。 デバイス軸が移動するときに、アトリビュートの値は軸の値に設定されます。この値は、setAttrScale コマンドを使用してスケールとオフセットすることができます。

戻り値

なし

戻り値の型は照会モードでは照会フラグが基になります。

関連項目

assignInputDevice, detachDeviceAttr, devicePanel, getInputDeviceRange, getModifiers, listDeviceAttachments, listInputDeviceAxes, listInputDeviceButtons, listInputDevices, recordAttr, setAttrMapping, setInputDeviceMapping, unassignInputDevice

フラグ

attribute, axis, camera, cameraRotate, cameraTranslate, clutch, device, selection
ロング ネーム(ショート ネーム) 引数型 プロパティ
-device(-d) string create
コマンド文字列を割り当てるデバイスを指定します。
-clutch(-c) string create
クラッチ ボタンを指定します。コマンド文字列を実行するためには、このボタンが押されている必要があります。 クラッチが指定されていない場合、デバイスの状態が変化する度にコマンド文字列が実行されます。
-attribute(-at) string createmultiuse
アタッチ先のアトリビュートを指定します
-axis(-ax) string create
アタッチ元の軸を指定します。
-selection(-sl) create
このフラグはセレクション リストのノードにアタッチします。 選択を変更するとアタッチメントも変更されるので、コマンドのデフォルト引数とは異なります。
-camera(-cam) create
このフラグはデバイス/軸をカレント カメラにアタッチします。 デバイス軸とカメラ コントロールの間のマッピングでは、デバイス記述に基づいて経験則を利用します。 そのインタラクションは、マウスやカメラのナビゲーション コントロールのコピーです。
-cameraTranslate(-ct) create
このフラグは、カレント カメラの移動コントロールにデバイス/軸をアタッチします。
-cameraRotate(-cr) create
このフラグは、カレント カメラの回転コントロールにデバイス/軸をアタッチします。

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

MEL 例

attachDeviceAttr -d "spaceball" -ax "XAxis" "surface1.translateX";

// This command will assign the XAxis of the spaceball to
// the translateX attribute of surface1.  This
// assignment is independent of the selection list (i.e.
// if surface1 was selected when the command is executed,
// surface1 will be translated by the spaceball regardless
// of the current selection.)

attachDeviceAttr -d "spaceball" -ax "XAxis" -at translateX;

// This command will assign the XAxis of the spaceball to
// the translateX attribute of the selected objects.

attachDeviceAttr -d "wacom" -ax "puck:X" -c "puckButton1" -at "translateX" -sl;
attachDeviceAttr -d "wacom" -ax "puck:Y" -c "puckButton1" -at "translateY" -sl;

// This command will attach the wacom puck X and Y axes to the
// X and Y translate attributes of the selected items.
// When the selection changes so does the attachment.
// The -c option means you can only move the selected items
// with the puck when button1 on the puck is down.