Skip to main content

Crate animsmith_fbx

Crate animsmith_fbx 

Source
Expand description

load reads FBX files into an animsmith_core::Document, normalizing parser errors into LoadError. The resulting document carries skeletons, animation clips, and scene assets in the same core model used by the glTF loader.

The loader normalizes FBX scenes into animsmith’s runtime-oriented coordinate space before handing them to animsmith-core: right-handed +Y-up axes, metres, transform-adjust conversion, helper nodes for geometric transforms, and compensated scale inheritance. Depend on this crate only when your pipeline accepts FBX input; it brings the bundled ufbx C build that animsmith-core and animsmith-gltf intentionally avoid.

§Quick start

fn lint_fbx(
    path: &std::path::Path,
) -> Result<Vec<animsmith_core::Finding>, Box<dyn std::error::Error>> {
    let doc = animsmith_fbx::load(path)?;
    let roles = animsmith_core::detect_profile(&doc.skeleton).unwrap_or_default();
    let config = animsmith_core::Config::default();
    let grids = animsmith_core::MetricGrids::new(&doc);
    let ctx = animsmith_core::CheckCtx::new(&grids, &roles, &config);
    Ok(animsmith_core::run_checks(&ctx, &animsmith_core::all_checks()))
}

§Build and API status

The library crate has no public feature flags and supports the workspace MSRV, Rust 1.88. It includes the bundled ufbx C build. Its Rust API is pre-1.0; see animsmith-core’s crate-level API status for the shared stability boundary.

See the GitHub embedding guide for crate selection and the pipeline scenario guide for FBX intake and conversion workflows.

Enums§

LoadError
Errors returned while loading an FBX scene into the core model.

Functions§

load
Load an .fbx file into a core Document: skeleton, animation, and scene assets (triangulated meshes, skins, factor-only materials). Consumers that only judge animation ignore Document::assets.