Integrated (Flowgraph Node)
- **Node Name:** `Integrated`
Overview
- Node Name:
Integrated - Category: macro
- Hidden: yes
- File:
extensions/flowgraph/nodes/macro/integrated.lua
Represents an embedded sub-graph (macro) within a parent flowgraph. Acts as the bridge between the parent graph and a child graph, proxying pins between them.
Properties
| Property | Description |
|---|---|
macro | 1 - marks this as a macro node |
hidden | true - not shown in the node palette |
canHaveGraph | true - can contain a child graph |
savePins | true - pins are serialized with the node |
Behavior
init()- Enables pin saving, sets default grey color.setTargetGraph(graph)- Connects this node to a child graph. Finds theinandoutI/O nodes within the child graph, stores references, and sets the node name from the graph type abbreviation + name.gatherPins()- Rebuilds all pins by mirroring the input I/O node's pins as this node's input pins, and the output I/O node's pins as output pins.updatePins()- Copies input pin values to the input I/O node's output pins, and reads output I/O node's input pins back to this node's output pins._afterTrigger()- CallsupdatePins()to sync values after the sub-graph executes._executionStarted()- Pushes hardcoded pin values into the input I/O node._executionStopped()- Clears hardcoded pin values from the input I/O node._postDeserialize()- Reconnects to the target graph using the stored ID plus offset.doubleClicked()- Navigates into the child graph in the editor.drawMiddle()- Shows a search icon (hover to preview the child graph) and any monitored variables.
Serialization
_onSerialize(res)- Saves name, graphType, targetID, and color._onDeserialized(nodeData)- Restores name, color, graphType. Forinstancetype with a macro path, creates the macro from file. Otherwise resolves by graph ID + offset.
How It Works
The Integrated node is the visual representation of a sub-graph/macro in the parent graph. It mirrors the pins defined by the child graph's I/O nodes. When the flowgraph executes, values flow from the parent into the Integrated node's input pins, which are proxied to the child graph's input I/O node. After the child graph runs, values from the output I/O node are proxied back to the Integrated node's output pins.
Double-clicking the node in the editor navigates into the child graph for editing.
Example Usage
-- This node is not created manually - it's generated when:
-- 1. A sub-graph is created in the flowgraph editor
-- 2. A macro is instantiated from a file
-- The node automatically mirrors the I/O pins of the sub-graph
-- Parent graph sees it as a single node with inputs and outputs
-- Internally, the sub-graph runs its own logicAdditional Methods
C:drawCustomProperties()
Custom ImGui drawing for the node's properties panel in the editor.
C:representsGraph()
Node method.
C:work()
Main work function called each frame/tick when the node is active.
See Also
- Foreach (Flowgraph Node) - Related reference
- Get Foreach (Flowgraph Node) - Related reference
- I/O (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide