ToggleVisibility

Description

Hides and shows layers, objects, groups, partitions, polygons and polygon clusters.

Scripting Syntax

ToggleVisibility( [Target], [PropertyName], [ThreeState] )

Parameters

Parameter

Type

Description

Target

String

List of objects to show or hide.

Default Value: Current selection

PropertyName

String

Comma-separated list of visibility parameters to toggle.

Default Value: visibility

Possible Values:

visibility: View and Rendering visibility

viewvis: View visibility

rendvis: Render visibility

selectability: Selectability

ghosting: Animation ghosting

ThreeState

Boolean

Allow three state operation (on/off/neutral).

Default Value: FALSE

Possible Values:

TRUE: The command will cycle the value between ON/OFF/NEUTRAL states. Used to control three-state checkboxes.

FALSE: The command will toggle the value beteeen OFF/NEUTRAL. Used to implement visibility 'H' key command.

Examples

1. VBScript Example

' hiding a newly created 3D object
CreatePrim "Sphere", "MeshSurface"
ToggleVisibility

2. VBScript Example

' hiding some polygons on a newly created 3D object
CreatePrim "Sphere", "MeshSurface"
SelectObj "Sphere.poly[0-10]"
ToggleVisibility
SetDisplayMode "Camera", "shaded"

3. VBScript Example

' toggling the viewport visibility of all objects in the default layer
ToggleVisibility "Layers.Layer_Default", "viewvis"

See Also

HideAndUnselect

HideUnselected



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index