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 unused,
- SourceType source,
- bool typeKindFiltering,
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.
unused –
source – one of SourceType, selection can be set to usd, fabric or both stages.
typeKindFiltering – Apply type and model-kind filtering to the paths.
- Returns:
true if the selected paths are changed.
- inline bool setSelectedPrimPaths(
- const std::vector<std::string> &paths,
- bool unused,
- bool typeKindFiltering,
- inline bool setSelectedPrimPaths(
- const std::vector<std::string> &paths,
- bool unused,
- SourceType source,
- bool setSelectedPrimPaths(
- const std::vector<std::string> &paths,
- bool unused,
-
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.
-
std::vector<std::string> getSelectedPrimPaths()#
-
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.
-
inline bool clearSelectedPrimPaths()#
- bool setPrimPathSelected(
- const char *path,
- bool selected,
- bool forcePrimMode,
- bool clearSelected,
- bool unused,
- 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.
forcePrimMode – check if prim meets SelectionType.
clearSelected – true to clear existing selection.
unused –
source – one of SourceType, selection can be set to usd, fabric or both stages.
- Returns:
true if the selected paths are changed.
- bool setPrimPathSelected(
- const char *path,
- bool selected,
- bool forcePrimMode,
- bool clearSelected,
- bool unused,
-
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.
-
bool isPrimPathSelected(const char *path) const#
-
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 forcePrimModeMode,
- bool clearSelected,
- bool unused,
- SourceType source,
- SourceBehavior behavior = SourceBehavior::eFabricAll,
- bool remove(
- PXR_NS::SdfPath path,
- bool forcePrimModeMode,
- SourceType source,
- SourceBehavior behavior = SourceBehavior::eFabricAll,
- bool add(
- PXR_NS::SdfPath path,
- bool forcePrimModeMode,
- bool clearSelected,
- bool unused,
-
bool remove(PXR_NS::SdfPath path, bool forcePrimModeMode)#
-
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,
- SourceType source,
- SourceBehavior behavior,
- bool typeKindFiltering,
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.
typeKindFiltering – Apply type and model-kind filtering to the paths.
- Returns:
true if the selected paths are changed.
- inline bool setSelectedPrimPathsV2(
- const PXR_NS::SdfPathVector &paths,
- SourceType source,
- SourceBehavior behavior = SourceBehavior::eFabricAll,
-
bool setSelectedPrimPathsV2(const PXR_NS::SdfPathVector &paths)#
- bool removeSelectedPrimPathsV2(
- const PXR_NS::SdfPathVector &paths,
- SourceType source,
- SourceBehavior behavior,
- bool typeKindFiltering,
- inline bool removeSelectedPrimPathsV2(
- const PXR_NS::SdfPathVector &paths,
- SourceType source,
- SourceBehavior behavior = SourceBehavior::eFabricAll,
- bool toggleSelectedPrimPathsV2(
- const PXR_NS::SdfPathVector &paths,
- SourceType source,
- SourceBehavior behavior,
- bool typeKindFiltering,
- inline bool toggleSelectedPrimPathsV2(
- const PXR_NS::SdfPathVector &paths,
- SourceType source,
- SourceBehavior behavior = SourceBehavior::eFabricAll,
-
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.
-
PXR_NS::SdfPathVector getSelectedPrimPathsV2() const#
-
bool empty() const#
- void selectAllPrims(
- const std::vector<std::string> &typeNames,
- bool typeKindFiltering,
- inline void selectAllPrims(
- const std::vector<std::string> &typeNames,
-
void selectInvertedPrims(bool typeKindFiltering)#
-
inline 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)#