[isaacsim.gui.components] Isaac Sim UI Utilities#
Version: 1.7.2
Core UI Elements for Isaac Sim
Enable Extension#
The extension can be enabled (if not already) in one of the following ways:
Define the next entry as an application argument from a terminal.
APP_SCRIPT.(sh|bat) --enable isaacsim.gui.components
Define the next entry under [dependencies] in an experience (.kit) file or an extension configuration (extension.toml) file.
[dependencies]
"isaacsim.gui.components" = {}
Open the Window > Extensions menu in a running application instance and search for isaacsim.gui.components.
Then, toggle the enable control button if it is not already active.
API#
Python API#
UI Utils (Shared UI Elements)
Creates the Standard UI Elements at the top of each Isaac Extension. |
UI Utils (Builder Functions)
Creates a stylized button. |
|
Creates a State Change Button that changes text when pressed. |
|
Creates a Row of Stylized Buttons |
|
Creates a Stylized Checkbox |
|
Creates a Row of Stylized Checkboxes. |
|
Creates a Stylized Stringfield Widget |
|
Creates a Stylized Intfield Widget |
|
Creates a Stylized Floatfield Widget |
|
Creates a Stylized Checkbox + Stringfield Widget |
|
Creates a Stylized Dropdown Combobox |
|
Creates a Stylized Multi-Dropdown Combobox |
|
Creates a Stylized Dropdown Combobox with an Enable Checkbox |
|
Creates a Stylized IntField + Stringfield Widget |
|
Creates a Stylized FloatField + FloatSlider Widget |
|
Creates a Labeled Scrolling Frame with CopyToClipboard button |
|
Creates a Labeled, Checkbox-enabled Scrolling Frame with CopyToClipboard button |
|
Create a multi-axis float drag widget with X, Y, Z, W labels. |
|
Creates a Color Picker Widget |
|
Creates a Progress Bar Widget |
UI Utils (Plotting Functions)
Creates a stylized static plot |
|
Creates a Checkbox-Enabled dyanamic plot |
|
Creates a stylized static XYZ plot |
|
Create a checkbox-enabled XYZ plot widget. |
UI Utils (Aesthetic Functions)
Aesthetic element to adds a Line Separator. |
UI Element Wrappers
Create a Frame UI element |
|
Create a CollapsableFrame UI element |
|
Create a ScrollingFrame UI element with a specified size. |
|
Creates a IntField UI element. |
|
Creates a FloatField UI element. |
|
Create StringField UI Element. |
|
Create a Button UI Element |
|
Create a CheckBox UI Element |
|
Creates a State Button UI element. |
|
Create a DropDown UI element. |
|
Create a ColorPicker UI element to allow user-selection of an RGBA color |
|
Create a text block that is only modifiable through code. |
|
Creates an interactive XY plot widget for visualizing data with multiple plot support, axis scaling, and legends. |
Builder Functions#
- ui_utils.btn_builder(
- type: str = 'button',
- text: str = 'button',
- tooltip: str = '',
- on_clicked_fn=None,
Creates a stylized button.
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
text – Text rendered on the button.
tooltip – Tooltip to display over the Label.
on_clicked_fn – Call-back function when clicked.
- Returns:
Button
- ui_utils.state_btn_builder(
- type: str = 'state_button',
- a_text: str = 'STATE A',
- b_text: str = 'STATE B',
- tooltip: str = '',
- on_clicked_fn=None,
Creates a State Change Button that changes text when pressed.
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
a_text – Text rendered on the button for State A.
b_text – Text rendered on the button for State B.
tooltip – Tooltip to display over the Label.
on_clicked_fn – Call-back function when clicked.
- Returns:
The created button widget.
- ui_utils.multi_btn_builder(
- type='multi_button',
- count=2,
- text=['button', 'button'],
- tooltip=['', '', ''],
- on_clicked_fn=[None, None],
Creates a Row of Stylized Buttons
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
count – Number of UI elements to create.
text – List of text rendered on the UI elements.
tooltip – List of tooltips to display over the UI elements.
on_clicked_fn – List of call-backs function when clicked.
- Returns:
List of Buttons
- ui_utils.cb_builder(
- type: str = 'checkbox',
- default_val: bool = False,
- tooltip: str = '',
- on_clicked_fn=None,
Creates a Stylized Checkbox
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Whether the checkbox is checked.
tooltip – Tooltip to display over the Label.
on_clicked_fn – Call-back function when clicked.
- Returns:
model
- ui_utils.multi_cb_builder(
- type='multi_checkbox',
- count=2,
- text=[' ', ' '],
- default_val=[False, False],
- tooltip=['', '', ''],
- on_clicked_fn=[None, None],
Creates a Row of Stylized Checkboxes.
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
count – Number of UI elements to create.
text – List of text rendered on the UI elements.
default_val – List of default values. Checked is True, Unchecked is False.
tooltip – List of tooltips to display over the UI elements.
on_clicked_fn – List of call-backs function when clicked.
- Returns:
List of models
- ui_utils.str_builder(
- type: str = 'stringfield',
- default_val: str = ' ',
- tooltip: str = '',
- on_clicked_fn=None,
- use_folder_picker: bool = False,
- read_only: bool = False,
- item_filter_fn=None,
- bookmark_label: str | None = None,
- bookmark_path: str | None = None,
- folder_dialog_title: str = 'Select Output Folder',
- folder_button_title: str = 'Select Folder',
Creates a Stylized Stringfield Widget
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Text to initialize in Stringfield.
tooltip – Tooltip to display over the UI elements.
on_clicked_fn – Callback function when the field value changes.
use_folder_picker – Add a folder picker button to the right.
read_only – Prevents editing.
item_filter_fn – filter function to pass to the FilePicker
bookmark_label – bookmark label to pass to the FilePicker
bookmark_path – bookmark path to pass to the FilePicker
folder_dialog_title – Title for the folder picker dialog.
folder_button_title – Title for the folder picker button.
- Returns:
model of Stringfield
- ui_utils.int_builder(
- type='intfield',
- default_val=0,
- tooltip='',
- min=-9223372036854775807,
- max=9223372036854775807,
Creates a Stylized Intfield Widget
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Default Value of UI element.
tooltip – Tooltip to display over the UI elements.
min – Minimum limit for int field.
max – Maximum limit for int field.
- Returns:
model
- Return type:
AbstractValueModel
- ui_utils.float_builder(
- type='floatfield',
- default_val=0,
- tooltip='',
- min=-inf,
- max=inf,
- step=0.1,
- format='%.2f',
Creates a Stylized Floatfield Widget
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Default Value of UI element.
tooltip – Tooltip to display over the UI elements.
min – Minimum Value.
max – Maximum Value.
step – Step size.
format – Format string for display.
- Returns:
model
- Return type:
AbstractValueModel
- ui_utils.combo_cb_str_builder(type: str = 'checkbox_stringfield', default_val: list = [False, ' '], tooltip: str = '', on_clicked_fn=<function <lambda>>, use_folder_picker: bool = False, read_only: bool = False, folder_dialog_title: str = 'Select Output Folder', folder_button_title: str = 'Select Folder')#
Creates a Stylized Checkbox + Stringfield Widget
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Text to initialize in Stringfield.
tooltip – Tooltip to display over the UI elements.
on_clicked_fn – Call-back function when clicked.
use_folder_picker – Add a folder picker button to the right.
read_only – Prevents editing.
folder_dialog_title – Dialog title for folder picker.
folder_button_title – Button title for folder picker.
- Returns:
(cb_model, str_field_model)
- ui_utils.dropdown_builder(
- type='dropdown',
- default_val=0,
- items=['Option 1', 'Option 2', 'Option 3'],
- tooltip='',
- on_clicked_fn=None,
Creates a Stylized Dropdown Combobox
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Default index of dropdown items.
items – List of items for dropdown box.
tooltip – Tooltip to display over the Label.
on_clicked_fn – Call-back function when clicked.
- Returns:
model
- Return type:
AbstractItemModel
- ui_utils.multi_dropdown_builder(
- type='multi_dropdown',
- count=2,
- default_val=[0, 0],
- items=[['Option 1', 'Option 2', 'Option 3'], ['Option A', 'Option B', 'Option C']],
- tooltip='',
- on_clicked_fn=[None, None],
Creates a Stylized Multi-Dropdown Combobox
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
count – Number of UI elements.
default_val – List of default indices of dropdown items.
items – List of list of items for dropdown boxes.
tooltip – Tooltip to display over the Label.
on_clicked_fn – List of call-back function when clicked.
- Returns:
list(models)
- Return type:
list(AbstractItemModel)
- ui_utils.combo_cb_dropdown_builder(type: str = 'checkbox_dropdown', default_val: list = [False, 0], items: list = ['Option 1', 'Option 2', 'Option 3'], tooltip: str = '', on_clicked_fn: list = [<function <lambda>>, None])#
Creates a Stylized Dropdown Combobox with an Enable Checkbox
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – list(cb_default, dropdown_default).
items – List of items for dropdown box.
tooltip – Tooltip to display over the Label.
on_clicked_fn – List of callback functions.
- Returns:
(cb_model, combobox)
- ui_utils.combo_intfield_slider_builder(
- type='intfield_stringfield',
- default_val=0.5,
- min=0,
- max=1,
- step=0.01,
- tooltip=['', ''],
Creates a Stylized IntField + Stringfield Widget
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Default Value.
min – Minimum Value.
max – Maximum Value.
step – Step.
tooltip – List of tooltips.
- Returns:
(flt_field_model, flt_slider_model)
- Return type:
Tuple(AbstractValueModel, IntSlider)
- ui_utils.combo_floatfield_slider_builder(
- type: str = 'floatfield_stringfield',
- default_val: float = 0.5,
- min: int = 0,
- max: int = 1,
- step: float = 0.01,
- tooltip: list = ['', ''],
Creates a Stylized FloatField + FloatSlider Widget
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Default Value.
min – Minimum Value.
max – Maximum Value.
step – Step.
tooltip – List of tooltips.
- Returns:
(flt_field_model, flt_slider_model)
- ui_utils.scrolling_frame_builder(
- type='scrolling_frame',
- default_val='No Data',
- tooltip='',
Creates a Labeled Scrolling Frame with CopyToClipboard button
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Default Text.
tooltip – Tooltip to display over the Label.
- Returns:
label
- Return type:
ui.Label
- ui_utils.combo_cb_scrolling_frame_builder(type: str = 'cb_scrolling_frame', default_val: list = [False, 'No Data'], tooltip: str = '', on_clicked_fn=<function <lambda>>)#
Creates a Labeled, Checkbox-enabled Scrolling Frame with CopyToClipboard button
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – List of Checkbox and Frame Defaults.
tooltip – Tooltip to display over the Label.
on_clicked_fn – Callback function when clicked.
- Returns:
(model, label)
- ui_utils.xyz_builder(
- tooltip: str = '',
- axis_count: int = 3,
- default_val: list[float] = [0.0, 0.0, 0.0, 0.0],
- min: float = -inf,
- max: float = inf,
- step: float = 0.001,
- on_value_changed_fn: list = [None, None, None, None],
Create a multi-axis float drag widget with X, Y, Z, W labels.
- Parameters:
label – Label to the left of the UI element.
tooltip – Tooltip text for the widget.
axis_count – Number of axes to display (1-4).
default_val – List of default values.
min – Minimum float value.
max – Maximum float value.
step – Drag step size.
on_value_changed_fn – List of callback functions for each axis.
- Returns:
List of value models for each axis.
- ui_utils.color_picker_builder(
- type: str = 'color_picker',
- default_val: list = [1.0, 1.0, 1.0, 1.0],
- tooltip: str = 'Color Picker',
Creates a Color Picker Widget
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – List of (R,G,B,A) default values.
tooltip – Tooltip to display over the Label.
- Returns:
ui.ColorWidget.model
- ui_utils.progress_bar_builder(
- type='progress_bar',
- default_val=0,
- tooltip='Progress',
Creates a Progress Bar Widget
- Parameters:
label – Label to the left of the UI element.
type – Type of UI element.
default_val – Starting Value.
tooltip – Tooltip to display over the Label.
- Returns:
ui.ProgressBar().model
- Return type:
AbstractValueModel
Plotting Functions#
- ui_utils.plot_builder(
- data=None,
- min=-1,
- max=1,
- type=omni.ui.Type.LINE,
- value_stride=1,
- color=None,
- tooltip='',
Creates a stylized static plot
- Parameters:
label – Label to the left of the UI element.
data – Data to plot.
min – Minimum Y Value.
max – Maximum Y Value.
type – Plot Type.
value_stride – Width of plot stride.
color – Plot color.
tooltip – Tooltip to display over the Label.
- Returns:
plot
- Return type:
ui.Plot
- ui_utils.combo_cb_plot_builder(
- default_val: bool = False,
- on_clicked_fn=<function <lambda>>,
- data=None,
- min: int = -1,
- max: int = 1,
- type=omni.ui.Type.LINE,
- value_stride: int = 1,
- color=None,
- tooltip: str = '',
Creates a Checkbox-Enabled dyanamic plot
- Parameters:
label – Label to the left of the UI element.
default_val – Checkbox default.
on_clicked_fn – Checkbox Callback function.
data – Data to plat.
min – Min Y Value.
max – Max Y Value.
type – Plot Type.
value_stride – Width of plot stride.
color – Plot color.
tooltip – Tooltip to display over the Label.
- Returns:
(cb_model, plot)
- ui_utils.xyz_plot_builder(
- data: list = [],
- min: int = -1,
- max: int = 1,
- tooltip: str = '',
Creates a stylized static XYZ plot
- Parameters:
label – Label to the left of the UI element.
data – Data to plot.
min – Minimum Y Value.
max – Maximum Y Value.
tooltip – Tooltip to display over the Label.
- Returns:
list(x_plot, y_plot, z_plot)
- ui_utils.combo_cb_xyz_plot_builder(
- default_val: bool = False,
- on_clicked_fn=<function <lambda>>,
- data: list = [],
- min: int = -1,
- max: int = 1,
- type=omni.ui.Type.LINE,
- value_stride: int = 1,
- tooltip: str = '',
Create a checkbox-enabled XYZ plot widget.
- Parameters:
label – Label to the left of the UI element.
default_val – Checkbox default state.
on_clicked_fn – Checkbox callback function.
data – Data to plot for each axis.
min – Minimum Y value.
max – Maximum Y value.
type – Plot type.
value_stride – Width of plot stride.
tooltip – Tooltip to display over the Label.
- Returns:
Tuple of plot list and value model list.
Aesthetic Functions#
- ui_utils.add_separator()#
Aesthetic element to adds a Line Separator.
UI Element Wrappers#
- class Frame(
- enabled: bool = True,
- visible: bool = True,
- build_fn: Callable = None,
Bases:
UIWidgetWrapperCreate a Frame UI element
- Parameters:
enabled – Frame is enabled.
visible – Frame is visible.
build_fn – A function that can be called to specify what should fill the Frame. Function should take no arguments. Return values will not be used.
- cleanup()#
Perform any necessary cleanup.
- rebuild()#
Rebuild the Frame using the specified build_fn.
- set_build_fn(build_fn: Callable)#
Set the build_fn to use when rebuilding the frame.
- Parameters:
build_fn – Build function to use when rebuilding the frame. Function should take no arguments. Return values will not be used.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property frame: omni.ui.Frame#
A UI Frame.
- Returns:
A UI Frame.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class CollapsableFrame(
- title: str,
- collapsed: bool = True,
- enabled: bool = True,
- visible: bool = True,
- build_fn: Callable = None,
Bases:
FrameCreate a CollapsableFrame UI element
- Parameters:
title – Title of Collapsable Frame
collapsed – Frame is collapsed.
enabled – Frame is enabled.
visible – Frame is visible.
build_fn – A function that can be called to specify what should fill the Frame. Function should take no arguments. Return values will not be used.
- cleanup()#
Perform any necessary cleanup.
- rebuild()#
Rebuild the Frame using the specified build_fn.
- set_build_fn(build_fn: Callable)#
Set the build_fn to use when rebuilding the frame.
- Parameters:
build_fn – Build function to use when rebuilding the frame. Function should take no arguments. Return values will not be used.
- property collapsed: bool#
Whether CollapsableFrame is collapsed.
- Returns:
True if CollapsableFrame is collapsed.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property frame: omni.ui.Frame#
A UI Frame.
- Returns:
A UI Frame.
- property title: str#
Title text of CollapsableFrame.
- Returns:
Title text of CollapsableFrame.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class ScrollingFrame(
- num_lines=None,
- enabled: bool = True,
- visible: bool = True,
- build_fn: Callable = None,
Bases:
FrameCreate a ScrollingFrame UI element with a specified size.
- Parameters:
num_lines – Determines height of ScrollingFrame element in terms of the typical line height of UI elements. If not specified, the ScrollingFrame will fill the space it can in the UI Window.
enabled – Frame is enabled.
visible – Frame is visible.
build_fn – A function that can be called to specify what should fill the Frame. Function should take no arguments. Return values will not be used.
- cleanup()#
Perform any necessary cleanup.
- rebuild()#
Rebuild the Frame using the specified build_fn.
- set_build_fn(build_fn: Callable)#
Set the build_fn to use when rebuilding the frame.
- Parameters:
build_fn – Build function to use when rebuilding the frame. Function should take no arguments. Return values will not be used.
- set_num_lines(num_lines: int)#
Set the height of the ScrollingFrame element in terms of the typical line height of other UI elements.
- Parameters:
num_lines – Number of lines that should be shown in a ScrollingFrame.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property frame: omni.ui.Frame#
A UI Frame.
- Returns:
A UI Frame.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class IntField(
- label: str,
- tooltip: str = '',
- default_value: int = 0,
- lower_limit: int = None,
- upper_limit: int = None,
- on_value_changed_fn: Callable = None,
Bases:
UIWidgetWrapperCreates a IntField UI element.
- Parameters:
label – Short descriptive text to the left of the IntField.
tooltip – Text to appear when the mouse hovers over the IntField.
default_value – Default value of the IntField.
lower_limit – Lower limit of integer.
upper_limit – Upper limit of integer.
on_value_changed_fn – Function to be called when the value of the int is changed. The function should take an int as an argument. The return value will not be used.
- cleanup()#
Perform any necessary cleanup.
- get_lower_limit() int#
Get the lower limit on the IntField.
- Returns:
Lower Limit on IntField
- Return type:
int
- get_upper_limit() int#
Get the upper limit on the IntField.
- Returns:
Upper Limit on IntField
- Return type:
int
- get_value() int#
Get the current value of the int field
- Returns:
Current value of the int field
- Return type:
int
- set_lower_limit(lower_limit: int)#
Set lower limit of IntField. If current value is lower than lower_limit, the current value will be clipped to lower_limit
- Parameters:
lower_limit (int) – lower limit of IntField
- set_on_value_changed_fn(
- on_value_changed_fn: Callable,
Set function that is called when the value of the IntField is modified
- Parameters:
on_value_changed_fn (Callable) – Function that is called when the value of the IntField is modified. Function should take a int as the argument. The return value will not be used.
- set_upper_limit(upper_limit: int)#
Set upper limit of IntField. If current value is higher than upper_limit, the current value will be clipped to upper_limit
- Parameters:
upper_limit (int) – Upper limit of IntField
- set_value(val: int)#
Set the value in the IntField
- Parameters:
val (int) – Value to fill IntField
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property int_field: omni.ui.IntField#
Returns: omni.ui.IntField: UI IntField elements
- property label: omni.ui.Label#
Returns: omni.ui.Label: UI Label element that contains the descriptive text
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class FloatField(
- label: str,
- tooltip: str = '',
- default_value: float = 0.0,
- step: float = 0.01,
- format: str = '%.2f',
- lower_limit: float = None,
- upper_limit: float = None,
- on_value_changed_fn: Callable = None,
- on_end_edit_fn: Callable = None,
Bases:
UIWidgetWrapperCreates a FloatField UI element.
- Parameters:
label – Short descriptive text to the left of the FloatField.
tooltip – Text to appear when the mouse hovers over the FloatField.
default_value – Default value of the Float Field.
step – Smallest increment that the user can change the float by when dragging mouse.
format – Formatting string for float.
lower_limit – Lower limit of float.
upper_limit – Upper limit of float.
on_value_changed_fn – Function to be called when the value of the float is changed. The function should take a float as an argument. The return value will not be used.
on_end_edit_fn – Function to be called when the user finishes editing the FloatField. The function should take a float as an argument. The return value will not be used.
- cleanup()#
Perform any necessary cleanup.
- get_lower_limit() float#
Get the lower limit on the FloatField
- Returns:
Lower limit on FloatField
- Return type:
float
- get_upper_limit() float#
Get the upper limit on the FloatField
- Returns:
Upper limit on FloatField
- Return type:
float
- get_value() float#
Return the current value of the FloatField
- Returns:
Current value of the FloatField
- Return type:
float
- set_lower_limit(lower_limit: float)#
Set lower limit of FloatField. If current value is lower than lower_limit, the current value will be clipped to lower_limit
- Parameters:
lower_limit (float) – lower limit of FloatField
- set_on_end_edit_fn(on_end_edit_fn: Callable)#
Set function that is called when the user finishes editing the FloatField
- Parameters:
on_end_edit_fn (Callable) – Function that is called when the user finishes editing the FloatField. Function should take a float as the argument. The return value will not be used.
- set_on_value_changed_fn(
- on_value_changed_fn: Callable,
Set function that is called when the value of the FloatField is modified
- Parameters:
on_value_changed_fn (Callable) – Function that is called when the value of the FloatField is modified. Function should take a float as the argument. The return value will not be used.
- set_upper_limit(upper_limit: float)#
Set upper limit of FloatField. If current value is higher than upper_limit, the current value will be clipped to upper_limit
- Parameters:
upper_limit (float) – Upper limit of FloatField
- set_value(val: float)#
Set the value in the FloatField
- Parameters:
val (float) – Value to fill FloatField
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property float_field: omni.ui.FloatField#
Returns: omni.ui.FloatField: UI FloatField element
- property label: omni.ui.Label#
Returns: omni.ui.Label: UI Label element that contains the descriptive text
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class StringField(
- label: str,
- tooltip: str = '',
- default_value: str = '',
- read_only=False,
- multiline_okay=False,
- on_value_changed_fn: Callable = None,
- use_folder_picker=False,
- item_filter_fn=None,
- bookmark_label=None,
- bookmark_path=None,
- folder_dialog_title='Select Output Folder',
- folder_button_title='Select Folder',
Bases:
UIWidgetWrapperCreate StringField UI Element.
Starting at use_folder_picker, the arguments to the StringField all pertain to the folder_picker. If the folder_picker is not used, these arguments may all be ignored.
- Parameters:
label – Label to the left of the UI element.
tooltip – Tooltip to display over the UI elements.
default_value – Text to initialize in Stringfield.
read_only – Prevents editing.
multiline_okay – If True, allow newline character in input strings.
on_value_changed_fn – Function called when value of StringField is changed. The function should take a string as an argument. The return value will not be used.
use_folder_picker – Add a folder picker button to the right.
item_filter_fn – Filter function to pass to the FilePicker. This function should take a string as an argument and return a boolean. When the user opens the file picker, every file in the directory they are viewing will be passed to item_filter_fn, and when True is returned, the file will be shown. When False is returned, the file will not be shown. This can be used to ensure that the user may only select valid file types.
bookmark_label – Bookmark label to pass to the FilePicker. This will create a bookmark when the file picker is used with the label specified here.
bookmark_path – Bookmark path to pass to the FilePicker. This will create a bookmark when the file picker is used with the path specified here.
folder_dialog_title – Title for the folder picker dialog.
folder_button_title – Title for the folder picker button.
- add_folder_picker_icon(
- on_click_fn,
- item_filter_fn=None,
- bookmark_label=None,
- bookmark_path=None,
- dialog_title='Select Output Folder',
- button_title='Select Folder',
Add a folder picker icon button to the StringField.
- Parameters:
on_click_fn – Function to call when a file is selected from the picker.
item_filter_fn – Filter function to pass to the FilePicker.
bookmark_label – Bookmark label to pass to the FilePicker.
bookmark_path – Bookmark path to pass to the FilePicker.
dialog_title – Title for the folder picker dialog.
button_title – Title for the folder picker button.
- cleanup()#
Perform any necessary cleanup.
- get_value() str#
Return the current value of the StringField
- Returns:
Current value of the StringField.
- set_item_filter_fn(item_filter_fn: Callable)#
Set the filter function that will be used with the file picker
- Parameters:
item_filter_fn – Filter function that will be called to filter the files shown in the picker. This function should take a string file_path as the argument. The return value should be a bool, with True indicating the the file should be shown to the user in the file picker.
- set_multiline_okay(multiline_okay: bool)#
Set the StringFiled to allow the newline character
- Parameters:
multiline_okay – If True, allow newline character in strings.
- set_on_value_changed_fn(
- on_value_changed_fn: Callable,
Set function that is called when the value of the StringField is modified
- Parameters:
on_value_changed_fn – Function that is called when the value of the StringField is modified. Function should take a string as the argument. The return value will not be used.
- set_read_only(read_only: bool)#
Set this StringField to be read only
- Parameters:
read_only – If True, StringField cannot be modified through the UI; it can still be modified programmatically with set_value()
- set_value(val: str)#
Set the value of the StringField
- Parameters:
val – Value to fill StringField
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property file_picker_btn: omni.ui.Button#
Button to activate file picker.
- Returns:
Button to activate file picker.
- property file_picker_frame: omni.ui.Frame#
UI Frame containing FilePicker.
- Returns:
UI Frame containing FilePicker.
- property label: omni.ui.Label#
UI Label element that contains the descriptive text.
- Returns:
UI Label element that contains the descriptive text.
- property string_field: omni.ui.StringField#
UI StringField element.
- Returns:
UI StringField element.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class Button(label: str, text: str, tooltip='', on_click_fn=None)#
Bases:
UIWidgetWrapperCreate a Button UI Element
- Parameters:
label – Short descriptive text to the left of the Button.
text – Text on the Button.
tooltip – Text to appear when the mouse hovers over the Button.
on_click_fn – Callback function that will be called when the button is pressed. Function should take no arguments. The return value will not be used.
- cleanup()#
Perform any necessary cleanup.
- set_on_click_fn(on_click_fn: Callable)#
Set the callback function for when the Button is clicked.
- Parameters:
on_click_fn – Callback function for when Button is clicked. The function should take a single bool argument. The return value will not be used.
- trigger_click()#
Trigger identical behavior as if the user pressed the Button through the UI.
- property button: omni.ui.Button#
UI Button element.
- Returns:
UI Button element.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property label: omni.ui.Label#
UI Label element that contains the descriptive text.
- Returns:
UI Label element that contains the descriptive text.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class CheckBox(
- label: str,
- default_value: bool = False,
- tooltip: str = '',
- on_click_fn=None,
Bases:
UIWidgetWrapperCreate a CheckBox UI Element
- Parameters:
label – Short descriptive text to the left of the CheckBox
default_value – If True, CheckBox will be checked.
tooltip – Text to appear when the mouse hovers over the CheckBox.
on_click_fn – Callback function that will be called when the CheckBox is pressed. Function should take a single bool argument. The return value will not be used.
- cleanup()#
Perform any necessary cleanup.
- get_value() bool#
Get the current checked state of the CheckBox.
- Returns:
True if CheckBox is checked, False otherwise.
- set_on_click_fn(on_click_fn: Callable)#
Set the function that will be called when the CheckBox is clicked.
- Parameters:
on_click_fn – Callback function for when CheckBox is clicked. The function should take a single bool argument. The return value will not be used.
- set_value(val: bool)#
Set the checked state of the CheckBox.
- Parameters:
val – If True, set CheckBox to checked state.
- property checkbox: omni.ui.CheckBox#
UI CheckBox element.
- Returns:
UI CheckBox element.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property label: omni.ui.Label#
UI Label element that contains the descriptive text.
- Returns:
UI Label element that contains the descriptive text.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class StateButton(
- label: str,
- a_text: str,
- b_text: str,
- tooltip='',
- on_a_click_fn: Callable = None,
- on_b_click_fn: Callable = None,
- physics_callback_fn: Callable = None,
Bases:
UIWidgetWrapperCreates a State Button UI element. A StateButton is a button that changes between two states A and B when clicked. In state A, the StateButton has a_text written on it, and in state B, the StateButton has b_text written on it.
- Parameters:
label – Short descriptive text to the left of the StateButton.
a_text – Text on the StateButton in one of its two states.
b_text – Text on the StateButton in the other of its two states.
tooltip – Text that appears when the mouse hovers over the button.
on_a_click_fn – A function that should be called when the button is clicked while in state A. Function should have 0 arguments. The return value will not be used.
on_b_click_fn – A function that should be called when the button is clicked while in state B. Function should have 0 arguments. The return value will not be used.
physics_callback_fn – A function that will be called on every physics step while the button is in state B (a_text was pressed). The function should have one argument for physics step size (float). The return value will not be used.
- cleanup()#
Remove physics callback created by the StateButton if exists.
- get_current_text() str#
Get the current text on the button.
- Returns:
The current text on the button.
- is_in_a_state() bool#
Return True if the StateButton is in the a state. False implies that it is in the b state.
- Returns:
True when the StateButton is in the b state.
- reset()#
Reset StateButton to state A.
- set_on_a_click_fn(on_a_click_fn: Callable)#
Set a function that is called when the button is clicked in state A.
- Parameters:
on_a_click_fn – A function that is called when the button is clicked in state A. Function should take no arguments. The return value will not be used.
- set_on_b_click_fn(on_b_click_fn: Callable)#
Set a function that is called when the button is clicked in state B.
- Parameters:
on_b_click_fn – A function that is called when the button is clicked in state B. Function should take no arguments. The return value will not be used.
- set_physics_callback_fn(
- physics_callback_fn: Callable,
- Set a physics callback function that will be called on every physics step while the StateButton is
in state B.
- Parameters:
physics_callback_fn – A function that will be called on every physics step while the button is in state B (a_text was pressed). The function should have one argument for physics step size (float). The return value will not be used.
- trigger_click_if_a_state()#
If in the A state, trigger button to execute the same behavior as if it were clicked by the user. If the button is in the B state, nothing will happen.
- trigger_click_if_b_state()#
If in the B state, trigger button to execute the same behavior as if it were clicked by the user. If the button is in the A state, nothing will happen. This is distinct from calling reset() because the user on_b_click_fn() will be triggered.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property label: omni.ui.Label#
UI Label element that contains the descriptive text.
- Returns:
UI Label element that contains the descriptive text.
- property state_button: omni.ui.Button#
UI Button element.
- Returns:
UI Button element.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class DropDown(
- label: str,
- tooltip: str = '',
- populate_fn: Callable = None,
- on_selection_fn: Callable = None,
- keep_old_selections: bool = False,
- add_flourish: bool = True,
Bases:
UIWidgetWrapperCreate a DropDown UI element. A DropDown menu can be populated by the user, with a callback function specified for when an item is selected.
- Parameters:
label – Short descriptive text to the left of the DropDown.
tooltip – Text to appear when the mouse hovers over the DropDown.
populate_fn – A user-defined function that returns a list[str] of items that should populate the drop-down menu. This Function should have 0 arguments.
on_selection_fn – A user-defined callback function for when an element is selected from the DropDown. The function should take in a string argument of the selection. The return value will not be used.
keep_old_selections – When the DropDown is repopulated with the user-defined populate_fn, the default behavior is to reset the selection in the DropDown to be at index 0. If the user sets keep_old_selections=True, when the DropDown is repopulated and the old selection is still one of the options, the new selection will match the old selection.
add_flourish – Whether to add visual flourish to the DropDown element.
- cleanup()#
Perform any necessary cleanup.
- get_items() List[str]#
Get the items in the DropDown
- Returns:
A list of the options in the DropDown
- get_selection() str#
Get current selection in DropDown
- Returns:
Current selection in DropDown
- get_selection_index() int#
Get index of selection in DropDown menu
- Returns:
Index of selection in DropDown menu
- repopulate()#
A function that the user can call to make the DropDown menu repopulate. This will call the populate_fn set by the user.
- set_items(items: List[str], select_index: int = None)#
Set the items in the DropDown explicitly.
- Parameters:
items – New set of items in the DropDown
select_index – Index of item to select. If left as None, behavior is determined by the keep_old_selections flag.
- set_keep_old_selection(val: bool)#
Set keep_old_selection flag to determine behavior when repopulating the DropDown
- Parameters:
val (bool) – When the DropDown is repopulated with the user-defined populate_fn, the default behavior is to reset the selection in the DropDown to be at index 0. If the user sets keep_old_selections=True, when the DropDown is repopulated and the old selection is still one of the options, the new selection will match the old selection, and the on_selection_fn() will not be called.
- set_on_selection_fn(on_selection_fn: Callable)#
Set the function that gets called when a new item is selected from the DropDown
- Parameters:
on_selection_fn (Callable) – A function that is called when a new item is selected from the DropDown. he function should take in a string argument of the selection. Its return value is not used.
- set_populate_fn(
- populate_fn: Callable,
- repopulate: bool = True,
Set the populate_fn for this DropDown
- Parameters:
populate_fn – Function used to specify the options that fill the DropDown. Function should take no arguments and return a list[str].
repopulate – If true, repopulate the DropDown using the new populate_fn.
- set_populate_fn_to_find_all_usd_objects_of_type(
- object_type: str,
- repopulate=True,
Set the populate_fn to find all objects of a specified type on the USD stage. This is included as a convenience function to fulfill one common use-case for a DropDown menu. This overrides the populate_fn set by the user.
- Parameters:
object_type (str) – A string name of the type of USD object matching the output of get_prim_object_type(prim_path)
repopulate (bool, optional) – Repopulate the DropDown immediately. Defaults to True.
- set_selection(selection: str)#
Set the selected item in the DropDown. If the specifified selection is not in the DropDown, nothing will happen.
- Parameters:
selection – Item to select in the DropDown
- set_selection_by_index(select_index: int)#
Set the selected item in the DropDown by index. If the provided index is out of bounds, nothing will happen.
- Parameters:
select_index – Index of item to select from DropDown
- trigger_on_selection_fn_with_current_selection()#
Call the user on_selection_fn() with whatever item is currently selected in the DropDown.
- property combobox: omni.ui.ComboBox#
UI ComboBox element.
- Returns:
UI ComboBox element.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property label: omni.ui.Label#
UI Label element that contains the descriptive text.
- Returns:
UI Label element that contains the descriptive text.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class ColorPicker(
- label: str,
- default_value: List[float] = [1.0, 1.0, 1.0, 1.0],
- tooltip: str = '',
- on_color_picked_fn: Callable = None,
Bases:
UIWidgetWrapperCreate a ColorPicker UI element to allow user-selection of an RGBA color
- Parameters:
label – Short descriptive text to the left of the ColorPicker
default_value – RGBA color values between 0 and 1.
tooltip – Text to appear when the mouse hovers over the ColorPicker.
on_color_picked_fn – Function that will be called if the user picks a new color. Function should expect a List[float] as an argument with four RGBA color values between 0 and 1. The return value will not be used.
- cleanup()#
Perform any necessary cleanup.
- get_color() List[float]#
Get the RGBA value of the selected color
- Returns:
RGBA color value with four values between 0 and 1.
- set_color(color: List[float])#
Set the RGBA color value of the selected color
- Parameters:
color – RGBA color value with four values between 0 and 1.
- set_on_color_picked_fn(
- on_color_picked_fn: Callable,
Set the function that should be called if the user picks a new color
- Parameters:
on_color_picked_fn – Function that will be called if the user picks a new color. Function should expect a List[float] as an argument with four RGBA color values between 0 and 1. The return value will not be used.
- property color_picker: omni.ui.ColorWidget#
UI ColorWidget element.
- Returns:
UI ColorWidget element.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property label: omni.ui.Label#
UI Label element that contains the descriptive text.
- Returns:
UI Label element that contains the descriptive text.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class TextBlock(
- label: str,
- text: str = '',
- tooltip: str = '',
- num_lines: int = 5,
- include_copy_button: bool = True,
Bases:
UIWidgetWrapperCreate a text block that is only modifiable through code. The user may not set the value of the text in the UI.
- Parameters:
label – Short description of the contents of the TextBlock.
text – Text to put in the TextBlock.
tooltip – Text to appear when the mouse hovers over the TextBlock.
num_lines – Number of lines that should be visible in the TextBlock at one time.
include_copy_button – Include a copy_to_clipboard button.
- cleanup()#
Perform any necessary cleanup.
- get_text() str#
Get the current text in the text block.
- Returns:
Text in the text block.
- set_num_lines(num_lines: int)#
Set the number of lines that should be visible in the TextBlock at one time.
- Parameters:
num_lines – Number of lines that should be visible in the TextBlock at one time.
- set_text(text: str)#
Set the text content in the text block.
- Parameters:
text – Text to set in the text block.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property copy_btn: omni.ui.Button#
Copy Button. If the TextBlock was built without a copy button, this will return None.
- Returns:
Copy Button. If the TextBlock was built without a copy button, this will return None.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property label: omni.ui.Label#
UI Label element that contains the descriptive text.
- Returns:
UI Label element that contains the descriptive text.
- property scrolling_frame: omni.ui.ScrollingFrame#
Scrolling Frame that contains the TextBlock text.
- Returns:
Scrolling Frame that contains the TextBlock text.
- property text_block: omni.ui.Label#
UI element that contains the text in the text block.
- Returns:
UI element that contains the text in the text block.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.
- class XYPlot(
- label: str,
- tooltip: str = '',
- x_data: List[List] | List = [],
- y_data: List[List] | List = [],
- x_min: float = None,
- x_max: float = None,
- y_min: float = None,
- y_max: float = None,
- x_label: str = 'X',
- y_label: str = 'Y',
- plot_height: int = 10,
- show_legend: bool = False,
- legends: List[str] = None,
- plot_colors: List[List[int]] = None,
Bases:
UIWidgetWrapperCreates an interactive XY plot widget for visualizing data with multiple plot support, axis scaling, and legends.
The plot widget supports multiple overlapping datasets, customizable axis ranges, interactive tooltips that display coordinates and function values on mouse hover, and optional legends with color coding. Data is automatically interpolated for smooth visualization when plotted points exceed the internal limit.
- Parameters:
label – Short descriptive text to the left of the plot.
tooltip – Text to appear when the mouse hovers over the plot label.
x_data – X coordinates for plotting. Can be a single list of floats for one plot, or a list of lists where each inner list contains x coordinates for a separate plot. Must have the same shape as y_data.
y_data – Y coordinates for plotting. Can be a single list of floats for one plot, or a list of lists where each inner list contains y coordinates for a separate plot. Must have the same shape as x_data.
x_min – Minimum value of x shown on the plot. If not specified, automatically determined from x_data.
x_max – Maximum value of x shown on the plot. If not specified, automatically determined from x_data.
y_min – Minimum value of y shown on the plot. If not specified, automatically determined from y_data.
y_max – Maximum value of y shown on the plot. If not specified, automatically determined from y_data.
x_label – Label for the X axis.
y_label – Label for the Y axis.
plot_height – Height of the plot in text line units.
show_legend – Whether to display a legend on the plot.
legends – Custom legend labels for each plot. If not specified, automatic names ‘F_i(x)’ are generated.
plot_colors – RGB color values for each plot as lists of [r,g,b] integers in range [0,255]. If not specified, colors are automatically generated.
Create an XY plot UI Widget with axis scaling, legends, and support for multiple plots. Overlapping data is most accurately plotted when centered in the frame with reasonable axis scaling. Pressing down the mouse gives the x and y values of each function at an x coordinate.
- Parameters:
label (str) – Short descriptve text to the left of the plot
tooltip (str, optional) – Tooltip to appear when hovering the mouse over the plot label. Defaults to “”.
x_data (Union[List[List],List], optional) – A possibly ragged list of lists where each ith inner list is the x coordinates for plot i. For a single plot, the data may be provided as a list of floats. x_data must have exactly the same shape as y_data. Defaults to [].
y_data (Union[List[List],List], optional) – A possibly ragged list of lists where each ith inner list is the y coordinates for plot i. For a single plot, the data may be provided as a list of floats. y_data must have exactly the same shape as x_data. Defaults to [].
x_min (float, optional) – Minimum value of x shown on the plot. If not specified, the minimum value found in x_data will be uesd. Defaults to None.
x_max (float, optional) – Maximum value of x shown on the plot. If not specified, the maximum value found in x_data will be used. Defaults to None.
y_min (float, optional) – Minimum value of y shown on the plot. If not specified, the minimum value found in y_data will be uesd. Defaults to None.
y_max (float, optional) – Maximum value of y shown on the plot. If not specified, the maximum value found in y_data will be used. Defaults to None.
x_label (str, optional) – Label of X axis. Defaults to “X”.
y_label (str, optional) – Label of Y axis. Defaults to “Y”.
plot_height (int, optional) – Height of the plot, proportional to the height of a line of text. Defaults to 10.
show_legend (bool, optional) – Show a legend on the plot. Defaults to False.
legends (List[str], optional) – Legend for the plotted data. If not specified, names ‘F_i(x)’ will be automatically generated. Defaults to None.
plot_colors (List[List], optional) – Colors of the plotted data. The ith entry in plot_colors is considered to be a list of [r,g,b] values in [0,255] for the ith plot color. If not specified, colors will be automatically generated. Defaults to None.
- cleanup()#
Perform any necessary cleanup.
- get_legends() List[str]#
Get the legends for the plotted data.
- Returns:
Legends for the plotted data
- get_plot_colors() List[List[int]]#
Get the colors of the data in the plot
- Returns:
List of lists where each inner list has length 3 corresponding to r,g,b values.
- get_plot_height() int#
Get the height of the plot, proportional to the height of a line of text
- Returns:
Height of the plot
- get_x_data() List[List[float]]#
x_data in the plot
- Returns:
A possibly ragged list of lists where each ith inner list is the x coordinates for plot i.
- get_x_max() float#
Get the maximum value of x shown in the plot.
- Returns:
Maximum value of x shown in the plot.
- get_x_min() float#
Get the minimum value of x shown in the plot.
- Returns:
Minimum value of x shown in the plot.
- get_y_data() List[List[float]]#
y_data in the plot
- Returns:
A possibly ragged list of lists where each ith inner list is the y coordinates for plot i.
- get_y_max() float#
Get the maximum value of y shown in the plot.
- Returns:
Maximum value of y shown in the plot.
- get_y_min() float#
Get the minimum value of y shown in the plot.
- Returns:
Minimum value of y shown in the plot.
- set_data(
- x_data: List[List] | List,
- y_data: List[List] | List,
Set the data to plot
- Parameters:
x_data – A possibly ragged list of lists where each ith inner list is the x coordinates for plot i. For a single plot, the data may be provided as a list of floats. x_data must have exactly the same shape as y_data.
y_data – A possibly ragged list of lists where each ith inner list is the y coordinates for plot i. For a single plot, the data may be provided as a list of floats. y_data must have exactly the same shape as x_data.
- set_legend_by_index(idx: int, legend: str)#
Set the legend for a specific plot whose index corresponds to the rows of x_data and y_data
- Parameters:
idx – Index of legend to set.
legend – Legend
- set_legends(legends: List[str])#
Set legends for each plot.
- Parameters:
legends – List of legends for each plot.
- set_plot_color_by_index(index: int, r: int, g: int, b: int)#
Set the color of a specific plot.
- Parameters:
index – Index of the plot corresponding to the rows of x_data and y_data.
r – Value for red in [0,255]
g – Value for green in [0,255]
b – Value for blue in [0,255]
- set_plot_colors(plot_colors: List[List[int]])#
Set the colors for every plot
- Parameters:
plot_colors – A list of lists where each index corresponds to the rows of x_data and y_data. Each inner list must contain [r,g,b] color values in [0,255]
- set_plot_height(plot_height: int)#
Set the height of the plot.
- Parameters:
plot_height – Height of the plot, proportional to the height of a line of text.
- set_plot_visible_by_index(index: int, visible: bool)#
Hide or show a specific plot.
- Parameters:
index – Index of plot to show.
visible – If True, show the plot, otherwise hide it.
- set_show_legend(show_legend: bool)#
Hide or show the legend for this Widget
- Parameters:
show_legend – If True, show a legend for the Widget.
- set_x_max(x_max: float)#
Set maximum value of x shown on the plot. If this value is not greater than x_min, x_min will be updated to x_max - 1.
- Parameters:
x_max – Maximum value of x shown on the plot.
- set_x_min(x_min: float)#
Set the minimum value of x shown on the plot. If this value is not less than x_max, x_max will be updated to x_min + 1.
- Parameters:
x_min – Minimum value of x shown on the plot.
- set_y_max(y_max: float)#
Set maximum value of y shown on the plot. If this value is not greater than y_min, y_min will be updated to y_max - 1.
- Parameters:
y_max – Maximum value of y shown on the plot.
- set_y_min(y_min: float)#
Set the minimum value of y shown on the plot. If this value is not less than y_max, y_max will be updated to y_min + 1.
- Parameters:
y_min – Minimum value of y shown on the plot.
- property container_frame: omni.ui.Frame#
The container frame that holds the widget.
- Returns:
The UI frame containing this widget.
- property enabled: bool#
Whether the widget is enabled for user interaction.
- Returns:
True if the widget is enabled, False otherwise.
- property visible: bool#
Whether the widget is visible in the UI.
- Returns:
True if the widget is visible, False otherwise.