DefaultSelectionWatch#
- class omni.kit.widget.stage.DefaultSelectionWatch(tree_view=None, usd_context=None)#
 Bases:
objectA watcher object that updates selections in TreeView when scene selections are updated, and vice versa.
Methods
__init__([tree_view, usd_context])Creates the selection watch instance associated with the given tree view and usd context.
destroy()Destroys the watcher object.
enable_filtering_checking(enable)When `enable` is True, SelectionWatch should consider filtering when changing Kit's selection.
set_filtering(filter_string)Sets the filter string to the given string (all lower case).
set_tree_view(tree_view)Replaces the TreeView that should show the selection with the given TreeView object if they are different.
- __init__(tree_view=None, usd_context=None)#
 Creates the selection watch instance associated with the given tree view and usd context.
- Keyword Arguments:
 tree_view (Optional[omni.ui.TreeView]) – The treeview object to update selections from/to.
usd_context (Optional[omni.usd.UsdContext]) – The current UsdContext.
- destroy()#
 Destroys the watcher object. Clears out event subscriptions.
- enable_filtering_checking(enable: bool)#
 When `enable` is True, SelectionWatch should consider filtering when changing Kit’s selection.
- Parameters:
 enable (bool) – Whether to enable filtering selections.
- set_filtering(filter_string: str | None)#
 Sets the filter string to the given string (all lower case).
- Parameters:
 filter_string (Optional[str]) – The filter string, can be None.
- set_tree_view(tree_view)#
 Replaces the TreeView that should show the selection with the given TreeView object if they are different.
- Parameters:
 tree_view (omni.ui.TreeView) – The tree view object to update to.