# Functions to create archive-style USD

**URL:** <https://forum.aousd.org/t/functions-to-create-archive-style-usd/1630>\
**Category:** USD\
**Tags:** beginner\
**Created:** [June 25, 2024, 2:05am UTC](https://forum.aousd.org/t/functions-to-create-archive-style-usd/1630 "2024-06-25T02:05:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BigRoyNL](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/bigroynl/32/413_2.png) [@BigRoyNL](https://forum.aousd.org/u/BigRoyNL)\
**Post date:** [June 25, 2024, 10:33pm UTC](https://forum.aousd.org/t/functions-to-create-archive-style-usd/1630/2 "2024-06-25T22:33:12Z")

</div>

### Stage Export or Flatten

Would just [`stage.Export()`](https://openusd.org/dev/api/class_usd_stage.html#a3f3fa959eb4a0a6ac2ec5ca8f248cb95) suffice? It basically writes out a [flattened](https://openusd.org/dev/api/class_usd_stage.html#ae3271778fa2ceeb82fbd51296610820a) copy of your USD stage.

#### UsdUtils.FlattenLayerStack

Other options may be [`UsdUtils.FlattenLayerStack`](https://openusd.org/release/api/flatten_layer_stack_8h.html#a82cccc4bb061ba2244168e4a2515a6c6). Some other topics here cover that:

- [Python flattening stage while preserving relative paths - #2 by spiff](https://forum.aousd.org/t/python-flattening-stage-while-preserving-relative-paths/1476/2) (this topic asks for the opposite of what you want though)

#### Usdz?

Another approach _could be_ to make a `usdz` Zipped USD as is briefly described [here](https://forum.aousd.org/t/flatten-but-keep-variant-sets/276/2) - 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.

---

_[View the full topic](https://forum.aousd.org/t/functions-to-create-archive-style-usd/1630)._
