configureAssemblyHierarchy#

Fully qualified name: usdex::core::configureAssemblyHierarchy

bool usdex::core::configureAssemblyHierarchy(pxr::UsdPrim prim)#

Configure a prim and its descendants to establish a proper asset assembly hierarchy.

Sets the kind of the prim to “assembly” and adjusts the kinds of all descendant prims to maintain a valid USD model hierarchy. Any descendant prim with an invalid kind will be changed to “group”. Descendant prims with “component” kind are left unchanged to preserve the component hierarchy.

If a prim has no authored kind, it will be set to “group” if it has descendant model prims.

This function is commonly used when configuring complex assets that contain multiple components to ensure the model hierarchy follows USD best practices for assemblies.

Parameters:

prim – The prim to configure as an assembly. This prim and all its descendants will be processed.

Returns:

True if the assembly hierarchy was successfully configured, false otherwise.