User Variables#
For some workflows user-defined global variables may be required. The IntelliGraph Module allows you to define such variables as key-value pairs, called User Variables.
User variables are defined per Graph and are stored persistently in the project. All Nodes, including nodes in subgraphs, have access to the same user variables of the root graph.
Editing User Variables#
To edit the user variables of a graph, right-click the object of the root graph in the Explorer and select Edit User Variables.
A dialog is opened, in which user variables may be added or edited. For each variable a unique key must be defined. Under this key the user variable may be accessed by other nodes.
Each variable requires both a type and a value. Supported types include:
Boolean (true, false)
Integer
Floating point values
Strings
Unchecking a user variable and saving will cause the user variable to be deleted.
Using User Variables#
User variables are usually accessed in two ways: using the dedicated node that exposes the user variables, or using a scripting node.
User Constants Node#
Right-click the scene and add a User Constants Node (see Creating Graphs → Adding Nodes and Connections on how to add nodes).
The user variables are automatically exposed as output ports of the node. Editing the user variables causes the node to automatically update.
Python Scripting Node#
The user variables can be accessed in a Python Node (see Scripting of GTlab → Nodes) using the user_vars dictionary like a normal Python key-value dictionary.