ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.
assignInputDevice [-clutch string] [-continuous] [-device string] [-immediate] [-multiple]
assignInputDevice は、取り消し可能、照会可能、および編集不可能です。
このコマンドは、コマンド文字列(すなわち MEL スクリプト)を入力デバイスに関連付けます。デバイスが移動するかデバイスのボタンが押されると、あたかもコマンドをウィンドウに入力したかのようにコマンド文字列が実行されます。コマンド文字列がボタンの名前またはデバイスの軸を含む場合、これらのボタン/軸の現在値が代入されます。ボタンの値は boolean、軸の値は double として通知されます。
このコマンドは、デバイスのボタンをコマンドに関連付けるのに大変便利です。連続的な動きをキャプチャするデバイスを使うには、ディペンデンシー グラフに直接デバイスをアタッチするのがより効果的です。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
attachDeviceAttr, detachDeviceAttr, devicePanel, getInputDeviceRange, getModifiers, listDeviceAttachments, listInputDeviceAxes, listInputDeviceButtons, listInputDevices, recordAttr, setAttrMapping, setInputDeviceMapping, unassignInputDevice
clutch, continuous, device, immediate, multiple
| ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
|
-clutch(-c)
|
string
|
|
|
クラッチ ボタンを指定します。コマンド文字列を実行するためには、このボタンが押されている必要があります。クラッチが指定されていない場合、デバイスの状態が変化する度にコマンド文字列が実行されます。
|
|
-continuous(-ct)
|
|
|
|
このフラグが設定されている場合、コマンド文字列は連続的に実行されます(デバイスの状態が変化するごとに一度)。既定では、クラッチ ボタンが指定されている場合、コマンド文字列はボタンが押されたときに一度だけ実行されます。
|
|
-device(-d)
|
string
|
|
|
|
-immediate(-im)
|
|
|
|
|
-multiple(-m)
|
|
|
|
このフラグが設定されている場合、このデバイスに関連付けられている他のコマンド文字列は削除できません。既定では、新規コマンド文字列がデバイスにアタッチされるときは、他のコマンド文字列はすべて削除されます。
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
コマンド内でフラグを複数回使用できます。
|
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.