Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.

Synopsis

align([alignToLead=boolean], [coordinateSystem=name], [xAxis=string], [yAxis=string], [zAxis=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

align is undoable, NOT queryable, and NOT editable.

Align or spread objects along X Y and Z axis.

Return value

booleantrue/false

Keywords

objects, move, align

Related

move

Flags

alignToLead, coordinateSystem, xAxis, yAxis, zAxis
Long name (short name) Argument types Properties
alignToLead(atl) boolean create
When set, the min, center or max values are computed from the lead object. Otherwise, the values are averaged for all objects.
Default is false
coordinateSystem(cs) name create
Defines the X, Y, and Z coordinates. Default is the world coordinates
xAxis(x) string create
Any of none, min, mid, max, dist, stack.
This defines the kind of alignment to perfom, default is none.
yAxis(y) string create
Any of none, min, mid, max, dist, stack.
This defines the kind of alignment to perfom, default is none.
zAxis(z) string create
Any of none, min, mid, max, dist, stack.
This defines the kind of alignment to perfom, default is none.

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 have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# align the selected objects to their average mid-point in x
cmds.align(x='mid')
# align the selected objects to the mid-point in x of the first select object
cmds.align(x='mid', alignToLead=True)