Your Ad Here

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

Synopsis

align([alignToLead=boolean], [coordinateSystem=select], [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.

Flags

alignToLead, coordinateSystem, xAxis, yAxis, zAxis
Long name (short name) [argument types] Properties
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.
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) select create
Defines the X, Y, and Z coordinates. Default is the world coordinates

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.

Return value


boolean true/false

Keywords

objects, move, align

Related

move

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)
	

Return to Autodesk Index


Your Ad Here