Table of Contents

Set Variable Node

  • Category: IO
  • Edition: All editions
  • Output type: Mask, Color or Positions, chosen with Slot Type
  • Typical place in a graph: right after a result that many parts of the graph need, such as the final height

Set Variable stores a result under a name, so Get Variable nodes anywhere in the same graph can use it without a long connection running across the canvas. Use it to keep big graphs readable: store the final height once, then read it next to each texturing and spawning group.

When to use it

  • Share the final height, a slope mask or a set of positions with many distant parts of the graph.
  • Split a large graph into readable groups that each start with a Get Variable.
  • Not for: passing data into or out of the graph (use Input and Output).

Inputs

Slot Type Required What to connect
(the Variable Name) Mask, Color or Positions Yes The result to store.

Outputs

Slot Type What it holds
(unnamed) Same as the input A copy of the input, so you can preview it or keep chaining from here.

Properties

Property Default Range What it does
Variable Name Empty Any text The name Get Variable nodes use to read the value. A Set Variable without a name stores nothing.
Slot Type Mask Slot Mask Slot, Color Texture Slot, Buffer Slot The kind of data: a mask or height, a color image, or a set of positions. Match it in the Get Variable nodes.

Common properties

Property What it does
Id The node's unique name in this graph, shown for reference. You cannot edit it. Scripts and the AI workflow CLI use it to find the node.
Split Execution Lets this node run over several frames so the editor stays responsive during long generations. It only works when Allow Split Execution is on in the graph settings. This node finishes in one step, so splitting only adds a short pause around it; leave it off.
Bypass Skips the node. Nothing is stored, and the Get Variable nodes for this name output nothing.

Recipes

Tip

Name variables by what they hold, such as "Final Height" or "Steep Slopes", and keep each name for one Set Variable only. With two Set Variables of the same name, which one a Get Variable reads is not defined.

Note

Variables live in one graph. They are not shared with other graphs or sub graphs.

Performance

Free: the value is not copied unless the node's own output is used or previewed.

For AI agents

  • Type name: SetVariableNode. Input slot id 0, passthrough output id 100, typed by the slot type.
  • Properties: varName (string), slot type via the editor popup. Use vista_graphitor_variable --node <id> --name <name> to name it.
  • Get Variable nodes depend on the Set Variable with the same varName (first match in node order).