ジャンプ先: 概要. 戻り値. 関連. フラグ. 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[]作成されたコンストレイント ノード名

照会モードでは、戻り値のタイプは照会されたフラグに基づきます。

関連

orientConstraint, parentConstraint, pointConstraint, poleVectorConstraint

フラグ

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」です。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

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;