Skip to main content

Crate openusd

Crate openusd 

Source
Expand description

Native Rust implementation of Universal Scene Description (USD).

Reads and writes .usda (text), .usdc (binary), and .usdz (packaged) files without any C++ dependencies.

§Modules

ModulePurpose
sdfCore data model — Value, Path, Spec, AbstractData trait, mutable Data, and schema field keys.
usdaText format. TextReader parses and TextWriter emits .usda files.
usdcBinary format. CrateData parses and CrateWriter emits .usdc files.
usdzArchive format. Archive reads and ArchiveWriter emits .usdz packages.
arAsset resolution. Resolver trait maps asset paths (@...@) to physical locations; DefaultResolver searches the filesystem.
layerLayer collection. Collector recursively loads all layers from a root file.
pcpPrim Cache Population — the composition engine. Implements LIVRPS strength ordering, per-prim index caching, and namespace mapping via MapFunction.
usdComposed stage API. Stage merges opinions across layers using LIVERPS strength ordering.
exprVariable expression parser and evaluator for USD’s \…`` expression syntax.
mathShared 4×4 row-major matrix helpers used by the schema layer.
schemasDomain-schema readers (UsdPhysics, UsdSkel, …) — non-core extensions, feature-gated.

§Quick start

use openusd::usd;

let stage = usd::Stage::open("scene.usda").unwrap();

stage.traverse(|prim_path| {
    println!("{prim_path}");
}).unwrap();

Re-exports§

pub use layer::Collector;
pub use layer::DependencyKind;

Modules§

ar
Asset resolution framework.
expr
Variable expression tokenizer and parser.
layer
Layer stack collection.
math
Small 4×4 matrix helpers shared by the schema layer.
pcp
Prim Cache Population (PCP) — the composition engine.
schemas
Domain-schema readers — the non-core extensions that ride on top of the spec-level sdf / usd machinery.
sdf
Scene description foundations.
usd
High-level USD composition and authoring APIs.
usda
Text file format (usda) reader.
usdc
Binary file format (usdc) implementation.
usdz
USDZ archive format reader and writer.

Structs§

f16
A 16-bit floating point type implementing the IEEE 754-2008 standard binary16 a.k.a “half” format.