UsdStage Hierarchy Algorithms

Utility functions to manipulate UsdStage hierarchy.

These functions handle the complexities of modifying UsdPrims during multi-layer & Omniverse Live editing.

Note: Nucleus is a compile-time optional feature which is required when using Omniverse Live editing. These functions will work without Nucleus, but the logic may be overly complicated for simpler single layer or “static” composition use cases.

Functions

bool omni::connect::core::canRemovePrim(const pxr::UsdPrim &prim)

Determines if the given UsdPrim can be removed safely.

bool omni::connect::core::copyPrim(const pxr::UsdPrim &prim, const pxr::SdfPath &destination)

Copy the given UsdPrim to a new location.

bool omni::connect::core::removeOrDeactivatePrim(pxr::UsdPrim prim)

Removes the given UsdPrim if it can be removed safely, otherwise deactivates it.

bool omni::connect::core::renamePrim(pxr::UsdPrim prim, const pxr::TfToken &name)

Rename the given UsdPrim if it can be renamed safely.