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

概要

assignInputDevice [-clutch string] [-continuous] [-device string] [-immediate] [-multiple]

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

このコマンドは、コマンド文字列(すなわち MEL スクリプト)を入力デバイスに関連付けます。デバイスが移動するかデバイスのボタンが押されると、あたかもコマンドをウィンドウに入力したかのようにコマンド文字列が実行されます。コマンド文字列がボタンの名前またはデバイスの軸を含む場合、これらのボタン/軸のカレント値が代入されます。ボタンの値は boolean、軸の値は double として通知されます。

このコマンドは、デバイスのボタンをコマンドに関連付けるのに大変便利です。連続的な動きをキャプチャするデバイスを使うには、ディペンデンシー グラフに直接デバイスをアタッチするのがより効果的です。

戻り値

string

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

関連項目

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

フラグ

clutch, continuous, device, immediate, multiple
ロング ネーム(ショート ネーム) 引数型 プロパティ
-device(-d) string
コマンド文字列を割り当てるデバイスを指定します。
-clutch(-c) string
クラッチ ボタンを指定します。コマンド文字列を実行するためには、このボタンが押されている必要があります。 クラッチが指定されていない場合、デバイスの状態が変化する度にコマンド文字列が実行されます。
-multiple(-m)
このフラグが設定されている場合、このデバイスに関連付けられている他のコマンド文字列は削除できません。 デフォルトでは、新規コマンド文字列がデバイスにアタッチされるときは、他のコマンド文字列はすべて削除されます。
-continuous(-ct)
このフラグが設定されている場合、コマンド文字列は連続的に実行されます(デバイスの状態が変化するごとに一度)。デフォルトでは、クラッチ ボタンが指定されている場合、コマンド文字列はボタンが押されたときに一度だけ実行されます。
-immediate(-im)
待ち行列を使わずに即座にコマンドを実行します。

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

MEL 例

assignInputDevice -d "spaceball" -c "Button1" "setKeyframe";

// This command will assign button1 on the spaceball with
// the setKeyframe command.  This is very much like using
// the spaceball buttons as hotkeys.

assignInputDevice -d "midi" -ct -m "currentTime -e Axis0";

// This command will execute the command to set the time
// to the value of the first midi slider.  As the slider
// moves this command will be executed.  So the slider
// will control time.