UsdPrim Display Name Functions

Utility functions for interacting with the display name metadata of UsdPrims

Functions

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

Block this prim's display name (metadata)

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

Clears this prim's display name (metadata) in the current EditTarget (only)

std::string omni::connect::core::computeEffectiveDisplayName(const pxr::UsdPrim &prim)

Calculate the effective display name of this prim.

std::string omni::connect::core::getDisplayName(const pxr::UsdPrim &prim)

Return this prim's display name (metadata)

bool omni::connect::core::setDisplayName(pxr::UsdPrim prim, const std::string &name)

Sets this prim's display name (metadata).

Functions

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

Block this prim’s display name (metadata)

The fallback value will be explicitly authored to cause the value to resolve as if there were no authored value opinions in weaker layers

Parameters

prim – The prim to block the display name for

Returns

True on success, otherwise false

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

Clears this prim’s display name (metadata) in the current EditTarget (only)

Parameters

prim – The prim to clear the display name for

Returns

True on success, otherwise false

std::string omni::connect::core::computeEffectiveDisplayName(const pxr::UsdPrim &prim)

Calculate the effective display name of this prim.

If the display name is un-authored or empty then the prim’s name is returned

Parameters

prim – The prim to compute the display name for

Returns

The effective display name

std::string omni::connect::core::getDisplayName(const pxr::UsdPrim &prim)

Return this prim’s display name (metadata)

Parameters

prim – The prim to get the display name from

Returns

Authored value, or an empty string if no display name has been set

bool omni::connect::core::setDisplayName(pxr::UsdPrim prim, const std::string &name)

Sets this prim’s display name (metadata).

DisplayName is meant to be a descriptive label, not necessarily an alternate identifier; therefore there is no restriction on which characters can appear in it

Parameters
  • prim – The prim to set the display name for

  • name – The value to set

Returns

True on success, otherwise false