Prim nodes
Tags: prim, metadata
Create, query and edit prims: the objects of a stage, found by their path like
/World/cube.
| Node | Inputs | Output | What it does |
|---|---|---|---|
Add Primusd:add_prim |
stageprim_path = "/"type_name = "Xform" |
stage | Defines a prim, and the prims above it without a type if they are missing. |
Remove Primusd:remove_prim |
stageprim_path = "/" |
stage | Removes a prim from the stage. |
List Primsusd:list_prims |
stagetype_name |
list | Lists the prim paths of a stage. |
Has Primusd:has_prim |
stageprim_path = "/" |
bool | Checks whether a prim exists. |
Get Prim Typeusd:get_prim_type |
stageprim_path = "/" |
string | Gets the schema type of a prim. |
Get Childrenusd:get_children |
stageprim_path = "/" |
list | Lists the paths of the children of a prim. |
Get Parentusd:get_parent |
stageprim_path = "/" |
string | Gets the path of the parent of a prim. |
Find Primsusd:find_prims |
stagename_patterntype_name |
list | Finds the prims whose name matches a regular expression. |
Rename Primusd:rename_prim |
stageprim_path = "/"new_name |
stage | Renames a prim in the layer the stage edits. |
Move Primusd:move_prim |
stageprim_path = "/"new_parent_path = "/" |
stage | Moves a prim under another parent in the layer the stage edits. |
Copy Primusd:copy_prim |
stageprim_path = "/"new_path |
stage | Copies a prim and what is below it in the layer the stage edits. |
Set Activeusd:set_active |
stageprim_path = "/"active = True |
stage | Activates or deactivates a prim. Inactive prims are left out of traversals. |
Set Kindusd:set_kind |
stageprim_path = "/"kind = "component" |
stage | Sets the kind of a prim, like component or assembly. |
Set Prim Metadatausd:set_prim_metadata |
stageprim_path = "/"keyvalue |
stage | Sets a metadata field of a prim, like documentation or customData. |
Get Prim Metadatausd:get_prim_metadata |
stageprim_path = "/"key |
any | Gets a metadata field of a prim. |
Notes
- Add Prim creates the prims above the one you ask for without a type. Add a
parent first, as an
Xform, if you want to transform it. - List Prims and Find Prims skip inactive prims (see Set Active) and abstract ones, such as classes.
- Find Prims takes a regular expression and searches it in the name of the prims,
not in their whole path:
cube_\d+finds/a/cube_01and/b/cube_02. - Get Parent gives
/for a prim at the top. - Rename, Move and Copy Prim edit the layer the stage edits, the root layer of a stage you opened. They fail with the reason from USD if the new name exists or the prim only exists through a reference or payload.
- Set Kind takes the kinds of USD:
component,group,assembly,subcomponent. - Set Prim Metadata and Get Prim Metadata work on fields like
documentation,commentandcustomData(a dictionary). A value of the wrong type for the key fails. Some keys have schema defaults,customDataof a transformable prim includesuserDocBrief.