configureComponentHierarchy#
Fully qualified name: usdex::core::configureComponentHierarchy
-
bool usdex::core::configureComponentHierarchy(pxr::UsdPrim prim)#
Configure a prim and its descendants to establish a proper asset component hierarchy.
Sets the kind of the prim to “component” and adjusts the kinds of all descendant prims to maintain a valid USD model hierarchy. Any descendant prim that currently has the kind “component” will be changed to “subcomponent”. Any descendant prim that has an authored kind other than “component” or “subcomponent” will have its kind cleared (set to an empty token).
This function is commonly used when configuring asset interfaces to ensure the model hierarchy follows USD best practices for components.
- Parameters:
prim – The prim to configure as a component. This prim and all its descendants will be processed.
- Returns:
True if the component hierarchy was successfully configured, false otherwise.