Vixen
dd8b0a81
csharp
public static class MeshMapNaming

What a baked mesh map is called, and how something later finds it again.

Read the guide page for this →

Remarks

Two answers to "which map is this", and they are not the same answer. The file name is what an artist reads in the browser — § D12 is explicit that these are ordinary assets an artist opens when a generator misbehaves, not a hidden cache — and UsageKey in the sidecar is what a generator resolves. The sidecar wins: a file somebody renamed still knows what it measures, and doc 08's whole argument is that a path is a fact about today.

⚠ The suffixes are the vocabulary M8's generators are written against, so they are fixed here rather than composed at each call site. Renaming one silently unbinds every shipped generator that asks for it, which is why they are short, lower-case and boring: ao rather than ambientOcclusion, height rather than displacement, matching what an artist arriving from Painter or InstaMAT already types.

Fields and properties (8)

  • public const string DefaultFolder

    Which folder under Assets/ a bake writes into by default.

  • public const string Extension

    The extension a baked map is written with.

  • public const string UsageKey

    The sidecar extension key naming what a map measures.

  • public const string MeshKey

    The sidecar extension key naming the set this map belongs to.

  • public const string ModelKey

    The sidecar extension key naming the model asset the set was baked from.

  • public const string ScaleKey

    The sidecar extension key holding what an encoded value is multiplied by.

  • public const string DigestKey

    The sidecar extension key holding the digest of the bytes the bake wrote.

  • public static IReadOnlyList<MeshMapUsage> Every

    Every usage, in the order a bake writes them.

Methods (4)

  • public static string Suffix(MeshMapUsage usage)

    The suffix a usage's file name ends in.

  • public static bool TryParseSuffix(string? suffix, out MeshMapUsage usage)

    The usage a suffix names.

  • public static string FileName(string mesh, MeshMapUsage usage)

    What one map of a mesh's set is called.

  • public static bool TryParseFileName(string? fileName, out string? mesh, out MeshMapUsage usage)

    Reads a file name back into the mesh and the usage it names.

Used by (13)

  • MeshMapAssetTestsVixen.Editor.App.Tests
  • MeshMapBakePanelTestsVixen.Editor.App.Tests
  • MeshMapBakeSettingsVixen.Editor.App
  • MeshMapBakeViewVixen.Editor.App
  • MeshMapBindingVixen.Editor.Assets
  • MeshMapCommandTestsVixen.Cli.Tests
  • MeshMapEncodingTestsVixen.Editor.Assets.Tests
  • MeshMapGeneratorBindingTestsVixen.Editor.App.Tests
  • MeshMapLibraryVixen.Editor.Assets
  • MeshMapLibraryTestsVixen.Editor.App.Tests
  • MeshMapReferenceVixen.Editor.Assets
  • MeshMapRunnerVixen.Cli
  • ProjectMeshMapBakerVixen.Editor.App