Align
 
 
 

Align

Description

Aligns selected objects according to their bounding boxes

Scripting Syntax

Align( [InputObjs], [AlignAxes], [PosX], [PosY], [PosZ], [RefX], [RefY], [RefZ], [AllObjects] );

Parameters

Parameter Type Description
InputObjs String List of objects to align.

Default Value: Selected objects

AlignAxes siAxesFilter Specifies which axes to align on

Default Value: siY

PosX siAlignModes Type of alignment along X

Default Value: siAlignGMIDDLE

PosY siAlignModes Type of alignment along Y

Default Value: siAlignGMIDDLE

PosZ siAlignModes Type of alignment along Z

Default Value: siAlignGMIDDLE

RefX siAlignModes Type of alignment reference along X

Default Value: siAlignGMIDDLE

RefY siAlignModes Type of alignment reference along Y

Default Value: siAlignGMIDDLE

RefZ siAlignModes Type of alignment reference along Z

Default Value: siAlignGMIDDLE

AllObjects Boolean Align All Objects (vs align relative to the first object)

Default Value: True

Examples

VBScript Example

' Create some objects
dim obj1, obj2, obj3
set obj1 = GetPrim( "Cube" )
set obj2 = GetPrim( "Cube" )
set obj3 = GetPrim( "Cube" )
' Move the objects apart
SelectObj obj1, , True
AddToSelection obj2, , True
AddToSelection obj3, , True
Scale , 0.5, 0.5, 0.5
Translate obj1, -4.5, 1, 0
Translate obj3,  4.5,-1, 0
' Align the selected objects so they all match the minimum Y value of the selected objects.
Align , siY, , siAlignFMIN

See Also

MoveCtr2Vertices