ジャンプ先: 概要. 戻り値. 関連項目. フラグ. MEL 例.

概要

aimConstraint [-aimVector float float float] [-layer string] [-maintainOffset] [-name string] [-offset float float float] [-remove] [-skip string] [-targetList] [-upVector float float float] [-weight float] [-weightAliasList] [-worldUpObject name] [-worldUpType string] [-worldUpVector float float float] [target...] object

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

オブジェクトの方向がターゲット オブジェクト、または複数のターゲットの平均位置を指すようにコンストレインします。 aimConstraint は、入力として、単一の「コンストレイン オブジェクト」の DAGトランスフォームを指す、1 つまたは複数の「ターゲット」の DAGトランスフォームを取ります。オブジェクトのローカル座標系の aimVector がワールド空間位置のターゲット オブジェクトの加重平均を指すように、aimConstraint はコンストレインされたオブジェクトを方向付けます。オブジェクトのローカル座標系のアップ ベクトルは、 ワールド空間で worldUpVector にアラインされます。

戻り値

string[] 作成されたコンストレイン ノード名

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

関連項目

geometryConstraint, normalConstraint, orientConstraint, parentConstraint, pointConstraint, poleVectorConstraint, scaleConstraint, tangentConstraint

フラグ

aimVector, layer, maintainOffset, name, offset, remove, skip, targetList, upVector, weight, weightAliasList, worldUpObject, worldUpType, worldUpVector
ロング ネーム(ショート ネーム) 引数型 プロパティ
-name(-n) string createqueryedit
コンストレイン ノードの名前を指定した名前に設定します。デフォルト名は constrainedObjectName_constraintType です。
-weight(-w) float createqueryedit
指定したターゲットのウェイト値を設定します。 作成時に指定していない場合は、デフォルト値の 1.0 が使用されます。
-remove(-rm) edit
リストされたターゲットをコンストレインから削除します。
-targetList(-tl) query
ターゲット オブジェクトのリストを返します。
-weightAliasList(-wal) query
ターゲット オブジェクトのウェイトをコントロールする、アトリビュートの名前を返します。targetList フラグで返されるターゲットと同じ順序で、エイリアスを返します。
-layer(-l) string createedit
コンストレインを追加するアニメーション レイヤの名前を指定します。
-aimVector(-aim) float float float createqueryedit
エイム ベクトルを設定します。ターゲットを示すローカル座標でのベクトルです。作成時に指定していない場合、デフォルト値の(0.0, 1.0, 0.0)が使用されます。
-upVector(-u) float float float createqueryedit
ローカル アップ ベクトルを設定します。これは、ワールド アップ ベクトルとアラインするローカル座標内でのベクトルです。作成時に指定していない場合、デフォルト値の(1.0, 0.0, 0.0)が使用されます。
-worldUpVector(-wu) float float float createqueryedit
ワールド アップ ベクトルを設定します。これは、アップ ベクトルとアラインする必要のあるワールド座標内のベクトルです。 詳細については、-wut/worldUpType(下記)を参照してください。 作成時に指定していない場合、デフォルト値の(1.0, 0.0, 0.0)が使用されます。
-worldUpObject(-wuo) name createqueryedit
DAG オブジェクトを worldUpType "object" および「objectrotation」で使用するように設定します。詳細については、worldUpType を参照してください。 デフォルト値は、ワールド空間座標として解釈される非アップ オブジェクトです。
-worldUpType(-wut) string createqueryedit
ワールド アップ ベクトル計算のタイプを設定します。 worldUpType は、「scene」、「object」、「objectrotation」、「vector」、または「none」です。 「scene」の場合、upVector はシーンのアップ軸にアラインされ、worldUpVector および worldUpObject は無視されます。 「object」の場合、upVector は worldUpObject の空間の原点にできるだけ近い位置に配置され、worldUpVector は無視されます。 「objectrotation」の場合、worldUpVector は worldUpObject の座標空間にあるものと解釈され、ワールド空間にトランスフォームされて upVector はその結果にできるだけ近くアラインされます。 「vector」の場合、upVector は worldUpVector にできるだけ近くアラインされ、worldUpMatrix は無視されます。 最後に「none」の場合は、コンストレインでツイストの計算は実行されません。その結果、 「upVector」の方向はコンストレインされたオブジェクトの以前の方向に基づくようになり、 「great circle」回転には、エイム ベクトルをそのコンストレインとアラインすることが必要になります。 デフォルトの worldUpType は「vector」です。
-offset(-o) float float float createqueryedit
オフセットの値を設定または照会します。デフォルトは 0,0,0 です。
-maintainOffset(-mo) create
コンストレインされたオブジェクトの初期回転角度の保持に必要なオフセットを計算し、オフセットとして使用します。
-skip(-sk) string createeditmultiuse
省略する軸を指定します。有効な値は、「x」、「y」、「z」、「none」です。作成時のデフォルトは「none」です。

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

MEL 例

// Orients the aim vector of cube1 in it's local coordinate space, to point at cone1.
aimConstraint  cone1 cube1;

// Uses the average of the position of cone1 and surf2.
aimConstraint -w .1 cone1 surf2 cube2;

// Sets the weight for cone1's effect on cube2 to 10.
aimConstraint -e -w 10. cone1 cube2;

// Removes surf2 from cube2's aimConstraint.
aimConstraint -e -rm surf2 cube2;

// Adds surf3 to cube2's aimConstraint with the default weight.
aimConstraint surf3 cube2;

// Aim constrain the z-axis only of sph2 to sph1
aimConstraint -skip x -skip y sph1 sph2;