Expand description
load and load_bytes read FBX input 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.
load_scale_source and load_scale_source_bytes retain a typed
FbxScaleCapabilityInventory from the same parse. It gives every current
Appendix D.4 domain an explicit status and records baked curves, normalized
transforms, derived binds, truncated/renormalized influences,
triangulation, welding, generated data, and unavailable raw-span proof.
capability_facts projects that explicit inventory into core facts, but
the result remains unsupported: both scale operations are intentionally
refused until a later FBX writer and proof boundary exists.
§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);
let results = animsmith_core::evaluate_checks(
&ctx,
&animsmith_core::all_checks(),
animsmith_core::CheckSelection::All,
)?;
Ok(results
.into_iter()
.flat_map(|check| check.findings().to_vec())
.collect())
}§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.
Structs§
- FbxCoordinate
Normalization - Coordinate and unit normalization applied by the loader.
- FbxScale
Capability Inventory - Deterministic capability inventory captured from one successfully parsed FBX scene.
- FbxScale
Domain Inventory - Explicit status for every current domain row in DESIGN.md Appendix D.4.
- FbxScale
Source - One FBX document and the capability inventory captured from the same parse.
- FbxSource
Identity - Stable source identity retained beside one normalized ufbx element.
Enums§
- FbxBind
Matrix Provenance - Provenance of inverse-bind matrices projected into the source sidecar.
- FbxCoordinate
Axis - A format-independent spelling of one FBX coordinate axis.
- FbxScale
Domain Status - How one Appendix D.4 domain reaches the normalized FBX document.
- Load
Error - Errors returned while loading an FBX scene into the core model.
Functions§
- capability_
facts - Project an FBX inventory into the format-neutral core capability gate.
- load
- Load an
.fbxfile into a coreDocument: skeleton, animation, and scene assets (triangulated meshes, skins, factor-only materials). Consumers that only judge animation ignoreDocument::assets. - load_
bytes - Load an FBX byte slice into a core
Document. - load_
scale_ source - Load an
.fbxfile and retain its conservative scale capability inventory. - load_
scale_ source_ bytes - Load captured FBX bytes and retain the capability inventory from the same parse.