PrimSelectionPayload#
- class omni.kit.property.usd.PrimSelectionPayload(
- stage: ReferenceType[Stage],
- paths: List[Path],
Bases:
object
A class to encapsulate the selection payload for a USD stage’s prim paths.
This class holds a weak reference to a USD stage and a list of SDF paths representing selected prims. It provides methods to interact with the selection data, including checking the length, iteration, indexing, and determining if the selection exceeds a predefined large selection count.
- Parameters:
stage (weakref.ReferenceType(
Usd.Stage
)) – A weak reference to the stage from which prims are selected.paths (List[
Sdf.Path
]) – A list of SDF paths to selected prims.
Methods
__init__
(stage, paths)Initializes a new instance of the PrimSelectionPayload.
Removes any deleted prims from payload list and returns valid payload
Gets the count of items considered as a large selection.
Gets the list of paths stored in the payload.
Retrieves the stage associated with the payload.
Determines if the current selection is considered large.
set_large_selection_override
(state)Sets the override state for large selection handling.
- __init__(
- stage: ReferenceType[Stage],
- paths: List[Path],
Initializes a new instance of the PrimSelectionPayload.
- cleanup_payload()#
Removes any deleted prims from payload list and returns valid payload
- get_large_selection_count()#
Gets the count of items considered as a large selection.
- Returns:
The count used to determine large selections.
- Return type:
int
- get_paths() List[Path] #
Gets the list of paths stored in the payload.
- Returns:
The paths associated with this payload.
- Return type:
List[
Sdf.Path
]
- get_stage()#
Retrieves the stage associated with the payload.
- Returns:
The stage if available, otherwise None.
- Return type:
weakref.ReferenceType(Usd.Stage)
- is_large_selection() bool #
Determines if the current selection is considered large.
- Returns:
True if the selection is large, otherwise False.
- Return type:
bool
- set_large_selection_override(state: bool)#
Sets the override state for large selection handling.
- Parameters:
state (bool) – True to ignore large selection checks.