applyApi#

Fully qualified name: isaacsim::foundation::usd::openusd::applyApi

bool isaacsim::foundation::usd::openusd::applyApi(
int64_t stageId,
const std::string &path,
const std::string &schemaType,
const std::optional<std::string> &instanceName = std::nullopt,
)#

Applies an API schema to a prim.

Parameters:
  • stageId – [in] Stage to operate on.

  • path – [in] Absolute SdfPath of the prim.

  • schemaType – [in] Applied API schema type name (SingleApplyAPI or MultipleApplyAPI kind).

  • instanceName – [in] Instance name for multiple-apply schemas; empty for single-apply.

Throws:

std::invalid_argument – if schemaType is unknown or is not an applied API schema.

Returns:

True if the schema was successfully applied.