setContextOptionConfig(option, config)
Associates a configuration string string
with the context option named option
.
This value is saved in the HIP file, similar to the context option’s default value.
The string content is interpreted by the built-in Context Option editor pane. If a user or studio create their own context option editor UI, they can store arbitrary configuration data in this string. However, in that case, you should avoid using the built-in editor because it will overwrite the string.
Warning
While we provide API for getting and setting a config string, SideFX does not consider the actual format of the string, as written by the built-in context option editor pane, to be public API. The format may change without notice between versions. If you write rely on the config strings created by Houdini, you should understand that they may stop working someday.
The current content is a JSON dictionary with the following keys:
|
|
A human-readable label for the context option. |
|
|
This controls what type of interface the context option editor shows the user for editing the value. It only configures the user interface. Anyone can still set the option to any value through scripting.
A plain text field.
A text field that expects a number.
A text field with a button to open a file chooser.
A text field with a button to open a node chooser.
A numeric text field with a slider. Other config keys below control the slider range.
A numeric text field with a slider that snaps to integers. Other config keys below control the slider range.
A checkbox. Sets the option value to
The option label is displayed as a heading without any editor. You can use this to organize the options into categories. |
|
|
The order in which the option appears in the editor view. Any time the user drag-reorders an option this number is overwritten. |
|
|
A string explaining the purpose of the context option. |
|
|
A list of |
|
|
Whether |
|
|
For a |
|
|
The low end of the slider for |
|
|
If this is true, the UI doesn’t let the user manually enter numbers smaller than |
|
|
The high end of the slider for |
|
|
If this is true, the UI doesn’t let the user manually enter numbers larger than |
See also |