SetReferencePlane
 
 
 

SetReferencePlane

Introduced

v1.5

Description

Sets an existing reference plane based on the selection

Scripting Syntax

SetReferencePlane( Target, [InputObj] );

Parameters

Parameter Type Description
Target String Object to set.
InputObj String List reference object.

Default Value: Current selection.

Examples

VBScript Example

'
'       This example shows how to initialize the current reference frame and use it. 
'
NewScene 
CreatePrim "Sphere", "MeshSurface" 
Rotate , 0, 0, 45, siAbsolute, siParent, siObj, siZ 
CreatePrim "Cube", "MeshSurface"
Scale , 0.234042553191489, 0.234042553191489, 0.234042553191489, siRelative, siGlobal, siObj, siXYZ, , , , , , , , 0
SelectObj "sphere", , True 
Translate , -5, 0, 0, siAbsolute, siParent, siObj, siX 
Rotate , -29.25, 0, 0, siRelative, siLocal, siObj, siXYZ, , , , , , , , 0
TranslateTool
'Initialize reference frame and use it 
SetReferencePlane "RefPlanes.Transform", "sphere" 
SetCurrentReferencePlane "RefPlanes.Transform" 
'Set-up snapping to the reference plane 
'Set plane reference mode in MCP 
SetValue "Preferences.SnapProperties.Enable", True 
SetValue "Preferences.SnapProperties.EnableGrid", True 
SetUserPref "3D_TRANSFO_REFERENTIAL_CHANGED", 7 
SelectObj "Cube" 
MsgBox "Move the cube interactively.  It will move with respect to the reference plane defined by the sphere."

See Also

CreateReferencePlane SetTransientReferencePlane SetCurrentReferencePlane