Add prims to a stage in Bifrost-USD
A prim is something that can be added to a layer in a stage. It can contain a geometry, material definition, overrides, and so on, as well as other prims as children. Use one or more add_to_stage nodes in a chain to build the scene hierarchy.
Add an
add_to_stagenode to the graph.Connect a stage to the
stageinput.If the
stageport is left unconnected, a new and empty stage is used. In this case, it's best to right-click on thestageport and choose Create Node > Usd::Stage::create_usd_stage so that you can assign alayerfile for saving the root layer of the file downstream in the graph.For the
parent_path, specify the full path (including the leading slash "/") of a parent in the hierarchy under which to add the new prims. If this is left blank, the prims will be adding at the root of the specified layer. If you enter a path that does not exist on the stage yet, genericdefnodes are created in the hierarchy — you can set the specific types of these prims downstream.Right-click on the
prim_definitionspath and choose an option from the Create Node menu.- Usd::Prim::define_usd_prim is a generic node that can be used to add any type of prim. The default settings define an Xform (transform), which is commonly used as a parent for other prims, but you can change them to define any prim.
- The other options on the Create Node menu are based on
define_usd_primand specialized for specific uses.
In the node you just added, set the parameters. For basic information about the related terms and concepts, see the USD glossary. In particular:
- Set
pathto specify the name of the prim and its place in the hierarchy. It's always safe to include the leading slash, and the leading slash is mandatory if there is noparent_pathspecified in theadd_to_stagenode and the prim definition is not connected to thechildrenport of anotherprim_definition. Here again, if you enter a path that does not exist on the stage yet then genericdefnodes are created in the hierarchy and you can set the specific types of these prims downstream. - The basic types available are Scope, Xform, Capsule, Cone, Cube, Cylinder, Sphere, Mesh, NurbsCurves, and PointInstancer. The full list of available types depends on what has been registered by your version of USD for Maya and other plug-ins. You can see the full list by right-clicking on the Maya USD proxy in the Outliner and expanding the Add New Prim > All Registered menu.
- Set
As desired, right-click on the fan-out ports of the prim definition node to add references, attributes, and so on. In particular, you can right-click on the
childrenport to create a hierarchy of prim definitions arbitrarily deep.Right-click on the
prim_definitionsport of theadd_to_stagenode and repeat to add more prim definitions as desired.Connect the
stageoutput of theadd_to_stagenode to any node that takes a stage as input. This should eventually connect to theoutputnode at the top level of the graph to display the added prims in the host scene.
