User guide

174
Enableable Parameter Groups
An Enableable Parameter Group is a parameter that has a default value, but can also take on a locally set value. The
local value is used when the Enableable Parameter Group is enabled.
In order to manipulate this type of parameter through a script its important to understand that the Enableable
Parameter Group is a group parameter with four children:
Name Value Type Description
__hints String Metadata telling the UI how to display this parameter group.
enable Number Defines whether the parameter is enabled or not. When
enabled, the parameter takes on value, and when disabled in
takes on default.
value String / StringArray /
Number / NumberArray
The value to be assigned to the corresponding attribute when
the parameter group is enabled. Updated with value entered
through the UI.
default String / StringArray /
Number / NumberArray
The default parameter value.
To modify an Enableable Parameter Group, access the individual child parameters. For example, create a
RenderSettings node, then edit the Enable Parameter Groups for camera name to set a local value, and enable it:
# Get the root node
root = NodegraphAPI.GetRootNode()
# Create a RenderSettings node
renderSettings = NodegraphAPI.\
CreateNode( 'RenderSettings', root)
# Get the value and enable parameters from the cameraName group parameter
cameraNameValue = renderSettings.\
getParameter( 'args.renderSettings.cameraName.value' )
cameraNameEnable = renderSettings.\
getParameter( 'args.renderSettings.cameraName.enable' )
# Change the name
cameraNameValue.\
setValue("/root/world/cam/myCamera", time = 0 )
# Enable the parameter
cameraNameEnable.setValue(float(True), time = 0 )
23 NODEGRAPH API | ENABLEABLE PARAMETER GROUPS