ジャンプ先: 概要. 戻り値. フラグ. MEL 例.
setAttrMapping [-absolute] [-attribute string] [-axis string] [-clutch string] [-device string] [-offset float] [-relative] [-scale float] [-selection]
setAttrMapping は、取り消し可能、照会可能、および編集不可能です。
このコマンドは、指定したデバイス アタッチメントにオフセットとスケールを適用します。このコマンドは、デバイスの軸にマッピングを適用する setInputDeviceMapping コマンドとは異なります。
このコマンドは、デバイスからの値にスケールを乗算し、この結果にオフセットを追加します。絶対マッピングでは、アタッチされたアトリビュートは結果の値を取得します。相対マッピングの場合は、前の計算値に結果の値が追加されます。setInputDeviceMapping が定義されている場合、計算値はそれも考慮します。
たとえば、絶対アタッチメント マッピングを使用してスペース ボールを設定する場合、スペース ボールを一方向に押すと、アタッチされたアトリビュートは定数値を取得します。相対マッピングを使用した場合は、スペースボールを一方向に押すと、アタッチされたアトリビュートは常に増加する(または常に減少する)値を取得します。
相対の定義は、setInputDeviceMapping コマンドで使用される定義とは異なることに注意してください。一般的に、相対アタッチメント マッピング(このコマンド)と相対デバイス マッピング(setInputDeviceMapping)の両方を同じ軸で一緒に使用することはできません。
なし
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
absolute, attribute, axis, clutch, device, offset, relative, scale, selection
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
コマンド内でフラグを複数回使用できます。
|
attachDeviceAttr -d "spaceball" -ax "XAxis" -at "translateX";
setAttrMapping -d "spaceball" -ax "XAxis" -at "translateX" -scale 0.01;
// The first command will assign the XAxis of the spaceball to
// the translateX attribute of the selected objects.
// The second command sets the scaling of attribute value to
// 0.01 of the value of the axis. This results in finer control
// since the motions of the spaceball are damped.