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

概要

makeIdentity [-apply boolean] [-jointOrient] [-normal uint] [-rotate boolean] [-scale boolean] [-translate boolean] [dagObject]

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

選択したトランスフォーム、およびシェイプレベルまでのすべての子を ID 変換でリセットする、高速な方法です。選択したトランスフォーム結果から適用されるトランスフォーム、回転、スケールを指定することもできます。 ID 変換には以下の意味があります。 トランスフォームがジョイントである場合、「translate」アトリビュートは 0 でないことがありますが、ジョイントを配置してワールド空間での位置を保持するために使用されます。ジョイントはワールド空間での位置を保持する必要があるので、translate フラグはジョイントに適用されません。rotate フラグと scale フラグのみが、ジョイントに適用されると効果があります。 -a/apply フラグを true にすると、リセットされるトランスフォームは累積され、修正されたトランスフォームの下にあるすべてのシェイプに適用されるので、シェイプは移動しません。ピボット位置は、ワールド空間で移動しないように再計算されます。 このフラグを false にすると、位置を保持するように変更せずに、トランスフォームが ID にリセットされます。

戻り値

なし

フラグ

apply, jointOrient, normal, rotate, scale, translate
ロング ネーム(ショート ネーム) 引数型 プロパティ
-apply(-a) boolean create
true にすると、トランスフォーム ピボットのワールド空間での位置が保持されてシェイプが移動しないように、トランスフォームが ID になった後で、累積されたトランスフォームがシェイプに適用されます。デフォルトは false です。
-translate(-t) boolean create
true にすると、平行移動のみがシェイプに適用されます。 平行移動は、0, 0, 0 に変更されます。 translate フラグ、rotate フラグ、scale フラグを指定しないと、すべての(t, r, s)が適用されます。 (注: translate フラグは、ジョイントに適用しても効果がありません。ジョイントではワールド空間での位置が保持されるからです。このフラグはジョイントに影響しません。
-rotate(-r) boolean create
true にすると、回転のみがシェイプに適用されます。 回転は、0, 0, 0 に変更されます。 translate フラグ、rotate フラグ、scale フラグを指定しないと、すべての(t, r, s)が適用されます。
-scale(-s) boolean create
true にすると、スケールのみがシェイプに適用されます。 スケール係数は、1, 1, 1 に変更されます。 translate フラグ、rotate フラグ、scale フラグを指定しないと、すべての(t, r, s)が適用されます。
-jointOrient(-jo) create
設定すると、ジョイントの方向がリセットされワールド座標空間にアラインされます。
-normal(-n) uint create
1 に設定すると、ポリゴン オブジェクトの法線がフリーズ(ロック)されます。このフラグは、-apply フラグがオンの場合のみ有効です。 2 に設定すると、ポリゴン オブジェクトの法線はリジッドでない変換行列、つまりシア、傾斜または不均等スケールなどを含まないトランスフォームの場合のみフリーズされます。 デフォルトでは法線はフリーズされません。

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

MEL 例

// Example 1:  Create a hierarchical object, for example a
// car. Scale the tires, translate the doors into place, rotate the
// steering wheel, then select the group node above the car, and type:

   makeIdentity -apply true;
// The car should not move.

   move 3 0 0;
// The car should move exactly 3 units to (3, 0, 0), since
// the previous makeIdentity command set its translation to (0, 0, 0).

   makeIdentity;
// The car should return to the same position as before the move.

// Example 2:  Create a curve and translate, rotate and scale it.
// Then group it and translate, rotate and scale the group.

   makeIdentity -apply true -translate true group1;
// The curve will not move, but both the curve transform's and group
// transform's translation will be set to 0, 0, 0. The rotation and
// scale will remain the same.

   makeIdentity -apply true -rotate true group1;
// The curve will not move, but both the curve transform's and group
// transform's rotation will be set to 0, 0, 0. The translation and
// scale will remain the same.

   makeIdentity -apply true -scale true group1;
// The curve will not move, but both the curve transform's and group
// transform's scale will be set to 1, 1, 1. The translation and rotation
// will remain the same.

   makeIdentity -apply true -translate true -rotate true group1;
// The curve will not move, but both the curve transform's and group
// transform's translation and rotation will be set to 0, 0, 0.
// The scale will remain the same.

   makeIdentity -apply false -translate true group1;
// The curve transform and group transform will have their translation
// set to 0, 0, 0. The curve will probably move, since the apply
// flag is false.

   makeIdentity -apply true -translate true -rotate true -scale true;
// This is the same as "makeIdentity -apply true".

// Example 3:  Create a polyCube and translate, rotate and scale it.
// And then freeze the normals.

   polyCube;
   rotate 30 45 0;
   move -r 2 0 2;
   scale -r 2 1 2;
   makeIdentity -apply true -t 1 -r 1 -s 1 -n 2;