UsdPrim Name Functions
Utility functions to generate valid names for UsdPrims
See Valid and Unique Names for details.
Functions
- pxr::TfTokenVector omni::connect::core::getValidChildNames(const pxr::UsdPrim &prim, const std::vector< std::string > &names)
Take a prim and a vector of the preferred names. Return a matching vector of valid and unique names as the child names of the given prim.
- std::string omni::connect::core::getValidPrimName(const std::string &name)
Produce a valid prim name from the input name.
- pxr::TfTokenVector omni::connect::core::getValidPrimNames(const std::vector< std::string > &names, const pxr::TfTokenVector &reservedNames={})
Take a vector of the preferred names and return a matching vector of valid and unique names.
Functions
-
pxr::TfTokenVector omni::connect::core::getValidChildNames(const pxr::UsdPrim &prim, const std::vector<std::string> &names)
Take a prim and a vector of the preferred names. Return a matching vector of valid and unique names as the child names of the given prim.
- Parameters
prim – The USD prim where the given prim names should live under.
names – A vector of preferred prim names.
- Returns
A vector of valid and unique names.
-
std::string omni::connect::core::getValidPrimName(const std::string &name)
Produce a valid prim name from the input name.
This is a lossless encoding algorithm that supports all UTF-8 code set (even control characters).
- Parameters
name – The input name
- Returns
A string that is considered valid for use as a prim name.
-
pxr::TfTokenVector omni::connect::core::getValidPrimNames(const std::vector<std::string> &names, const pxr::TfTokenVector &reservedNames = {})
Take a vector of the preferred names and return a matching vector of valid and unique names.
- Parameters
names – A vector of preferred prim names.
reservedNames – A vector of reserved prim names. Names in the vector will not be included in the returns.
- Returns
A vector of valid and unique names.