ToggleValue

Introduced

v1.0

Categories

edit

Description

Toggles the current value of some Boolean parameters that belong to the given property sets.

Scripting Syntax

ToggleValue( ParamName, [InputObjs] );

Parameters

Parameter Type Description
ParamName String List of parameters to toggle.
InputObjs String List of properties that contains the parameter.

Default Value: Selected properties

Examples

1. VBScript Example

NewScene , False
' Toggle Grid Visibility of User Camera in viewport A
ToggleValue "gridvis", "Views.ViewA.UserCamera.camvis"
' Toggle Grid Visibility for all cameras in all viewports
ToggleValue "gridvis", "*.camvis,Views.*.*.camvis"
' Toggle visibility of Nurbs Surfaces, Polygon Meshes, and Implicit Geometry for all cameras in all viewports
ToggleValue "objnurbssrf,objpolymesh,objimpgeometry", "*.camvis,Views.*.*.camvis"
' Toggle Active flag for local transforms of "cube"
CreatePrim "Cube", "MeshSurface"
ToggleValue "active", "cube.kine.local"

2. VBScript Example

DeleteAll False
' Toggle the floor grid Visibility for all cameras in all viewports.
ToggleValue "gridvis", "*.camvis,Views.*.*.camvis"
' The floor grid is no longer visible in any of the viewports.
' Create a NURBS sphere, a mesh cone and an implicit cube.
CreatePrim "Sphere", "NurbsSurface"
CreatePrim "Cone", "MeshSurface"
GetPrim "Cube"
' The sphere, the cone and the cube are visible in all the viewports.
' Toggle the visibility of NURBS Surfaces and Implicit Geometry for some cameras in some viewports.
ToggleValue "objnurbssrf,objimpgeometry", "Views.*.*.camvis"
' The sphere and the cube are no longer visible in the Top, Front and Right viewports.
' Toggle the Specular Enable flag of the scene material Phong shader.
ToggleValue "specular_inuse", "Sources.Materials.DefaultLib.Scene_Material.Phong"
' Open a render region in the Camera viewport.
' The sphere (and the code) specular highlight was toggled off.