Skip to content

v0.5.0

Choose a tag to compare

@mxpv mxpv released this 08 Jun 22:48
· 559 commits to main since this release
f6ee3f7

openusd continues to gain usable shape and form. This release introduces
high-level APIs to manage stages, layers, primitives, and more — while
bringing several major subsystems to spec compliance.

  • The PCP composition engine is fully rewritten around a task-queue indexer
    that now conforms to all pcp.txt compliance tests, covering correct
    LIVRPS strength ordering, scene-graph instancing, specializes, relocates,
    value clips, and arc permissions.

  • Layer management graduates from a flat stack to a full LayerGraph model
    with surgical change invalidation. Stage gains a new set of APIs to add,
    remove, and mute layers.

  • Scene-query APIs move from Stage onto the Prim, Attribute, and
    Relationship handles where they belong.

  • All domain schemas (geom, lux, shade, render, skel, physics,
    vol, ui, proc, media) are rewritten as composable trait-based
    views modelling the schema object hierarchy with supertrait chains. The
    same handle exposes both read and author operations, and setters chain:

    use openusd::{usd, schemas::geom};
    
    let stage = usd::Stage::open("scene.usda")?;
    for prim in stage.traverse() {
        if let Some(mesh) = geom::Mesh::new(prim.clone()) {
            // read
            let counts = mesh.face_vertex_counts_attr()
                .get::<Vec<i32>>(usd::TimeCode::DEFAULT)?;
            // author
            mesh.create_extent_attr().set(extent_value)?;
        }
    }

    The trait hierarchy mirrors the C++ schema hierarchy —
    SchemaBase → Imageable → Xformable → Boundable → Gprim → PointBased → Curves
    — with concrete newtype views like Mesh, Camera, and Sphere.

  • Math utilities scattered across the crate are consolidated into a new gf
    module mirroring the C++ Gf namespace: Vec2/3/4, Quat, and Matrix
    types in multiple numeric precisions, all bytemuck::Pod for zero-copy
    binary serialization.

New AOUSD Core Spec coverage

New AOUSD Core Spec coverage in this release:

  • 7.6.1.2.2 Layer-offset retiming applied during value resolution
  • 8.2 Element ordering (sdf::element_cmp, primOrder / propertyOrder reordering)
  • 10.3.3 Arc permissions — direct arcs to permission = private sites are inerted and reported as pcp::Error::ArcPermissionDenied
  • 11.3.1 Ordered prim children via primOrder reordering
  • 11.3.2 Ordered property children via propertyOrder reordering
  • 11.3.3 Scene-graph instancing — instances share one composed prototype; nested instances, instance-proxy redirects, and population-mask integration covered
  • 11.5 IN_PROTOTYPE flag and instance-proxy traversal toggle
  • 12.3 Basic attribute resolution — layer-offset retiming applied during value resolution
  • 12.3.4 Value clips — explicit and template clip resolution, manifest gating, active-clip selection, stage-to-clip time mapping, interpolateMissingClipValues
  • 12.4 Relationship targets (raw + forwarded chains) and attribute connections with a stage-wide connection graph
  • 15.1 / 15.2 CollectionAPI — apply_collection, include_path / exclude_path, MembershipQuery, compute_included_paths

PCP composition engine

  • Rewrote the composition engine as a priority task-queue indexer (Indexer)
    mirroring C++ Pcp_PrimIndexer, now the sole composition path (abf6ca4)
  • Replaced LayerStack with a full LayerGraph model: LayerNode,
    LayerGraph, and pcp::LayerId handles with O(1) identifier lookup;
    sublayer edges derive from authored metadata and are rebuilt on change
    (f2eab23)
  • Implemented LIVRPS arc strength ordering via #[repr(u8)] ArcType and
    the compare_sibling_node_strength / compare_node_strength comparators
    (095728a)
  • Graph-clone seed for ancestral opinions: a child prim clones its parent's
    composed graph and deepens every site path, so referenced ancestor arcs
    re-evaluate at the child (4ea2ae4)
  • References and payloads compose as per-(layerStack, path) site nodes,
    retaining culled arc targets as CULLED nodes for structural visibility
    (a714040, c27146f)
  • Inherits and implied classes including subroot-arc propagation (5773348,
    a188515, c80e421)
  • Specializes as globally-weak class-based arcs with propagate_node_to_root
    and implied-specializes propagation (f6f5fe7, 141c610)
  • Local and ancestral variant sets resolved through a second task band;
    EvalNodeVariantAuthored → EvalNodeVariantFallback with live-node
    strength tie-breaking (40bb677, 7c4de1f)
  • Expression-valued asset paths in reference / payload arcs evaluated during
    index build; composed_expr_vars folds expressionVariables across arcs
    (41ab8a8, 7119565)
  • MapFunction invertibility-checked target translation,
    without_variant_selections stripping, and true compose semantics
    (0638cea, b04dffe)
  • Relocates ported into the task-queue indexer via eval_node_relocations;
    per-layer layerRelocates validated and chained within a node's layer
    stack (0b642d3, 65fbf28, 4484d7d)
  • Direct arcs to permission = private sites inerted and reported via
    pcp::Error::ArcPermissionDenied; descendant arcs inerted through
    denied_prefixes (9ae8510, a6a5b93)
  • Scene-graph instancing: PrototypeRegistry keyed by InstanceKey
    (arc + variant selections); prototype namespace composed in place, instance
    proxies redirect onto /__Prototype_N; targeted invalidation via
    invalidate_prototypes (cc43d29, 1285318, e659568)
  • Value clips: ClipSet parsing, manifest gating, active-clip selection,
    stage-to-clip time mapping, template clip expansion, and
    interpolateMissingClipValues (d6d4d83, 14c93fc, a837749)
  • Layer-offset retiming of timeSamples during value resolution (8886672)
  • Relationship target forwarding through chains with cycle-breaking (737fdd1)
  • Attribute connection graph: ConnectionGraph stage-wide index with composed
    connectionPaths and authoring on Attribute (d75feb7, c864da8)
  • Dependencies reverse map for surgical change fanout
  • Changes / IndexCache::process_changes for three-tier change
    classification and targeted cache invalidation
  • Recoverable composition errors collected via Stage::composition_errors
    rather than callbacks (750af7e)
  • PrimIndex::dump_to_string composition-tree dump for debugging (e668aea)
  • reorder rootPrims parsed and emitted in USDA (0543612)

Stage and layer management

  • LayerGraph replaces the flat LayerStack; Stage::insert_sub_layer /
    remove_sub_layer and sub_layers routed through it so edits persist on
    save (f2eab23)
  • Direct access to the session layer from Stage (18afede)
  • Stage::mute_layer and layer muting support
  • StageBuilder builder methods shortened to load / mask (8d7fb2b)
  • EditTarget and EditContext (RAII guard) for routing authoring through
    any layer; for_local_direct_variant for variant-namespace writes
  • Stage refactored as a cheap Rc<StageInner> reference-counted handle —
    cloning bumps the refcount, no lifetime parameters on Prim / Attribute
    / Relationship (700e2c2)

Schema views

  • usd::SchemaBase trait introduced as the schema-view foundation (665467a)
  • UsdGeom migrated: Imageable → Xformable → Boundable → Gprim → PointBased → Curves
    chain, all intrinsic shapes, Camera, Xform/Scope, Mesh +
    GeomSubset, curve/point/patch types, PointInstancer (2ff1faa)
  • UsdLux migrated: light hierarchy and LightAPI / ShapingAPI applied
    API schemas (cede873)
  • UsdShade migrated: Connectable interface trait, Shader / NodeGraph /
    Material, MaterialBindingAPI with direct + collection binding resolution,
    UsdPreviewSurface + UsdUVTexture (b05b4f3 … f7c35ab)
  • UsdRender migrated: RenderSettingsBase / RenderSettings /
    RenderProduct / RenderVar / RenderPass / RenderDenoisePass with
    compute_render_spec (f6f8d71 … 10be3a1)
  • UsdSkel migrated: SkelRoot / Skeleton / SkelAnimation /
    BlendShape, SkelBindingAPI, SkeletonResolver / SkinningResolver,
    LBS + blend-shape math (fd39231)
  • UsdPhysics migrated: typed Scene / Joint prims, single- and
    multi-apply API schemas (DriveAPI / LimitAPI) (ed641fb)
  • UsdVol migrated: Volume + OpenVDBAsset / Field3DAsset (7780720)
  • UsdMedia migrated: SpatialAudio, AssetPreviewsAPI thumbnails (5ebf1b1)
  • UsdProc migrated: GenerativeProcedural (e6883c1)
  • UsdUI migrated: Backdrop, SceneGraphPrimAPI, NodeGraphNodeAPI
    (042519c)
  • Attribute::get made generic; Value From/TryFrom impls for all gf
    types (a95f6f5, 97133b1)
  • Typed token ↔ Value conversions via impl_token_value! macro (97133b1)
  • CollectionAPI — apply_collection, include_path / exclude_path,
    MembershipQuery, compute_included_paths (80285f6 … 404531a)

Resurfaced API — moved to handles

  • Prim::prim_stack, Prim::prim_index, Prim::children,
    Prim::property_names, Prim::attributes, Prim::relationships,
    Prim::variant_sets (a3fb43c, 8ea96c8)
  • Attribute::property_stack, Attribute::connections,
    Attribute::compute_connections (a3fb43c)
  • Relationship::property_stack, Relationship::targets,
    Relationship::forwarded_targets, Relationship::compute_targets (a3fb43c)
  • Prim::set_metadata for prim-level fields (7d5c02f)
  • Attribute and Relationship split into their own modules (209f441)

Graphics foundations (gf)

  • Vec2/3/4 in f32 (f), f64 (d), f16 (h), and i32 (i)
    variants; Quatf/d/h with (w, x, y, z) field order and slerp;
    Mat2d, Mat3d, Matrix4d (row-major) (5d5b0db)
  • All types are #[repr(C)] / #[repr(transparent)] + bytemuck::Pod
    for bulk-cast binary serialization
  • Free-function constructors (vec3f, quatf, …) and lerp / slerp
    in gf/mod.rs

SDF

  • AssetPath value type (sdf::AssetPath / Value::AssetPath /
    Value::AssetPathVec) with asset[] array support (2d0ff3c, e1ca0de)
  • sdf::TimeCode value type (5ebf1b1)
  • Layer relocates API: relocates / set_relocates / has_relocates /
    clear_relocates (e012c59)
  • sdf::element_cmp for USD namespace element ordering (85c2ed3)
  • Variant-namespace spec authoring in Layer (ed3b558)
  • Path::components and split_property; corrected parent(), prim_path,
    and last_element for edge paths (49c5321, 9fd4b9d)
  • AssetPath serde support behind the serde feature (e1ca0de)

USDA / USDC

  • reorder rootPrims parsed and emitted (0543612)
  • timecode attribute type parsed (8861ce0)
  • Variant selections rejected in arc paths (ff3616f)
  • asset path and path expression array types in USDC (fb5076c)
  • vec3h / vec4h inlined decoding fixed (722bc79)

Dependencies

  • codecov/codecov-action bumped from 6 to 7 (28f702d)