Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
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.boolean | true/false |
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
alignToLead(atl)
|
boolean
|
|||
|
||||
coordinateSystem(cs)
|
name
|
|||
|
||||
xAxis(x)
|
string
|
|||
|
||||
yAxis(y)
|
string
|
|||
|
||||
zAxis(z)
|
string
|
|||
|
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. |
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)