_getUniqueChildPaths#

Fully qualified name: usd_optimize::_getUniqueChildPaths

PXR_NS::SdfPathVector usd_optimize::_getUniqueChildPaths(
const PXR_NS::UsdStageWeakPtr &usdStage,
const PXR_NS::SdfPath &parentPath,
const PXR_NS::TfTokenVector &preferredNames,
)#

Construct a list of unique prim paths based on a parent and a list of preferred child names.

If a child with a preferred name name already exists or the name has already been allocated, then a new name will be generated by appending a suitable index as suffix to the name (eg, name_1) to avoid name collisions.

This mimics the logic of UsdGeomSubset::CreateUniqueGeomSubset but operates in bulk.

Parameters:
  • usdStage – The usd stage

  • parentPath – The path of the parent prim on the stage

  • preferredNames – Names that the paths would ideally have provided there are no collisions

Returns:

Unique paths for new prims