This seems like a beginner question since I always forget where things live in the API…
I’d like to flatten an USD stage and make all paths absolute, in order to transfer the file to a location to be rendered from on our farm. We don’t use custom asset resolvers so this is the easiest way to make a render un-breakable due to potential dependency changes in the layer structure.
What are the easiest functions in the API to let me do this? It will be with Python but pointers to the C++ equivalents are fine, thanks!
Another approach could be to make a usdz Zipped USD as is briefly described here - however it may contain more than you like in particular?
The usdzip —asset utility will create a package for you that contains all needed (localized) referenced usd layers, plus any images/textures the scene requires, and all composition will be retained.