create_setting_widget

omni.kit.widget.settings.settings_widget.create_setting_widget(setting_path: str, setting_type: SettingType, range_from=0, range_to=0, speed=1, **kwargs) Tuple[Widget, AbstractValueModel]

Create a UI widget connected with a setting.

If ``range_from`` >= ``range_to`` there is no limit. Undo/redo operations are also supported, because changing setting goes through the omni.kit.commands` module, using :class:`.ChangeSettingCommand.

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

  • setting_type – Type of the setting to expect.

  • range_from – Limit setting value lower bound.

  • range_to – Limit setting value upper bound.

  • speed – Range speed

Returns

ui.Widget` and :class:`ui.AbstractValueModel connected with the setting on the path specified.