Skip to main content

Crate animsmith_engine

Crate animsmith_engine 

Source
Expand description

Strict, immutable engine-import profile facts and deterministic settings resolution for AnimSmith.

The V1 registry has exactly five version-pinned profiles. resolve_static validates a profile tuple and every declared setting before asset I/O; StaticResolution::resolve_input then checks the authoritative animsmith_core::SourceFormatV1 and materializes per-clip settings. Unknown engine behavior remains FactState::Unknown. This crate performs no filesystem access, parses no TOML, and imports no format crate. Its one-way project_prediction_provenance_v1 adapter publishes the already resolved profile/settings and same-load core source evidence. The borrowed EngineAddressabilityCheck uses that evidence for the single frozen Bevy 0.19.0 source-animation index-selector prediction; other engine behavior remains outside this crate unless a version-pinned rule is added. BevyAnimationAssetLabelV1 is the one bounded selector formatter used by that check, while build_bevy_animation_addressability_adapter_v1 runs the same check lifecycle once and packages its unchanged evaluation for the standalone glTF animation-addressability contract. EngineImportAdviceV1 independently projects exact materialized Unity importer settings beside same-load provenance and bounded clip evidence; profiles without modeled settings produce a typed refusal rather than a guessed preset.

§Example

use animsmith_core::SourceFormatV1;
use animsmith_engine::{
    BakeOrExtract, EngineDeclaration, ProfileSelection, SettingValue,
    resolve_static,
};

let mut declaration = EngineDeclaration {
    selection: Some(ProfileSelection::new(
        "unity-generic", 1, "6000.3", "fbx-model-importer",
    )),
    document_settings: Some(Default::default()),
    ..EngineDeclaration::default()
};
let document = declaration.document_settings.as_mut().unwrap();
document.insert("convert_units".into(), SettingValue::Boolean(true));
document.insert("bake_axis_conversion".into(), SettingValue::Boolean(true));
document.insert(
    "root_motion_source".into(),
    SettingValue::SourceTransformPath("Reference/Root".into()),
);
declaration.clip_settings.insert(
    "walk_*".into(),
    [
        ("root_rotation".into(), SettingValue::BakeOrExtract(BakeOrExtract::Extract)),
        ("root_position_y".into(), SettingValue::BakeOrExtract(BakeOrExtract::Bake)),
        ("root_position_xz".into(), SettingValue::BakeOrExtract(BakeOrExtract::Extract)),
    ].into(),
);
let static_profile = resolve_static(declaration)?.unwrap();
let resolved = static_profile.resolve_input(SourceFormatV1::Fbx, &["walk_forward".into()])?;
assert_eq!(resolved.clip_settings().len(), 1);

The crate has no public feature flags and supports the workspace MSRV, Rust 1.88. Its Rust API is pre-1.0.

Structs§

BevyAnimationAssetLabelError
A Bevy animation asset-label index outside the bounded raw-source animation inventory.
BevyAnimationAssetLabelV1
One exact Bevy 0.19.0 GltfAssetLabel::Animation(index) display selector.
CoordinateBasis
Known target coordinate basis.
EngineAddressabilityCheck
The engine addressability check over borrowed same-load source evidence.
EngineDeclaration
Full public input to phase-one static resolution.
EngineImportAdviceClipEvidenceV1
Exact engine-neutral evidence retained beside one suggestion row.
EngineImportAdviceClipV1
One file-scoped normalized clip and its source/intent/measurement evidence.
EngineImportAdviceIdentityV1
Domain-separated canonical identity of one import-advice payload.
EngineImportAdviceInput
Staged bounded reader input for the standalone advice contract.
EngineImportAdviceReadbackV1
Strict read-side representation of one import-advice document.
EngineImportAdviceToolReadbackV1
Validated producer metadata from strict readback.
EngineImportAdviceV1
Standalone producer envelope for generate import-advice.
EngineProfile
One immutable, revisioned registry profile.
GltfAnimationAddressabilityAnimationSetV1
Coverage-qualified source animation rows.
GltfAnimationAddressabilityAnimationV1
One exact source-order raw animation row.
GltfAnimationAddressabilityBevyAdapterV1
Exact optional Bevy adapter embedded in the standalone envelope.
GltfAnimationAddressabilityBevyReadbackV1
Validated read-side Bevy adapter.
GltfAnimationAddressabilityChannelSetV1
Coverage-qualified raw channel rows for one source animation.
GltfAnimationAddressabilityChannelV1
One exact source-order raw animation channel row.
GltfAnimationAddressabilityCheckReadbackV1
Validated read-side representation of the exact embedded check subset.
GltfAnimationAddressabilityIdentityV1
Domain-separated identity of one engine-neutral animation inventory.
GltfAnimationAddressabilityInput
Staged bounded reader input for a standalone addressability document.
GltfAnimationAddressabilityInventoryV1
Engine-neutral glTF animation inventory projected from one immutable load.
GltfAnimationAddressabilityReadbackV1
Fully validated read-side standalone document.
GltfAnimationAddressabilityToolReadbackV1
Validated read-side producer identity.
GltfAnimationAddressabilityV1
Standalone producer envelope for generate addressability.
GltfAnimationCoverageV1
Coverage and typed reason for one raw animation row domain.
GltfAnimationTargetV1
Source target identity for one raw animation channel.
PrimarySource
One primary source retained by an immutable profile record.
ProfileFact
One stable fact and its explicit evidence state.
ProfileSelection
Exact four-field key selecting one revisioned engine profile.
ResolvedClipSettings
Fully materialized settings for one real clip.
ResolvedProfile
Input-validated profile and fully materialized deterministic settings.
SettingDescriptor
Immutable descriptor for one stable setting id.
StaticResolution
Validated profile and declarations that require no asset I/O.
UnityClipAdviceV1
Exact Unity per-clip importer suggestions.
UnityDocumentAdviceV1
Exact Unity document-level importer suggestions.

Enums§

AnimationAddressability
Known animation-asset addressability behavior.
BakeOrExtract
Exact policy for a Unity root transform component.
ConversionControl
A known importer control relevant to source-to-target conversion.
DefaultStatus
Verified default status of a setting.
EngineImportAdviceError
Import-advice producer or strict-reader contract failure.
EngineImportAdviceMovementOwnerV1
Project-declared owner of one world-movement component.
EngineImportAdvicePayloadV1
Profile-specific V1 advice payload.
EngineImportAdviceReadError
Bounded-reader transport/shape failure.
EngineImportAdviceRefusalReasonV1
Exact reason why V1 emitted no clip suggestions.
EngineImportAdviceSourceNameV1
Bounded source animation/take name evidence.
EngineImportAdviceSourceUnavailableReasonV1
Stable raw-source reason retained for a source-name observation.
EngineImportAdviceStateV1
Whether requested advice could be emitted without guessing.
FactId
Stable id for one immutable fact in every V1 profile record.
FactState
Evidence state of one profile fact.
FactValue
Typed value of a known immutable profile fact.
ForwardAxis
Signed world axis used as forward.
GltfAnimationAddressabilityAdapterError
Typed failure while constructing the optional exact Bevy adapter for a glTF animation-addressability document.
GltfAnimationAddressabilityError
A producer or reader encountered an invalid addressability V1 contract.
GltfAnimationAddressabilityReadError
A serialized standalone addressability document could not be read safely.
GltfAnimationChannelPropertyV1
Format-neutral property targeted by one raw animation channel.
GltfAnimationCoverageStateV1
Exhaustiveness state of one raw animation row domain.
GltfAnimationObservationV1
Exact state of one scalar raw animation observation.
GltfAnimationTargetKindV1
Source target identity kind for one raw animation channel.
GltfAnimationUnavailableReasonV1
Stable reason why a raw animation observation is incomplete.
Handedness
Coordinate-system handedness.
ImportHandling
Known importer treatment for a fact domain.
InvalidSettingReason
Why a closed setting value failed its declared domain.
LinearUnit
Known target linear unit.
PredictionProvenanceProjectionError
Failure to project already-resolved engine and same-load source evidence.
PredictionRuleError
Typed failure while binding an engine-owned check to immutable evidence.
RegistryValidationError
Author-owned invariant failure in the built-in V1 registry.
ResolutionError
Typed failure from static or input-dependent engine resolution.
RootMotionAddressability
Known root-motion addressability behavior.
SettingApplicability
Whether a descriptor applies to a profile revision.
SettingDomain
Closed value domain of a setting.
SettingId
Stable setting id in the closed V1 vocabulary.
SettingLocation
Location of one settings declaration.
SettingScope
Configuration scope of a setting.
SettingValue
Closed public value vocabulary for engine settings.
SettingValueKind
Runtime kind of one closed SettingValue variant.
TargetAddressability
Known animation-target addressability behavior.
UpAxis
Positive world axis used as up.

Constants§

ENGINE_ADDRESSABILITY_CHECK_ID
Stable check id for engine scene, animation, target, and runtime-label addressability.
ENGINE_CHECK_IDS_V1
Versioned engine-owned check ids callers may use for pre-I/O selection validation.
ENGINE_IMPORT_ADVICE_COMMAND
Stable command spelling carried by the standalone contract.
ENGINE_IMPORT_ADVICE_SCHEMA_VERSION
Standalone engine-import-advice schema version.
ENGINE_IMPORT_ADVICE_V1_ID
Immutable standalone engine-import-advice contract identity.
ENGINE_IMPORT_ADVICE_V1_MAX_REPORT_BYTES
Maximum serialized bytes accepted by the strict V1 reader.
GLTF_ANIMATION_ADDRESSABILITY_COMMAND
Immutable command discriminator carried by the standalone envelope.
GLTF_ANIMATION_ADDRESSABILITY_SCHEMA_VERSION
Version of the standalone glTF animation-addressability envelope.
GLTF_ANIMATION_ADDRESSABILITY_V1_ID
Immutable identity of the standalone glTF animation-addressability contract.
GLTF_ANIMATION_ADDRESSABILITY_V1_MAX_REPORT_BYTES
Maximum serialized bytes accepted by the standalone report reader.
SOURCE_TRANSFORM_PATH_MAX_BYTES
Maximum UTF-8 byte count of a V1 source-transform path.

Functions§

build_bevy_animation_addressability_adapter_v1
Build the optional exact Bevy 0.19.0 adapter for one addressability document.
lookup_profile
Find one exact registry tuple without aliases, ranges, or fallback.
profiles_v1
Enumerate the five immutable V1 engine profiles in tuple order.
project_prediction_provenance_v1
Project one resolved engine profile and its same-load source evidence into the self-contained prediction-provenance V1 contract.
resolve_static
Validate an engine declaration without inspecting an asset.
validate_registry_v1
Validate all author-owned registry declarations and cross references.

Type Aliases§

SettingMap
String-keyed setting declarations used at the TOML-free public boundary.