Vixen
02b45cc4
csharp
public sealed class AnimationClipDocument

A hand-authored animation clip, open for editing.

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

Remarks

Doc 20 files this row as "the format does not exist", and this is the format plus the two operations an editor needs on top of it. Everything a person does to a clip — adding a curve, moving a key, adding an event, changing the duration — has to be one entry on the undo stack, and a document that let a view mutate the asset directly would be the bug IEditorCommand exists to make obvious.

⚠ Every edit is expressed as replacing a curve, not as mutating one. A curve is a list of keys with tangents and a drag changes several of them at once; a command per key would make undoing a box-select of twenty keys twenty presses. Replacing the whole curve is one command whose undo is the previous list, and the lists are small — a hand-animated curve is tens of keys, not thousands.

⚠ A file this build cannot read throws from FromYaml and is caught here. The document opens empty with the failure in LoadError, for CompositorDocument's reason: a panel that could show the problem has to be reachable.

Fields and properties (10)

  • public const string Extension

    What an authored clip is written as.

  • public string AssetPath

    Where the file is, absolute.

  • public AnimationClipAsset Clip

    The clip.

  • public string? LoadError

    Why the file would not read, or .

  • public Func<AnimationClipDocument, ProposalInputs?>? Scene

    What the clip was marked up against, for the proposal pass.

  • public IReadOnlyList<ConstraintProposal> Proposals

    What the last proposal pass found, most confident first.

  • public string ProposalError

    Why the last pass found nothing, or empty.

  • public const float KeyEpsilon

    How close two keys have to be before one replaces the other, in seconds.

  • public const float MinimumDuration

    The shortest a clip may be, in seconds.

  • public int KeyCount

    How many keys the clip carries, across every curve.

Events (1)

Methods (26)

Used by (8)

  • AnimationBinderVixen.Editor.AssetEditors
  • AnimationClipEditorFactoryVixen.Editor.AssetEditors
  • AnimationClipViewVixen.Editor.AssetEditors
  • AnimationWiringTestsVixen.Editor.App.Tests
  • AuthoringContextTestsVixen.Editor.AssetEditors.Tests
  • AuthoringTestsVixen.Editor.AssetEditors.Tests
  • ConstraintFieldAccessVixen.Editor.AssetEditors
  • ConstraintFieldAccessorVixen.Editor.AssetEditors