Data exchange is done using exported optiSLang built-in types, lists, and dictionaries.
The following types are essential for implementing the data exchange between optiSLang and the node:
HidSpecificInputData: An aggregate of various input data which may differ for each Hierarchical ID (HID).
HidSpecificOutputData: An aggregate of various output data which may differ for each HID.
RunStatus: An object for documenting success and logging.
The following tables describe the standardized data structures of important objects transferred to several of the plugin functions where they are received in a structure of arguments.
Table 1: Common Incoming Key Word Arguments (KWARGs)
Name | Type | Description |
---|---|---|
project_working_directory | String | Path of the project's working directory. |
modifying_setting | Python object | User interface editable settings that require a node reset if changed. |
non_modifying_settings | Python object | User interface editable settings that do not require a node reset if changed. |
properties | Dictionary | Properties of the node (for example, read_mode). |
node_name | String | The current node's name. |
osl_variables | Dictionary | Dictionary of optiSLang variables. Does not vary per HID. |
reference_file | String | Optional: Path to the reference file. Only available if |
reference_file_is_relative_to_working_directory
| Bool | Optional: Whether or not the path to reference file is relative to the working directory. Only
available if |
Table 2: Additional Incoming KWARGs for the Execute Function
Name | Type | Description |
---|---|---|
input_container | List of HidSpecificInputData | Aggregate of arguments per HID. |
Table 3: optiSLang Variables That Do Not Vary Per HID
Name | Type | Description |
---|---|---|
OSL_PROJECT_DIR | String | Absolute path of the current project (*opd). |
OSL_NODE_NAME | String | Name of the current node. |
OSL_HOME | String | Absolute path of the directory containing the optiSLang executable. |
OSL_RLS_VER | String | The version number of optiSLang. |
OSL_RLS_REV | String | The revision number of optiSLang. |
OSL_RLS_FLG | String | A version suffix which is normally empty unless a specific build is set. |
Table 4: optiSLang Variables that Vary Per HID in Execute Function
Name | Type | Description |
---|---|---|
OSL_DESIGN_NO | String | Design number. |
OSL_DESIGN_NAME | String | Design directory name (for example, Design_0001). |
OSL_DESIGN_DIR | String | Absolute path of the current design directory. |
Table 5: HidSpecificInputData Attributes
Name | Type | Description |
---|---|---|
hid | HID | Hierarchical ID of a design variation, for example, [0.99.4]. |
hierarchy | Dictionary | The node's position within the surrounding systems. |
input_slot_values | Dictionary | The values of the input slots. |
osl_variables | Dictionary | Dictionary of optiSLang variables that vary per HID. |
working_directory | String | The nodes working directory. |
reference_file | String | Optional: Path to the reference file. Only available if |
reference_file_is_relative_to_working_directory | Bool | Optional: Whether or not the path to reference file is relative to the working directory. Only
available if |
Table 6: HidSpecificOutputData Attributes
Name | Type | Description |
---|---|---|
hid | HID | Hierarchical ID of a design variation, for example, [0.99.4]. |
output_slot_values | Dictionary | A dictionary of name-value pairs that should be written to the output slots specified in the configuration file. |
status | RunStatus | An object for documenting success and logging. |