Translate
 
 
 

Translate

Description

Translates elements to an absolute position or by a relative amount. Translation can be performed on all axes, or limited to a specific axis. It can also snap to the 3D grid.

Scripting Syntax

Translate( [InputObjs], [X], [Y], [Z], [Delta], [RefMode], [Center], [AxesFilter], [Snap], [SnapReference], [SnapFilter], [SplitLocalComponents], [PropTagOnly], [Pivot], [PivotX], [PivotY], [PivotZ], [ConstructionMode], [SlideComponents] );

Parameters

Parameter Type Description
InputObjs String List of objects or components to translate.

Default Value: Selected elements

X Double X position

Default Value: 0.0

Y Double Y position

Default Value: 0.0

Z Double Z position

Default Value: 0.0

Delta siDeltaMode Specifies whether the translation is relative or absolute

Default Value: siRelative

RefMode siRefMode The reference mode to translate within

Default Value: siLocal

Center siCenterMode Specifies whether to translate the object or its center.

Note: If an object does not have a moveable center, then translating its center moves the object.

Default Value: siObj

AxesFilter siAxesFilter Determines which of the x,y,z arguments are valid (used with Absolute mode only).

Default Value: siXYZ

Snap Boolean Specifies whether to snap the translation values to the nearest 3D grid increment

Default Value: False

SnapReference String Object Name reference frame for snap filtering.
SnapFilter siAxesFilter Optional x,y,z absolute snap filter

Default Value: siXYZ

SplitLocalComponents Boolean Specifies whether to translate all components independently in Local mode

Default Value: False

PropTagOnly Boolean Specifies whether to restrict proportional to tagged components only

Default Value: False

Pivot Boolean If true the specified global pivot point is used for snapping

Default Value: False

PivotX Double X position of the pivot point

Default Value: 0.0

PivotY Double Y position of the pivot point

Default Value: 0.0

PivotZ Double Z position of the pivot point

Default Value: 0.0

ConstructionMode siConstructionMode In which construction mode will the deformation be applied. This only applies when translating geometry components.

Default Value: Use the current construction mode

SlideComponents Boolean Constrain components to surface during translation. Works like shrink wrap for points/polygons while edges are constrained along adjacent polygon edges. Currently only supported for mesh objects.

Default Value: False

Examples

VBScript Example

' Create a Sphere
CreatePrim "Sphere", "NurbsSurface", "MySphere"
' Translate the Sphere by (6,6,6) using siRelative mode
translate "MySphere", 2, 2, 2, siRelative
translate "MySphere", 2, 2, 2, siRelative
translate "MySphere", 2, 2, 2, siRelative
' Translate the Sphere to (2,2,2) using Absolute mode
translate "MySphere", 2, 2, 2, siAbsolute, , , siXYZ
' Return to position (0,0,0)
translate "MySphere", , , , siAbsolute

See Also

Scale Rotate ResetTransform