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,
- allow_non_items: bool = False,
- **kwargs,
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 alist
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
allow_non_items – False - Will log errors if the setting is changed to a value that is not in the items parameter. True - Will allow values that are not in the items parameter.
**kwargs – Additional keyword arguments to omni.ui Widget constructor.