create_setting_widget_combo#

omni.kit.window.preferences.scripts.preference_builder.create_setting_widget_combo(
setting_path: str,
items: list | dict,
setting_is_index: bool | None = None,
**kwargs,
) Tuple[SettingsComboItemModel, ComboBox]#

Create a Combo Setting widget.

This function creates a combo box that shows a provided list of names and it is connected with setting by path specified. Underlying setting values are used from values of `items` dict.

Parameters:
  • setting_path – Path to the setting to show and edit.

  • items – Can be either dict` or :py:obj:`list`. For :py:obj:`dict keys are UI displayed names, values are actual values set into settings. If it is a list UI displayed names are equal to setting values.

  • setting_is_index – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list

  • **kwargs – Additional keyword arguments to omni.ui Widget constructor