defineUnrestrictedSubsets#

Fully qualified name: usdex::core::defineUnrestrictedSubsets

std::vector<pxr::UsdGeomSubset> usdex::core::defineUnrestrictedSubsets(
pxr::UsdGeomMesh mesh,
const std::vector<pxr::TfToken> &names,
const std::vector<pxr::VtIntArray> &indices,
const pxr::TfToken &elementType,
const pxr::TfToken &familyName,
)#

Partially partitions a geometry prim into multiple, possibly overlapping, subsets.

No restrictions: elements may appear in multiple subsets, and the union of all subsets need not represent the whole geometry. Use when overlapping or partial subsets are needed.

The prim must be a geometry that supports subsets (e.g. UsdGeomMesh from usdex::core::definePolyMesh).

See UsdGeomSubset for details.

Unlike the partition variants, elementType and familyName are both required, as there is no sensible default family for overlapping subsets. Pass an empty token for subsets that belong to no family. UsdShadeTokens->materialBind is not accepted, as that family must be a partition or non-overlapping. Use usdex::core::definePartitionedSubsets or usdex::core::defineNonOverlappingSubsets to bind materials to subsets.

See UsdGeomSubset for details.

Parameters:
  • mesh – Mesh prim to add the subsets to

  • names – The names of the subsets (size must equal indices.size())

  • indices – Per-subset element indices; indices.size() is the number of subsets, indices[i] is the index list for subset i

  • elementType – The element type of the subsets. Valid values are UsdGeomTokens->face, UsdGeomTokens->edge, and UsdGeomTokens->point.

  • familyName – The family name of the subsets, or an empty token for subsets that belong to no family

Returns:

The subsets created