Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

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

makeIdentity is undoable, NOT queryable, and NOT editable.

The makeIdentity command is a quick way to reset the selected transform and all of its children down to the shape level by the identity transformation. You can also specify which of transform, rotate or scale is applied down from the selected transform. The identity transformation means: If a transform is a joint, then the "translate" attribute may not be 0, but will be used to position the joints so that they preserve their world space positions. The translate flag doesn't apply to joints, since joints must preserve their world space positions. Only the rotate and scale flags are meaningful when applied to joints. If the -a/apply flag is true, then the transforms that are reset are accumulated and applied to the all shapes below the modified transforms, so that the shapes will not move. The pivot positions are recalculated so that they also will not move in world space. If this flag is false, then the transformations are reset to identity, without any changes to preserve position.

Return value

None

Flags

apply, jointOrient, normal, rotate, scale, translate
Long name (short name) Argument types Properties
-apply(-a) boolean create
If this flag is true, the accumulated transforms are applied to the shape after the transforms are made identity, such that the world space positions of the transforms pivots are preserved, and the shapes do not move. The default is false.
-translate(-t) boolean create
If this flag is true, only the translation is applied to the shape. The translation will be changed to 0, 0, 0. If neither translate nor rotate nor scale flags are specified, then all (t, r, s) are applied. (Note: the translate flag is not meaningful when applied to joints, since joints are made to preserve their world space position. This flag will have no effect on joints.)
-rotate(-r) boolean create
If this flag is true, only the rotation is applied to the shape. The rotation will be changed to 0, 0, 0. If neither translate nor rotate nor scale flags are specified, then all (t, r, s) are applied.
-scale(-s) boolean create
If this flag is true, only the scale is applied to the shape. The scale factor will be changed to 1, 1, 1. If neither translate nor rotate nor scale flags are specified, then all (t, r, s) are applied.
-jointOrient(-jo) create
If this flag is set, the joint orient on joints will be reset to align with worldspace.
-normal(-n) uint create
If this flag is set to 1, the normals on polygonal objects will be frozen. This flag is valid only when the -apply flag is on. If this flag is set to 2, the normals on polygonal objects will be frozen only if its a non-rigid transformation matrix. ie, a transformation that does not contain shear, skew or non-proportional scaling. The default behaviour is not to freeze normals.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// 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;