Vixen
02b45cc4
csharp
public sealed class ExtractSubGraphCommand

Replacing some of a graph's nodes with one node standing for a graph of their own.

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

Remarks

The extraction is computed first and applied here. Extract works out the new graph and its interface without changing anything; this is the part that is an edit — remove the nodes, add the one that stands for them, and rewire what crossed the boundary.

Fields and properties (2)

  • public override string Name

    What this is called in the undo history, as a person would say it.

  • public GraphNode StandIn

    The node standing for the sub-graph, once it exists.

Methods (3)

  • public ExtractSubGraphCommand(NodeGraphModel graph, SubGraphExtraction extraction, string path, Vector2 position, EditorDocument? document = null)

    Describes extracting a sub-graph.

  • protected override void Apply()

    Makes the change. Called once on execute and again on every redo.

  • protected override void Revert()

    Puts back exactly what Apply changed.

Used by (2)

  • CommandTestsVixen.Editor.NodeGraph.Tests
  • NodeGraphViewVixen.Editor.NodeGraph