Skip to main content

fbx_dom/
lib.rs

1//! FBX document model and typed object layer for asset import.
2//!
3//! ## Pipeline
4//!
5//! 1. **Load** — [`Document::from_parser`] (ASCII via [`fbxscii`]) or [`Document::from_binary_reader`]
6//!    (binary via [`fbxcel`]). Both fill the same [`Document`]: header, definitions/templates,
7//!    per-object element subtrees in the internal arena, and **connection** maps keyed by FBX object
8//!    id (`u64`).
9//! 2. **Borrowed access** — [`Object`] wraps a [`LazyObject`] + template + [`Document`] for
10//!    [`Object::properties`], [`Object::attributes`], and connection helpers (`OO` / `OP` / `PP`).
11//! 3. **Owned row** — [`OwnedObject`] copies properties, subtree [`fbxscii::ElementAttribute`] map,
12//!    and outgoing connection lists for use without holding a [`Document`].
13//! 4. **Classification** — [`objects::ClassifiedFbxObject::try_from`] dispatches
14//!    [`OwnedObject`] by `type_name` / `class_name` (Assimp-style) into mesh, material, animation, etc.
15//! 5. **Aggregate** — [`OwnedDocument::from`] walks all objects, classifies, and fills typed `Vec`s
16//!    plus [`OwnedDocument::unknown_objects`] for rows that fail narrowing.
17//!
18//! Connection semantics are documented on [`crate::document::ObjectPropertyConnection`] and
19//! [`Object`] accessor methods.
20
21mod any_loader;
22mod document;
23mod global;
24mod loader;
25mod object;
26pub mod objects;
27mod owned_document;
28
29pub use document::Document;
30pub use document::DocumentParseError;
31pub use document::ImportSettings;
32pub use document::LazyObject;
33pub use document::ObjectPropertyConnection;
34pub use document::Property;
35pub use document::PropertyDetails;
36pub use document::PropertyParseError;
37pub use document::Template;
38
39pub use object::Object;
40pub use object::ObjectError;
41pub use object::Objects;
42pub use object::OwnedObject;
43pub use owned_document::OwnedDocument;
44
45pub use global::FrameRate;
46pub use global::GlobalSettings;
47
48pub use objects::{
49    AnimationCurve, AnimationCurveNode, AnimationLayer, AnimationStack, BlendShape,
50    BlendShapeChannel, Camera, CameraSwitcher, ClassifiedFbxObject, Cluster, FbxTryFromReason,
51    FbxTypeMismatch, LayeredTexture, Light, LightDecay, LightType, LimbNode, LineGeometry,
52    Material, MeshGeometry, Model, ModelGeometryRef, ModelRotationOrder, ModelTransformInheritance,
53    NodeAttributeRef, NullNode, ShapeGeometry, Skin, Texture, Video,
54};