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

概要

normalConstraint [-aimVector float float float] [-layer string] [-name string] [-remove] [-targetList] [-upVector float float float] [-weight float] [-weightAliasList] [-worldUpObject name] [-worldUpType string] [-worldUpVector float float float] [target...] object

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

ターゲット サーフェスの法線に基づき、オブジェクトの方向をオブジェクトの最も近いポイントにコンストレインします。 normalConstraint は、入力データとして、1 つまたは複数のサーフェス シェイプ(ターゲット)および DAGトランスフォーム ノード(オブジェクト)を取ります。normalConstraint は、コンストレインされたオブジェクトを、エイムベクトル(そのオブジェクトのローカル座標系の)がワールド空間で統合法線ベクトルにアラインされるように方向付けます。オブジェクトのローカル座標系のアップ ベクトルは、 ワールド空間で worldUpVector にアラインされます。統合法線のベクトルは、各ターゲット サーフェスのコンストレインされたオブジェクトに最も近い法線ベクトルの加重平均です。

戻り値

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

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

関連項目

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

フラグ

aimVector, layer, name, remove, 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」です。

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

MEL 例

normalConstraint  surf1 cube1;
// orients the aim vector of cube1 in it's local coordinate space,
// to the normal vector of surf1 at the closest point to  cube1.

normalConstraint -w .1 surf1 surf2 cube2;
// uses the average of the normals from surf1 and surf2.

normalConstraint -e -w 10. surf1 cube2;
// sets the weight for surf1's effect on cube2 to 10.

normalConstraint -e -rm surf2 cube2;
// removes surf2 from cube2's normalConstraint.

normalConstraint surf3 cube2;
// adds surf3 to cube2's normalConstraint with the default weight.