SelectionManipulator
- class omni.kit.manipulator.selection.SelectionManipulator(style: Optional[dict] = None, *args, **kwargs)
Bases:
Manipulator
A manipulator for selecting objects within a scene.
This manipulator allows users to select objects using various gestures, such as dragging for rectangle selection or clicking for single object selection. It can be styled with custom colors and thickness for the selection rectangle.
- Parameters
style (dict, optional) – A dictionary with custom style attributes. Defaults to None.
\*args – Variable length argument list which will be forwarded to execute.
**kwargs – Arbitrary keyword arguments that will be forwarded to execute.
- model
SelectionShapeModel The model associated with the selection manipulator.
- gestures
list A list of gesture recognizers associated with the manipulator.
Methods
__init__
([style])Initializes a selection manipulator with optional custom styling.
on_build
()Builds the selection manipulator's UI elements.
on_model_updated
(item)Updates the selection manipulator when the model changes.
Attributes
- __init__(style: Optional[dict] = None, *args, **kwargs)
Initializes a selection manipulator with optional custom styling.
- Parameters
style (dict, optional) – A dictionary with custom style attributes. Defaults to None.
\*args – Variable length argument list which will be forwarded to execute.
**kwargs – Arbitrary keyword arguments that will be forwarded to execute.
- on_build()
Builds the selection manipulator’s UI elements.
- on_model_updated(item)
Updates the selection manipulator when the model changes.
- Parameters
item – The item in the model that was updated.