Using the Set/Sequence nodes
This page describes the Set and Sequence nodes, and provides an example use case in the context of FX-Maps.
In this case, you may use the combination of Set and Sequence nodes, which will allow you to control variables across a single or multiple functions.
This process involves two steps:
- The Set node will let you create a new variable so you can call it somewhere else and assign a value to it.
- The Sequence node is used to execute the logic in step 1 in its entirety, before executing another branch of the graph – e.g. the logic actually involved in outputting the expected value for the current graph
Sequence nodes can be chained to control the graph’s execution flow.
For instance, you may set a variable first, update its value at a later point then read its final value, while making sure these actions occur in a specific order.
Variable visibility
Be aware that a declared variable is not accessible from anywhere!
While a variable declared at a parent level can be accessible at child levels, the contrary is not true.
Thus, variables set in the node are not accessible at the graph level, while variables set at the graph’s level can be accessed in its node’s parameter functions.
For instance, this rule is at the core of exposing a parameter, for exposing actually involves these steps:
- Creating a graph input parameter
- Accessing it in the parameter’s Substance function graph
- Setting its value as the function’s output
Let us build a small example: imagine that we want a Quadrant node’s Rotation value to be influenced by the Color/Luminosity value: the brighter the luminosity, the more rotation.
The luminosity now also controls the rotation.