rust-usd 0.0.5

Rust bindings to OpenUSD (pxr C++): stage open, prim/mesh attrs, variants, sublayer authoring, UsdShade read+write, ArResolver hook.
//! Re-encode a USD-readable layer file into the format implied by the
//! destination extension, e.g. `.usda` -> `.usdc` (crate binary), or
//! `.abc` -> `.usdc` when the usdAbc plugin is present.
//!
//!     cargo run --example convert -- input.usda output.usdc

fn main() {
    let mut args = std::env::args().skip(1);
    let (Some(src), Some(dst)) = (args.next(), args.next()) else {
        eprintln!("usage: convert <src> <dst>");
        std::process::exit(2);
    };
    if rust_usd::convert_usd_file(&src, &dst) {
        println!("converted {src} -> {dst}");
    } else {
        eprintln!("conversion failed: could not open {src} as a layer or write {dst}");
        std::process::exit(1);
    }
}