SettingComboBoxModel#

class omni.kit.viewport.menubar.core.SettingComboBoxModel(
setting_path: str,
texts: List[str],
values: List[Any] | None = None,
current_value: Any = None,
)#

Bases: ComboBoxModel

A data model for items in combobox drop list and get/set value from/to a setting path.

Methods

__init__(setting_path, texts[, values, ...])

Constructor.

destroy()

Release resources.

__init__(
setting_path: str,
texts: List[str],
values: List[Any] | None = None,
current_value: Any = None,
)#

Constructor.

Parameters:
  • setting_path (str) – Setting path

  • texts (List[str]) – Texts displayed in combobox

Keyword Arguments:

values (Optional[List[Any]]) – Values for combobox list, defaults to None to use text as value.

destroy() None#

Release resources.