addLabels#

Fully qualified name: isaacsim::foundation::utils::addLabels

void isaacsim::foundation::utils::addLabels(
const std::string &path,
const std::variant<std::string, std::vector<std::string>> &labels,
const std::string &taxonomy = "class",
)#

Adds semantic labels to a prim under the given taxonomy.

Applies the SemanticsLabelsAPI schema to the prim at path (if not already applied), then merges labels into the semantics:labels:taxonomy attribute. Labels already present on the prim are not duplicated; only new, unique entries are appended.

Only the prim at path is modified; descendants are not affected.

See also

getLabels(), removeLabels()

Parameters:
  • path – [in] USD path of the target prim on the default stage.

  • labels – [in] A single label string or a list of label strings to add.

  • taxonomy – [in] Name of the semantic taxonomy under which labels are stored (e.g. "class", "type"). Defaults to "class".