Applying Visibility with Scenegraph
- Last UpdatedFeb 19, 2025
- 1 minute read
The Visibility functionality modifies the visibility state of a single scene element or a whole file.
Supported platforms
Setting visibility
User can manage visibility through the following fields.
|
Mode |
Fields |
|---|---|
|
Stateful mode |
visibilityIDs |
|
Stateless mode |
setVisibilityForID, showForID, showForAllID, hideID, hideForAllID |
Parameters
Both visibilityIDs and setVisibilityForIDrequires fields require the following parameters:
-
Key - Set this value to the geometry unique ID. The ID could be, for example, retrieved from a PickSensor.
-
Value - Contains the parameters to customize the visibility. The parameters are separated by a pipe (|).
-
State - SBOOL to set show or hidden.
Example
This is an example of valid key and values.
-
example: scene02|jersey_001=true
All the other functions are dedicated to a specific action (show or hide), so they need only one parameter.
Modify visibility
To modify the visibility state of a single element, use showForID or hideForID and pass it the scene element uniqueID.
To modify the visibility state of a whole file, use showForAllID or hideForAllID and pass it the file node name or a file scene element uniqueID.
Resetting visibility
When removing an entry from visibilityIDs, its visibility state is set to shown.
