Pipeline Integration and Tooling
This domain tests the command-line and Python tooling a USD pipeline engineer uses daily.
The toolbox
usdcatprints or converts layers (--flatten,--out);usddiffcompares stages;usdeditapplies scripted layer edits;usdzippackages;sdfdumpinspects the crate binary;usdGenSchemagenerates schemas;usdcheckervalidates;usdviewinspects.- Python:
Usd.Stage.Open,Usd.Stage.CreateNew,stage.SetEditTarget,Usd.EditContext,Sdf.BatchNamespaceEdit,Usd.Attribute.Set. - Environment:
PXR_PLUGINPATH_NAMEfor schema and plugin discovery,TF_DEBUG=USD_COMPOSITIONand related topics for tracing,USD_ASSET_RESOLVERfor search behaviour.
Patterns that hold up
- Keep root layers thin: sublayers, references, and variants rather than pages of opinion.
- Use a session layer or
stage.MuteLayer(path)for non-destructive edits instead of rewriting shared assets. - Group renames into one
Sdf.BatchNamespaceEditso listeners receive a single change and internal targets survive. - Set the edit target explicitly before authoring; authoring into the wrong layer is the classic pipeline bug.
- A
Usd.Stageis not thread-safe for authoring. Open one stage per thread or serialise writes; composition reads are broadly safe.
Worked example
A script must rename /World/Old to /World/New in a shared asset. Add both paths to a Sdf.BatchNamespaceEdit, apply it to the layer, save, reopen. The batch keeps the change atomic and preserves relationship targets that a naive delete-and-recreate would silently drop.
Traps
Authoring into the session layer and expecting the result in the saved file; depending on process working-directory relative paths instead of the resolver; and muting a layer, then debugging composition problems your own muting created.