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

Synopsis

matchTransform [-pivots] [-position] [-positionX] [-positionY] [-positionZ] [-rotatePivot] [-rotation] [-rotationX] [-rotationY] [-rotationZ] [-scale] [-scaleBox] [-scalePivot] [-scaleX] [-scaleY] [-scaleZ] [objects...]

matchTransform is undoable, NOT queryable, and NOT editable.

This command modifies the source object's transform to match the target object's transform.

If no flags are specified then the command will match position, rotation and scaling.

Return value

None

Flags

pivots, position, positionX, positionY, positionZ, rotatePivot, rotation, rotationX, rotationY, rotationZ, scale, scaleBox, scalePivot, scaleX, scaleY, scaleZ
Long name (short name) Argument types Properties
-pivots(-piv) create
Match the source object(s) scale/rotate pivot positions to the target transform's pivot.
-position(-pos) create
Match the source object(s) position to the target object.
-positionX(-px) create
Match the source object(s) X position to the target object.
-positionY(-py) create
Match the source object(s) Y position to the target object.
-positionZ(-pz) create
Match the source object(s) Z position to the target object.
-rotatePivot(-rp) create
Match the source object(s) rotate pivot position to the target transform's pivot.
-rotation(-rot) create
Match the source object(s) rotation to the target object.
-rotationX(-rx) create
Match the source object(s) X rotation to the target object.
-rotationY(-ry) create
Match the source object(s) Y rotation to the target object.
-rotationZ(-rz) create
Match the source object(s) Z rotation to the target object.
-scale(-scl) create
Match the source object(s) scale to the target transform.
-scaleBox(-box) create
Use the source/target object's child bounding box size when matching scaling.
-scalePivot(-sp) create
Match the source object(s) scale pivot position to the target transform's pivot.
-scaleX(-sx) create
Match the source object(s) X scale to the target object.
-scaleY(-sy) create
Match the source object(s) Y scale to the target object.
-scaleZ(-sz) create
Match the source object(s) Z scale to the target object.

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

// create a cone and randomly transform it
polyCone -n cone1;
scale 0.2 2.0 0.2;
rotate 20 45 70;
move -2 0 2;

// create a cylinder
polyCylinder -n cylinder1;

// modify the cylinder's transform to match the cone
matchTransform cylinder1 cone1;