SearchFilterFlag

class omni.kit.hotkeys.window.model.search_filter_flag.SearchFilterFlag(name: str, filter_fn: Callable[[HotkeyDetailItem, str], bool], default: bool = False, filter_by_keyword: bool = True)

Bases: OptionItem

Filter flag for searching. :param name: Flag name. :type name: str :param filter_fn: Callback function to check if word in hotkey. :type filter_fn: Callable[[AbstractFilterItem, HotkeyDetailItem, str], bool]

Kwargs:

default (bool): Flag enabled. Default False. filter_by_keyword (bool): If filter with search words

Methods

__init__(name, filter_fn[, default, ...])

Constructor for OptionItem.

filter(filter_item, item, search_words)

Search list of string.

Attributes

__init__(name: str, filter_fn: Callable[[HotkeyDetailItem, str], bool], default: bool = False, filter_by_keyword: bool = True)

Constructor for OptionItem.

filter(filter_item: AbstractFilterItem, item: HotkeyDetailItem, search_words: List[str]) bool

Search list of string. Return if one word not found.