public sealed class CompositorDocumentA graphics compositor, open for editing as a graph.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The file holds the graph, not the frame. A .vxcomp is a NodeGraphAsset — nodes, edges, positions, the values and names an author typed — and Compile turns it into the GraphicsCompositorAsset a renderer builds a frame from. Saving the compiled form instead would throw away the layout and make the document unopenable; saving both would be two files that can disagree.
⚠ Nothing imports a .vxcomp yet. NativeFormatImporter carries a document forward unchanged, which is right for a material and wrong for a graph: what a build needs is the compiled frame, so a compositor wants an importer that runs Compile — the same shape SceneImporter has. Until it exists, a compositor is authored here and handed to a renderer by a host that compiles it itself.
⚠ A file this build cannot read opens empty and says why. NodeGraphDocument.Load repairs what it can — an edge naming a node that is not there, a duplicated identity — and reports it; a graph from a later version is refused outright, because there it cannot tell what the bytes mean. Both arrive in LoadDiagnostics rather than as an exception, so the panel that could show the problem is reachable.
Fields and properties (7)
public const string ExtensionWhat a compositor graph is written as.
public string AssetPathWhere the file is, absolute.
public NodeGraphModel GraphThe graph.
public NodeTypeRegistry RegistryThe node types this document is edited against.
public IReadOnlyList<NodeDiagnostic> LoadDiagnosticsWhat reading the file had to say — repairs, and a refusal.
public IReadOnlyList<NodeDiagnostic> DiagnosticsWhat the last Compile had to say.
public GraphicsCompositorAsset? FrameThe frame the last Compile produced, or .
Events (1)
public Action<CompositorDocument>? CompiledRaised after Compile has run.
Methods (5)
public CompositorDocument(EditorProject project, AssetId asset, string path, NodeTypeRegistry? registry = null)Opens a compositor graph.
public GraphicsCompositorAsset? Compile()Compiles the graph into a frame.
public string ToYaml()The graph as this document would write it, without writing it.
public string? FrameToYaml()The frame as YAML, for a host that wants to hand a renderer a file.
protected override void SaveCore()Writes the document back to wherever it came from.
Used by (3)
- CompositorDocumentTestsVixen.Editor.AssetEditors.Tests
- CompositorEditorFactoryVixen.Editor.AssetEditors
- CompositorViewVixen.Editor.AssetEditors