Vixen
02b45cc4
csharp
public static class SubGraphs

A graph inside a graph: the entry and exit nodes, the node type a containing graph stores, and the inlining that removes both before anything is compiled.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Inlining rather than a call. Every target these graphs compile to — Raven source, an array of VFX operations — is a straight-line program over values, and neither has a function to call or a stack to put one on. So a sub-graph is a macro: Flatten turns a graph containing sub-graph nodes into an equivalent graph containing none, and the compiler that walks the result has no idea sub-graphs exist.

The boundary nodes are not registry types. Their ports are the open graph's Interface, so a registry entry for them would have to be re-registered every time a different sub-graph was opened — and two graphs open at once would disagree about what one path meant. Boundary builds the definition for the graph in hand instead, and the view asks for it by name.

⚠ The entry node's ports face the other way from the interface's. A port the interface calls an input — a value the containing graph feeds in — is an output of the entry node, because inside the sub-graph that is where the value comes from. Getting this backwards produces a sub-graph whose wires all refuse to connect and no clue as to why.

Fields and properties (3)

  • public const string InputType

    The node type of a sub-graph's entry node, which shows the interface's inputs.

  • public const string OutputType

    And of its exit node, which shows the interface's outputs.

  • public const int MaximumDepth

    How deep sub-graphs may nest before inlining gives up.

Methods (6)

Used by (7)

  • CommandTestsVixen.Editor.NodeGraph.Tests
  • FlattenerVixen.Editor.NodeGraph
  • NodeGraphCompilerVixen.Editor.NodeGraph
  • NodeGraphViewVixen.Editor.NodeGraph
  • SubGraphLibraryVixen.Editor.NodeGraph
  • SubGraphTestsVixen.Editor.NodeGraph.Tests
  • ViewTestsVixen.Editor.NodeGraph.Tests