removeLabels#

Fully qualified name: isaacsim::foundation::utils::removeLabels

void isaacsim::foundation::utils::removeLabels(
const std::string &path,
const std::variant<std::string, std::vector<std::string>> &labels,
const std::optional<std::string> &taxonomy = std::nullopt,
bool includeDescendants = false,
)#

Removes specific semantic labels from a prim.

For each taxonomy that has SemanticsLabelsAPI applied, any label in labels is removed from the corresponding semantics:labels:taxonomy attribute. When taxonomy is set only that taxonomy is affected; otherwise all taxonomies on the prim are examined.

The SemanticsLabelsAPI schema itself is not removed from the prim, even if the label list becomes empty after the operation. Use removeAllLabels() with removeTaxonomies set to remove the schema as well.

See also

addLabels(), removeAllLabels()

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 remove.

  • taxonomy – [in] When set, restricts removal to the named taxonomy. When std::nullopt, the labels are removed from every taxonomy found on the prim.

  • includeDescendants – [in] When true, the same removal is applied to all prims in the subtree rooted at path.