disable_selection
- omni.kit.viewport.utility.disable_selection(viewport_or_window, disable_click: bool = True)
Disables selection for a given viewport.
Disable selection rect and possible the single click selection on a Viewport or ViewportWindow. Returns an object that resets selection when it goes out of scope.
- Parameters
viewport_or_window – The viewport API instance or viewport window to which the selection disabling will be applied.
disable_click (bool, optional) – If set to True, disables single click selection. Defaults to True.
- Returns
An object that, upon deletion, will reset the selection capability to its original state.
- Return type
object