omni::connect::core::renamePrim
Defined in omni/connect/core/StageAlgo.h
-
bool omni::connect::core::renamePrim(pxr::UsdPrim prim, const pxr::TfToken &name)
Rename the given
UsdPrim
if it can be renamed safely.Multi-layer editing and Omniverse Live editing present challenges when trying to rename prims. We cannot always safely delete prims, sometimes they must must be deactivated instead. Use
renamePrim
to simulate a rename by copying the prim and then attempting a full removal. If this is not possible, the original prim will be deactivated, using an override on the currentUsdEditTarget
.- Parameters
prim – The prim to be renamed.
name – The new name.
- Returns
A bool indicating if the rename was successful.