移動先: 概要 戻り値 フラグ. 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
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: 1 つのコマンドで複数回使用可能なフラグ
|
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.