Interfaces > Core Interfaces > PlacementTool |
The PlacementTool Core Interface exposes the Placement Tool's controls and functionality to MAXScript. Available in 3ds Max 2015 and higher.
PlacementTool.ActiveMode : bool : Read|Write
Get/set the Enabled state of the Placement Tool.
When set to False (default), the Placement Tool will be disabled.
When set to True, selected objects can be placed interactively in the scene by performing ray intersection will all other scene geometry, or can be rotated in place depending on the PlacementTool.RotateMode property state.
PlacementTool.RotateMode : bool : Read|Write
Get/set the state of the Rotate mode.
When set to False (default), moving the mouse in the viewport will perform ray intersection with the scene geometry and place the selection to the intersection point.
When set to True, moving the mouse up and down will rotate the selected objects about their up axes.
PlacementTool.UseBase : bool : Read|Write
Get/set the state of Use Base As Pivot option.
When set to False (default), the object's pivot will be used to perform the alignment / rotation.
When set to True, the base of the object will be used instead.
PlacementTool.PillowMode : bool : Read|Write
Get/set the state of the Pillow Mode option.
PlacementTool.AutoParent : bool : Read|Write
Get/set the state of the Auto-Parent option.
When set to False (default), objects will be placed without changing parent-child relationship.
When set to True, objects will be automatically parented to the object whose surface they were placed on.
PlacementTool.UpAxis : enum : Read|Write UpAxis enums: {#Positive_X | #Positive_Y | #Positive_Z | #Negative_X | #Negative_Y | #Negative_Z}
Get/set the state of the Object Up Axis option.
This option controls which axis of the placed object will be oriented along the surface's normal.
<void>PlacementTool.ShowOptionDialog()
NEW in 3ds Max 2016: Opens the "Placement Settings" options dialog.
<INTPTR>PlacementTool.GetCommandMode()
NEW in 3ds Max 2016: Returns the command mode of the Placement Tool as a Pointer value.
<value>PlacementTool.HitTestScene <&ray>Ray Ray is In parameter
Performs a hit test against the scene using the ray value passed as by-reference In parameter.
<bool>PlacementTool.PlaceNode <time>Time <node>SelectedNode <&point3>Position <&point3>Normal <node>TargetNode <bool>bRotateUpAxisToNormal Position is In parameter Normal is In parameter
Places the specified node on the surface of the specified target at the given time using the Position and Normal values acquired from the PlacementTool.HitTestScene() method.
The Time argument specifies the time at which to evaluate the objects.
The SelectedNode argument provides the node to be placed.
The &Position argument passes the position as a by-reference in parameter.
The &Normal argument passes the Normal vector as a by-reference in parameter.
The TargetNode argument specifies the node whose surface to use for placement.
The bRotateUpAxisToNormal boolean argument specifies whether to orient the up axis (determined by PlacementTool.UpAxis ) of the placed node to the surface normal at the intersection point.