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.

Opening the graph user variables dialog on the root graph Opening the graph user variables dialog on the root graph

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.

The graph user variables dialog The graph user variables dialog

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.

Accessing the user variables using the User Constants node Accessing the user variables using the User Constants node

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.

Accessing the user variables using the Python scripting node Accessing the user variables using the Python scripting node