Sharing layers between Bifrost-USD and USD for Maya
Bifrost-USD and USD for Maya connect using anonymous (memory-based) layers. By default, USD for Maya uses a copy of the root layer output by Bifrost-USD. You can force Bifrost-USD and USD for Maya to use the same layer to save memory, but there are important consequences of doing so.
When you connect a stage as a new port on the output
node of a Bifrost graph, a Maya USD proxy is automatically created in the scene and connected to the graph output. By default, the Bifrost stage is included as a sublayer of an unshareable layer of the proxy.
The unshareable layer is used to store modifications made in Maya. For example, if you move an object from the Bifrost stage in Maya's viewport, or select a variant, those changes are stored as overrides in the unshareable layer.
This mechanism is required so that changes made in Maya can persist as you work in the graph. This is because every time the graph is re-evaluated, it generates a new stage in memory. If the changes you made in Maya were in a shared layer, they would be lost.
However, Maya's copy of the Bifrost stage requires extra memory. If you do not need to work back-and-forth between Maya and Bifrost, you can force them to share the same layer to save memory. This is the case, for example, if you are using Bifrost-USD to create procedural content that you intend to load directly from a USD file into another scene.
To force USD for Maya and Bifrost-USD to use the same layer in memory:
- Select the Maya USD proxy in the Outliner.
- On the
mayaUsdProxyShape
tab in Maya's Attribute Editor, turn on Shareable in the Stage attribute group.
Maya's USD Layer Editor shows that the layer from Bifrost is now shared: