Vixen
c7401864
csharp
public static class CompositorWriter

Writes a GraphicsCompositorAsset as .vxcompositor text.

Read the guide page for this →

Remarks

CompositorImporter's other direction, and it lives beside the importer for the same reason the importer lives here: Vixen.Rendering deliberately does not reference Vixen.Core.Yaml — the asset model is a plain object model, and YAML is one way of making one — so both ends of the text format belong to the tooling assembly that owns the dialect. The explode paths of docs/plan/39 § 5 are the callers: the vixen frame explode command today, the editor's explode button when doc 36's panel grows one.

What it writes is what a person would have written. Every member equal to its record's default is left out — an exploded file should read like sample 13, not like an object dump — and what remains is the schema's order under the schema's camelCase keys, with !TypeName tags exactly where the reader needs them: on every node whose type its member's declared type does not already say. version: alone is written even at its default, first, because a document's schema version is a statement, not a setting.

The round trip is the contract: Parse``1 over this text binds back to a structurally identical asset, which is what makes explode an ejection rather than a translation — the document that comes out builds the same frame the object that went in would have.

Methods (1)

  • public static string Write(GraphicsCompositorAsset document, IReadOnlyDictionary<object, string>? comments = null, string? header = null)

    Writes a document.

Used by (3)

  • CompositorWriterTestsVixen.Editor.Assets.Tests
  • FrameRunnerVixen.Cli
  • StandardFrameDocumentVixen.Editor.AssetEditors