Skip to main content

Crate openusd

Crate openusd 

Source
Expand description

Native Rust implementation of Universal Scene Description (USD).

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

§Modules

ModulePurpose
sdfCore data model — Value, Path, Spec, AbstractData trait, and schema field keys.
usdaText format reader. TextReader parses .usda files into AbstractData.
usdcBinary format reader. CrateData parses .usdc files into AbstractData.
usdzArchive format reader. Archive extracts layers from .usdz packages.
arAsset resolution. Resolver trait maps asset paths (@...@) to physical locations; DefaultResolver searches the filesystem.
layerLayer collection. collect_layers 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.
stageComposed stage. Stage merges opinions across layers using LIVERPS strength ordering.
exprVariable expression parser and evaluator for USD’s \…`` expression syntax.

§Quick start

use openusd::Stage;

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

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

Re-exports§

pub use layer::DependencyKind;
pub use stage::Stage;
pub use stage::StageBuilder;

Modules§

ar
Asset resolution framework.
expr
Variable expression tokenizer and parser.
layer
Layer stack collection.
pcp
Prim Cache Population (PCP) — the composition engine.
sdf
Scene description foundations.
stage
Composed USD stage.
usda
Text file format (usda) reader.
usdc
Binary file format (usdc) implementation.
usdz
USDZ archive format reader.

Structs§

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

Enums§

CompositionError
A recoverable error encountered during stage composition.