ToggleValue

ToggleValue

導入

v1.0

詳細

指定のプロパティ セットに属する Boolean パラメータの現在値を切り替えます。

スクリプト構文

ToggleValue( ParamName, [InputObjs] );

パラメータ

パラメータ タイプ 説明
ParamName 文字列 切り替えるパラメータのリスト
InputObjs 文字列 パラメータを持つプロパティのリスト

デフォルト値: 選択されているプロパティ

1. VBScript の例

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 の例

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.