Skip to content

External File References

Severity: 🔴 Error
Fixable: ❌ Not Fixable (requires re-export)
Prevalence: 🔹 Low

The USD file contains references to external files (textures, other USD files) using paths that won’t resolve on the target device or in a sandboxed environment.


TODO: Add specific forum/Stack Overflow links


  • Files using relative texture paths like @./textures/wood.png@
  • Files referencing other USD files not bundled together
  • Files exported for local preview but deployed to device

USD supports powerful file referencing and layering:

  • @path/to/file.usd@ for sublayer/reference inclusion
  • @path/to/texture.png@ for asset paths

These work in desktop environments with matching file structures, but fail when:

  • Deployed to iOS/visionOS (sandboxed)
  • Shared without the referenced files
  • Paths are absolute and machine-specific

File: PreflightCore/USDClient.swift

TODO: Implement external reference detection


Package your USD as .usdz which bundles all assets:

Terminal window
usdzip -r output.usdz input.usda textures/

Export a flattened version with all references resolved:

from pxr import Usd
stage = Usd.Stage.Open("input.usda")
stage.Flatten().Export("flattened.usda")



DateChange
2024-12-18Stub created