Composition nodes
Tags: composition, layers, variants, export
Build a scene out of other files and layers, choose between variants, and get the result as text or a file.
| Node | Inputs | Output | What it does |
|---|---|---|---|
Add Referenceusd:add_reference |
stageprim_path = "/"asset_pathtarget_prim |
stage | References a USD file on a prim. |
Add Payloadusd:add_payload |
stageprim_path = "/"asset_pathtarget_prim |
stage | Adds a payload of a USD file to a prim, a reference that can stay unloaded. |
Add Inheritusd:add_inherit |
stageprim_path = "/"class_path |
stage | Makes a prim inherit from a class prim. |
Add Sublayerusd:add_sublayer |
stagelayer_path |
stage | Adds a layer file to the sublayers of the root layer. |
Remove Sublayerusd:remove_sublayer |
stagelayer_path |
stage | Removes a layer from the sublayers of the root layer. |
List Sublayersusd:list_sublayers |
stage |
list | Lists the sublayers of the root layer. |
Add Variant Setusd:add_variant_set |
stageprim_path = "/"set_namevariants = [] |
stage | Adds a variant set with variants to a prim. |
Set Variant Selectionusd:set_variant_selection |
stageprim_path = "/"set_namevariant |
stage | Selects a variant of a variant set. |
Get Variantsusd:get_variants |
stageprim_path = "/" |
dict | Describes the variant sets of a prim: their variants and selection. |
Export To Stringusd:export_to_string |
stageflatten = False |
string | Gets the USD text of a stage, optionally flattened into one layer. |
Flatten Stageusd:flatten_stage |
stagepath |
string | Composes a stage into one layer and writes it to a file. |
Notes
- Add Reference and Add Payload take a file and, optionally, a
target_primin it. Without a target, the default prim of that file is used, so a file without one gives nothing: set its default prim, or give the target. A payload is a reference that can be left unloaded; here it is loaded. - Add Inherit points the prim at a class prim, usually named with a leading
underscore like
/_class_asset. It has no effect until that prim exists. - Add Sublayer adds the layer as the weakest of the root layer. Remove Sublayer takes the path as it was added.
- Add Variant Set adds the set and its variants, and keeps variants it already has.
Set Variant Selection with an empty
variantclears the selection. Get Variants gives, for every set, itsvariantsand itsselection. - Export To String gives the USDA text of the root layer. With
flattenthe whole stage is composed into one layer first, with references, payloads and variants resolved. Flatten Stage writes that to a file.