Vixen
02b45cc4
csharp
public sealed class TextureImportDocument

A texture's import settings, open for editing.

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

Remarks

What doc 11 asks a texture editor for is import settings, a channel viewer, a mip inspector and the platform-override matrix. The first and the last are this document's; TextureImportView is the other two, and it is a view over the file's own pixels rather than over anything this holds — see there for why the preview decodes the source rather than the artefact.

Fields and properties (4)

  • public TextureImportEdits Texture

    The settings, typed.

  • public IReadOnlyList<SpriteRect> Sprites

    The sprites cut out of this texture, in the order they were sliced.

  • protected override Type SettingsType

    The type of Settings, which is the mirror rather than the record.

  • protected override string ImporterTag

    The importer's name, which is the sidecar's type tag.

Events (1)

  • public Action<TextureImportDocument>? SpritesChanged

    Raised whenever the set of sprites or any one of them changes.

Methods (5)

  • public TextureImportDocument(EditorProject project, AssetId asset, string path)

    Opens a texture's import settings.

  • public void SetSprites(IReadOnlyList<SpriteRect> sprites)

    Replaces every sprite, undoably. This is what a slice does.

  • public int AddSprite(SpriteRect sprite)

    Adds one sprite, undoably.

  • public bool RemoveSprite(int index)

    Removes one sprite, undoably.

  • public bool UpdateSprite(int index, SpriteRect sprite)

    Replaces one sprite, undoably.

Used by (8)

  • ImportSettingsDocumentTestsVixen.Editor.AssetEditors.Tests
  • ImportViewTestsVixen.Editor.AssetEditors.Tests
  • SpriteDocumentTestsVixen.Editor.AssetEditors.Tests
  • SpriteEditCommandVixen.Editor.AssetEditors
  • SpriteSheetViewVixen.Editor.AssetEditors
  • SpriteViewTestsVixen.Editor.AssetEditors.Tests
  • TextureEditorFactoryVixen.Editor.AssetEditors
  • TextureImportViewVixen.Editor.AssetEditors