Selection#
Fully qualified name: omni::usd::Selection
-
class Selection#
Public Types
Public Functions
-
Selection(UsdContext *usdContext)#
-
~Selection()#
- bool setSelectedPrimPaths(
- const std::vector<std::string> &paths,
- bool expandInStage,
Deprecated.
Use setSelectedPrimPaths() with SourceType instead. Sets all selected prim paths for USD stage. This will replace existing selected paths with given ones.
- Parameters:
paths – The vector of selected prim paths to be set.
expandInStage – true to expand the path in Stage Window on selection.
- Returns:
true if the selected paths are changed.
- bool setSelectedPrimPaths(
- const std::vector<std::string> &paths,
- bool expandInStage,
- SourceType source,
Sets all selected prim paths for USD or Fabric stage.
This will replace existing selected paths with given ones.
- Parameters:
paths – The vector of selected prim paths to be set.
expandInStage – true to expand the path in Stage Window on selection.
source – one of SourceType, selection can be set to usd, fabric or both stages.
- Returns:
true if the selected paths are changed.
-
std::vector<std::string> getSelectedPrimPaths()#
Deprecated.
Use getSelectedPrimPaths() with SourceType instead. Gets all selected prim paths from USD stage.
- Returns:
a vector containing all selected prim paths of USD stage.
-
std::vector<std::string> getSelectedPrimPaths(SourceType source)#
Gets all selected prim paths from USD, Fabric stage or both.
- Parameters:
source – one of SourceType, get selection from either usd or fabric stage, or from both as a unified list
- Returns:
a vector containing all selected prim paths of USD, Fabric or both stages.
-
bool clearSelectedPrimPaths()#
Deprecated.
Use clearSelectedPrimPaths() with SourceType instead. Clears all selected prim paths.
- Returns:
true if the selected paths are changed.
-
bool clearSelectedPrimPaths(SourceType source)#
Clears all selected prim paths.
- Parameters:
source – one of SourceType, clear selection of usd, fabric, or both stages
- Returns:
true if the selected paths are changed.
- bool setPrimPathSelected(
- const char *path,
- bool selected,
- bool forcePrim,
- bool clearSelected,
- bool expandInStage,
Deprecated.
Use setPrimPathSelected() with SourceType instead. Sets selection for a specific prim path.
- Parameters:
path – prim path to be set.
selected – true to select and false to de-select.
forcePrim – check if prim meets SelectionType.
clearSelected – true to clear existing selection.
expandInStage – true to expand the path in Stage Window on selection.
- Returns:
true if the selected paths are changed.
- bool setPrimPathSelected(
- const char *path,
- bool selected,
- bool forcePrim,
- bool clearSelected,
- bool expandInStage,
- SourceType source,
Sets selection for a specific prim path.
- Parameters:
path – prim path to be set.
selected – true to select and false to de-select.
forcePrim – check if prim meets SelectionType.
clearSelected – true to clear existing selection.
expandInStage – true to expand the path in Stage Window on selection.
source – one of SourceType, selection can be set to usd, fabric or both stages.
- Returns:
true if the selected paths are changed.
-
bool isPrimPathSelected(const char *path) const#
Deprecated.
Use isPrimPathSelected() with SourceType instead. Gets if a prim path is selected.
- Parameters:
path – path of prim to check
- Returns:
true if prim path is selected.
-
bool isPrimPathSelected(const char *path, SourceType source) const#
Gets if a prim path is selected.
- Parameters:
path – path of prim to check
source – one of SourceType, selection can come from usd, fabric or both stages.
- Returns:
true if prim path is selected.
-
void setDirty()#
Something has changed (layers may have been added, removed, or muted), where we can no longer guarantee the selection paths are valid, so mark them as dirty.
- bool add(
- PXR_NS::SdfPath path,
- bool forcePrimMode,
- bool clearSelected,
- bool expandInStage,
Deprecated.
Use add() with SourceType instead.
- bool add(
- PXR_NS::SdfPath path,
- bool forcePrimMode,
- bool clearSelected,
- bool expandInStage,
- SourceType source,
- SourceBehavior behavior = SourceBehavior::eFabricAll,
-
bool remove(PXR_NS::SdfPath path, bool forcePrimMode)#
Deprecated.
Use remove() with SourceType instead.
- bool remove(
- PXR_NS::SdfPath path,
- bool forcePrimMode,
- SourceType source,
- SourceBehavior behavior = SourceBehavior::eFabricAll,
-
bool removePathAndDescendents(PXR_NS::SdfPath path)#
-
PXR_NS::SdfPathVector &getRenderablePaths()#
-
PXR_NS::SdfPathVector &getAddedRenderablePaths()#
-
PXR_NS::SdfPathVector &getRemovedRenderablePaths()#
-
const PXR_NS::SdfPathVector &getModelPaths()#
-
const PXR_NS::SdfPathVector &getCameraPaths()#
-
const std::vector<PXR_NS::UsdLuxDistantLight> &getDistantLights()#
-
const std::vector<PXR_NS::UsdLuxRectLight> &getRectLights()#
-
const std::vector<PXR_NS::UsdLuxSphereLight> &getSphereLights()#
- const std::vector<PXR_NS::UsdLuxCylinderLight> &getCylinderLights(
-
const std::vector<PXR_NS::UsdLuxDiskLight> &getDiskLights()#
-
const std::vector<PXR_NS::UsdPrim> &getSounds()#
-
const std::vector<PXR_NS::UsdPrim> &getListeners()#
-
const std::vector<PXR_NS::UsdShadeMaterial> &getMaterials()#
-
const std::vector<PXR_NS::UsdShadeShader> &getShaders()#
-
PXR_NS::SdfPath getQueriedPath() const#
-
void setQueriedPath(PXR_NS::SdfPath path, bool addOutline = false)#
-
void getPrimBySelectionMode(PXR_NS::UsdPrim &prim) const#
-
std::recursive_mutex &getMutex()#
-
void update()#
-
bool setSelectedPrimPathsV2(const PXR_NS::SdfPathVector &paths)#
Deprecated.
Use setSelectedPrimPathsV2() with SourceType instead.
- bool setSelectedPrimPathsV2(
- const PXR_NS::SdfPathVector &paths,
- SourceType source,
- SourceBehavior behavior = SourceBehavior::eFabricAll,
Sets all selected prim paths for USD or Fabric stage.
This will replace existing selected paths with given ones.
- Parameters:
paths – The vector of Sdf paths of selected prims to be set.
source – one of SourceType, selection can be set to usd, fabric or both stages.
behavior – only works when source is eAll, when it’s eFabricOnly, Fabric selection will only contain Fabric-only prim paths.
- Returns:
true if the selected paths are changed.
-
PXR_NS::SdfPathVector getSelectedPrimPathsV2() const#
Deprecated.
Use getSelectedPrimPathsV2() with SourceType instead.
-
PXR_NS::SdfPathVector getSelectedPrimPathsV2(SourceType source) const#
Gets all selected prim paths from USD, Fabric stage or both.
- Parameters:
source – one of SourceType, get selection from either usd or fabric stage, or from both as a unified list
- Returns:
a SdfPathVector containing all selected prim paths of USD, Fabric or both stages.
-
bool empty() const#
-
void selectAllPrims(const std::vector<std::string> &typeNames)#
-
void selectInvertedPrims()#
-
SdfPathGroupIdVector &getCustomRenderablePaths()#
-
SdfPathGroupIdVector &getAddedCustomRenderablePaths()#
-
PXR_NS::SdfPathVector &getRemovedCustomRenderablePaths()#
- void setCustomSelection(
- const PXR_NS::SdfPathVector &paths,
- uint8_t groupId,
-
void clearCustomSelection()#
-
Selection(UsdContext *usdContext)#