omni.ui: Omniverse UI Framework

Python API

Omni::UI

Omni::UI is Omniverse’s UI toolkit for creating beautiful and flexible graphical user interfaces in the Kit extensions. Omni::UI provides the basic types necessary to create rich extensions with a fluid and dynamic user interface in Omniverse Kit. It gives a layout system and includes widgets for creating visual components, receiving user input, and creating data models. It allows ser interface components to be built around their behavior and enables a declarative flavor of describing the layout of the application. Omni::UI gives a very flexible styling system that allows deep customizing the final look of the application.

Typical Example

Typical example to create a window with two buttons:

import omni.ui as ui

_window_example = ui.Window("Example Window", width=300, height=300)

with _window_example.frame:
    with ui.VStack():
        ui.Button("click me")

        def move_me(window):
            window.setPosition(200, 200)

        def size_me(window):
            window.width = 300
            window.height = 300

        ui.Button("Move to (200,200)", clicked_fn=lambda w=self._window_example: move_me(w))
        ui.Button("Set size (300,300)", clicked_fn=lambda w=self._window_example: size_me(w))

Detailed Documentation

Omni::UI is shipped with the developer documentation that is written with Omni::UI. For detailed documentation, please see omni.example.ui extension. It has detailed descriptions of all the classes, best practices, and real-world usage examples.

Widgets

class omni.ui.AbstractField

Bases: omni.ui._ui.Widget, omni.ui._ui.ValueModelHelper

The abstract widget that is base for any field, which is a one-line text editor. A field allows the user to enter and edit a single line of plain text. It’s implemented using the model-view pattern and uses AbstractValueModel as the central component of the system.

focus_keyboard(self: omni.ui._ui.AbstractField, focus: bool = True)None

Puts cursor to this field or removed focus if focus

class omni.ui.AbstractItem

Bases: pybind11_builtins.pybind11_object

The object that is associated with the data entity of the AbstractItemModel.

class omni.ui.AbstractItemDelegate

Bases: pybind11_builtins.pybind11_object

AbstractItemDelegate is used to generate widgets that display and edit data items from a model.

build_branch(self: omni.ui._ui.AbstractItemDelegate, model: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None, column_id: int = 0, level: int = 0, expanded: bool = False)None

This pure abstract method must be reimplemented to generate custom collapse/expand button.

build_header(self: omni.ui._ui.AbstractItemDelegate, column_id: int = 0)None

This pure abstract method must be reimplemented to generate custom widgets for the header table.

build_widget(self: omni.ui._ui.AbstractItemDelegate, model: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None, index: int = 0, level: int = 0, expanded: bool = False)None

This pure abstract method must be reimplemented to generate custom widgets for specific item in the model.

class omni.ui.AbstractItemModel

Bases: pybind11_builtins.pybind11_object

The central component of the item widget. It is the application’s dynamic data structure, independent of the user interface, and it directly manages the nested data. It follows closely model-view pattern. It’s abstract, and it defines the standard interface to be able to interoperate with the components of the model-view architecture. It is not supposed to be instantiated directly. Instead, the user should subclass it to create a new model. The overall architecture is described in the following drawing: The item model doesn’t return the data itself. Instead, it returns the value model that can contain any data type and supports callbacks. Thus the client of the model can track the changes in both the item model and any value it holds. From any item, the item model can get both the value model and the nested items. Therefore, the model is flexible to represent anything from color to complicated tree-table construction.

add_begin_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None])int

Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback.

add_end_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None])int

Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback.

add_item_changed_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None])int

Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.

append_child_item(self: omni.ui._ui.AbstractItemModel, parentItem: omni.ui._ui.AbstractItem, model: omni.ui._ui.AbstractValueModel)omni.ui._ui.AbstractItem

Creates a new item from the value model and appends it to the list of the children of the given item.

begin_edit(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem)None

Called when the user starts the editing. If it’s a field, this method is called when the user activates the field and places the cursor inside.

can_item_have_children(self: omni.ui._ui.AbstractItemModel, parentItem: omni.ui._ui.AbstractItem = None)bool

Returns true if the item can have children. In this way the delegate usually draws +/- icon.

### Arguments:

id :

The item to request children from. If it’s null, the children of root will be returned.

drop(*args, **kwargs)

Overloaded function.

  1. drop(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, item_source: omni.ui._ui.AbstractItem, drop_location: int = -1) -> None

Called when the user droped one item to another. Small explanation why the same default value is declared in multiple places. We use the default value to be compatible with the previous API and especially with Stage 2.0. Thr signature in the old Python API is: def drop(self, target_item, source) drop(self, target_item, source) PyAbstractItemModel::drop AbstractItemModel.drop pybind11::class_<AbstractItemModel>.def(“drop”) AbstractItemModel

  1. drop(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, source: str, drop_location: int = -1) -> None

Called when the user droped a string to the item.

drop_accepted(*args, **kwargs)

Overloaded function.

  1. drop_accepted(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, item_source: omni.ui._ui.AbstractItem, drop_location: int = -1) -> bool

Called to determine if the model can perform drag and drop to the given item. If this method returns false, the widget shouldn’t highlight the visual element that represents this item.

  1. drop_accepted(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, source: str, drop_location: int = -1) -> bool

Called to determine if the model can perform drag and drop of the given string to the given item. If this method returns false, the widget shouldn’t highlight the visual element that represents this item.

end_edit(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem)None

Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo.

get_drag_mime_data(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None)str

Returns Multipurpose Internet Mail Extensions (MIME) for drag and drop.

get_item_children(self: omni.ui._ui.AbstractItemModel, parentItem: omni.ui._ui.AbstractItem = None)List[omni.ui._ui.AbstractItem]

Returns the vector of items that are nested to the given parent item.

### Arguments:

id :

The item to request children from. If it’s null, the children of root will be returned.

get_item_value_model(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None, column_id: int = 0)omni.ui._ui.AbstractValueModel

Get the value model associated with this item.

### Arguments:

item :

The item to request the value model from. If it’s null, the root value model will be returned.

index :

The column number to get the value model.

get_item_value_model_count(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None)int

Returns the number of columns this model item contains.

remove_begin_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: int)None

Remove the callback by its id.

### Arguments:

id :

The id that addBeginEditFn returns.

remove_end_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: int)None

Remove the callback by its id.

### Arguments:

id :

The id that addEndEditFn returns.

remove_item(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem)None

Removes the item from the model. There is no parent here because we assume that the reimplemented model deals with its data and can figure out how to remove this item.

remove_item_changed_fn(self: omni.ui._ui.AbstractItemModel, arg0: int)None

Remove the callback by its id.

### Arguments:

id :

The id that addValueChangedFn returns.

subscribe_begin_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None])carb._carb.Subscription

Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback.

subscribe_end_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None])carb._carb.Subscription

Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback.

subscribe_item_changed_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None])carb._carb.Subscription

Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.

class omni.ui.AbstractMultiField

Bases: omni.ui._ui.Widget, omni.ui._ui.ItemModelHelper

AbstractMultiField is the abstract class that has everything to create a custom widget per model item. The class that wants to create multiple widgets per item needs to reimplement the method _createField.

property column_count

The max number of fields in a line.

property h_spacing

Sets a non-stretchable horizontal space in pixels between child fields.

property v_spacing

Sets a non-stretchable vertical space in pixels between child fields.

class omni.ui.AbstractSlider

Bases: omni.ui._ui.Widget, omni.ui._ui.ValueModelHelper

The abstract widget that is base for drags and sliders.

class omni.ui.AbstractValueModel

Bases: pybind11_builtins.pybind11_object

add_begin_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None])int

Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback.

add_end_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None])int

Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback.

add_value_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None])int

Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.

property as_bool

Return the bool representation of the value.

property as_float

Return the float representation of the value.

property as_int

Return the int representation of the value.

property as_string

Return the string representation of the value.

begin_edit(self: omni.ui._ui.AbstractValueModel)None

Called when the user starts the editing. If it’s a field, this method is called when the user activates the field and places the cursor inside. This method should be reimplemented.

end_edit(self: omni.ui._ui.AbstractValueModel)None

Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo. This method should be reimplemented.

get_value_as_bool(self: omni.ui._ui.AbstractValueModel)bool

Return the bool representation of the value.

get_value_as_float(self: omni.ui._ui.AbstractValueModel)float

Return the float representation of the value.

get_value_as_int(self: omni.ui._ui.AbstractValueModel)int

Return the int representation of the value.

get_value_as_string(self: omni.ui._ui.AbstractValueModel)str

Return the string representation of the value.

remove_begin_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: int)None

Remove the callback by its id.

### Arguments:

id :

The id that addBeginEditFn returns.

remove_end_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: int)None

Remove the callback by its id.

### Arguments:

id :

The id that addEndEditFn returns.

remove_value_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: int)None

Remove the callback by its id.

### Arguments:

id :

The id that addValueChangedFn returns.

set_value(*args, **kwargs)

Overloaded function.

  1. set_value(self: omni.ui._ui.AbstractValueModel, value: bool) -> None

Set the value.

  1. set_value(self: omni.ui._ui.AbstractValueModel, value: int) -> None

Set the value.

  1. set_value(self: omni.ui._ui.AbstractValueModel, value: float) -> None

Set the value.

  1. set_value(self: omni.ui._ui.AbstractValueModel, value: str) -> None

Set the value.

subscribe_begin_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None])carb._carb.Subscription

Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback.

subscribe_end_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None])carb._carb.Subscription

Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback.

subscribe_item_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None])carb._carb.Subscription
subscribe_value_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None])carb._carb.Subscription

Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.

class omni.ui.Alignment

Bases: pybind11_builtins.pybind11_object

Members:

UNDEFINED

LEFT_TOP

LEFT_CENTER

LEFT_BOTTOM

CENTER_TOP

CENTER

CENTER_BOTTOM

RIGHT_TOP

RIGHT_CENTER

RIGHT_BOTTOM

LEFT

RIGHT

H_CENTER

TOP

BOTTOM

V_CENTER

BOTTOM = Alignment.BOTTOM
CENTER = Alignment.CENTER
CENTER_BOTTOM = Alignment.CENTER_BOTTOM
CENTER_TOP = Alignment.CENTER_TOP
H_CENTER = Alignment.H_CENTER
LEFT = Alignment.LEFT
LEFT_BOTTOM = Alignment.LEFT_BOTTOM
LEFT_CENTER = Alignment.LEFT_CENTER
LEFT_TOP = Alignment.LEFT_TOP
RIGHT = Alignment.RIGHT
RIGHT_BOTTOM = Alignment.RIGHT_BOTTOM
RIGHT_CENTER = Alignment.RIGHT_CENTER
RIGHT_TOP = Alignment.RIGHT_TOP
TOP = Alignment.TOP
UNDEFINED = Alignment.UNDEFINED
V_CENTER = Alignment.V_CENTER
property name

handle) -> str

Type

(self

class omni.ui.ArrowHelper

Bases: pybind11_builtins.pybind11_object

The ArrowHelper widget provides a colored rectangle to display.

property begin_arrow_height

This property holds the height of the begin arrow.

property begin_arrow_type

This property holds the type of the begin arrow can only eNone or eRrrow By default, the arrow type is eNone.

property begin_arrow_width

This property holds the width of the begin arrow.

property end_arrow_height

This property holds the height of the end arrow.

property end_arrow_type

This property holds the type of the end arrow can only eNone or eRrrow By default, the arrow type is eNone.

property end_arrow_width

This property holds the width of the end arrow.

class omni.ui.ArrowType

Bases: pybind11_builtins.pybind11_object

Members:

NONE

ARROW

ARROW = ArrowType.ARROW
NONE = ArrowType.NONE
property name

handle) -> str

Type

(self

class omni.ui.Axis

Bases: pybind11_builtins.pybind11_object

Members:

None

X

Y

XY

None = Axis.None
X = Axis.X
XY = Axis.XY
Y = Axis.Y
property name

handle) -> str

Type

(self

class omni.ui.BezierCurve

Bases: omni.ui._ui.Shape, omni.ui._ui.ArrowHelper

Smooth curve that can be scaled indefinitely.

call_mouse_hovered_fn(self: omni.ui._ui.BezierCurve, arg0: bool)None

Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered)

property end_tangent_height

This property holds the Y coordinate of the end of the curve relative to the width bound of the curve.

property end_tangent_width

This property holds the X coordinate of the end of the curve relative to the width bound of the curve.

has_mouse_hovered_fn(self: omni.ui._ui.BezierCurve)bool

Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered)

set_mouse_hovered_fn(self: omni.ui._ui.BezierCurve, fn: Callable[[bool], None])None

Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered)

property start_tangent_height

This property holds the Y coordinate of the start of the curve relative to the width bound of the curve.

property start_tangent_width

This property holds the X coordinate of the start of the curve relative to the width bound of the curve.

class omni.ui.Button

Bases: omni.ui._ui.InvisibleButton

The Button widget provides a command button. The command button, is perhaps the most commonly used widget in any graphical user interface. Click a button to execute a command. It is rectangular and typically displays a text label describing its action.

property image_height

This property holds the height of the image widget. Do not use this function to find the height of the image.

property image_url

This property holds the button’s optional image URL.

property image_width

This property holds the width of the image widget. Do not use this function to find the width of the image.

property spacing

Sets a non-stretchable space in points between image and text.

property text

This property holds the button’s text.

class omni.ui.ByteImageProvider

Bases: omni.ui._ui.ImageProvider

doc

set_bytes_data(self: omni.ui._ui.ByteImageProvider, bytes: sequence, sizes: List[int], format: omni.ui._ui.TextureFormat = TextureFormat.???, stride: int = -1)None

Sets Python sequence as byte data. The image provider will recognize flattened color values, or sequence within sequence and convert it into an image.

set_data(self: omni.ui._ui.ByteImageProvider, arg0: List[int], arg1: List[int])None

[DEPRECATED FUNCTION]

set_raw_bytes_data(self: omni.ui._ui.ByteImageProvider, raw_bytes: capsule, sizes: List[int], format: omni.ui._ui.TextureFormat = TextureFormat.RGBA8_UNORM, stride: int = - 1)None

Sets byte data that the image provider will turn raw pointer array into an image.

class omni.ui.CanvasFrame

Bases: omni.ui._ui.Frame

CanvasFrame is the widget that allows the user to pan and zoom its children with a mouse. It has the layout that can be infinitely moved in any direction.

property draggable

Provides a convenient way to make the content draggable and zoomable.

property pan_x

The horizontal offset of the child item.

property pan_y

The vertical offset of the child item.

screen_to_canvas(self: omni.ui._ui.CanvasFrame, x: float, y: float)Tuple[float, float]

Transforms screen-space coordinates to canvas-space

screen_to_canvas_x(self: omni.ui._ui.CanvasFrame, x: float)float

Transforms screen-space X to canvas-space X.

screen_to_canvas_y(self: omni.ui._ui.CanvasFrame, y: float)float

Transforms screen-space Y to canvas-space Y.

set_pan_key_shortcut(self: omni.ui._ui.CanvasFrame, mouse_button: int, key_flag: int)None

Specify the mouse button and key to pan the canvas.

set_pan_x_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None])None

The horizontal offset of the child item.

set_pan_y_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None])None

The vertical offset of the child item.

set_zoom_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None])None

The zoom level of the child item.

set_zoom_key_shortcut(self: omni.ui._ui.CanvasFrame, mouse_button: int, key_flag: int)None

Specify the mouse button and key to zoom the canvas.

property smooth_zoom

When true, zoom is smooth like in Bifrost even if the user is using mouse wheen that doesn’t provide smooth scrolling.

property zoom

The zoom level of the child item.

property zoom_max

The zoom maximum of the child item.

property zoom_min

The zoom minimum of the child item.

class omni.ui.CheckBox

Bases: omni.ui._ui.Widget, omni.ui._ui.ValueModelHelper

A CheckBox is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others. The checkbox is implemented using the model-view pattern. The model is the central component of this system. It is the application’s dynamic data structure independent of the widget. It directly manages thedata, logic, and rules of the checkbox. If the model is not specified, the simple one is created automatically when the object is constructed.

class omni.ui.Circle

Bases: omni.ui._ui.Shape

Constructs Circle.

kwargs : dict

See below

### Keyword Arguments:

alignment :

This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered.

radius :

This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. By default, the circle radius is 0.

arc :

This property is the way to draw a half or a quarter of the circle. When it’s eLeft, only left side of the circle is rendered. When it’s eLeftTop, only left top quarter is rendered.

size_policy :

Define what happens when the source image has a different size than the item.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget as a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

an optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

if the widgets has callback functions it will by default not capture the events event if is the top most widget setup this options to true to enable you to capture the events so they don’t also get routed to the bellow widgets

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where: ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.

property alignment

This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered.

property arc

This property is the way to draw a half or a quarter of the circle. When it’s eLeft, only left side of the circle is rendered. When it’s eLeftTop, only left top quarter is rendered.

property radius

This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. By default, the circle radius is 0.

property size_policy

Define what happens when the source image has a different size than the item.

class omni.ui.CircleSizePolicy

Bases: pybind11_builtins.pybind11_object

Define what happens when the source image has a different size than the item.

Members:

STRETCH

FIXED

FIXED = CircleSizePolicy.FIXED
STRETCH = CircleSizePolicy.STRETCH
property name

handle) -> str

Type

(self

class omni.ui.CollapsableFrame

Bases: omni.ui._ui.Frame

CollapsableFrame is a frame widget that can hide or show its content. It has two states expanded and collapsed. When it’s collapsed, it looks like a button. If it’s expanded, it looks like a button and a frame with the content. It’s handy to group properties, and temporarily hide them to get more space for something else.

property alignment

This property holds the alignment of the label in the default header. By default, the contents of the label are left-aligned and vertically-centered.

call_build_header_fn(self: omni.ui._ui.CollapsableFrame, arg0: bool, arg1: str)None

Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly.

property collapsed

The state of the CollapsableFrame.

has_build_header_fn(self: omni.ui._ui.CollapsableFrame)bool

Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly.

set_build_header_fn(self: omni.ui._ui.CollapsableFrame, fn: Callable[[bool, str], None])None

Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly.

set_collapsed_changed_fn(self: omni.ui._ui.CollapsableFrame, fn: Callable[[bool], None])None

The state of the CollapsableFrame.

property title

The header text.

class omni.ui.ColorStore

Bases: pybind11_builtins.pybind11_object

A singleton that stores all the UI Style color properties of omni.ui.

static find(name: str)int

Return the index of the color with specific name.

static store(name: str, color: int)None

Save the color by name.

class omni.ui.ColorWidget

Bases: omni.ui._ui.Widget, omni.ui._ui.ItemModelHelper

The ColorWidget widget is a button that displays the color from the item model and can open a picker window to change the color.

class omni.ui.ComboBox

Bases: omni.ui._ui.Widget, omni.ui._ui.ItemModelHelper

The ComboBox widget is a combined button and a drop-down list. A combo box is a selection widget that displays the current item and can pop up a list of selectable items. The ComboBox is implemented using the model-view pattern. The model is the central component of this system. The root of the item model should contain the index of currently selected items, and the children of the root include all the items of the combo box.

class omni.ui.Container

Bases: omni.ui._ui.Widget

Base class for all UI containers. Container can hold one or many other Widget s

add_child(self: omni.ui._ui.Container, arg0: omni.ui._ui.Widget)None

Adds widget to this container in a manner specific to the container. If it’s allowed to have one sub-widget only, it will be overwriten.

clear(self: omni.ui._ui.Container)None

Removes the container items from the container.

class omni.ui.CornerFlag

Bases: pybind11_builtins.pybind11_object

Members:

NONE

TOP_LEFT

TOP_RIGHT

BOTTOM_LEFT

BOTTOM_RIGHT

TOP

BOTTOM

LEFT

RIGHT

ALL

ALL = CornerFlag.ALL
BOTTOM = CornerFlag.BOTTOM
BOTTOM_LEFT = CornerFlag.BOTTOM_LEFT
BOTTOM_RIGHT = CornerFlag.BOTTOM_RIGHT
LEFT = CornerFlag.LEFT
NONE = CornerFlag.NONE
RIGHT = CornerFlag.RIGHT
TOP = CornerFlag.TOP
TOP_LEFT = CornerFlag.TOP_LEFT
TOP_RIGHT = CornerFlag.TOP_RIGHT
property name

handle) -> str

Type

(self

class omni.ui.Direction

Bases: pybind11_builtins.pybind11_object

Members:

LEFT_TO_RIGHT

RIGHT_TO_LEFT

TOP_TO_BOTTOM

BOTTOM_TO_TOP

BACK_TO_FRONT

FRONT_TO_BACK

BACK_TO_FRONT = Direction.BACK_TO_FRONT
BOTTOM_TO_TOP = Direction.BOTTOM_TO_TOP
FRONT_TO_BACK = Direction.FRONT_TO_BACK
LEFT_TO_RIGHT = Direction.LEFT_TO_RIGHT
RIGHT_TO_LEFT = Direction.RIGHT_TO_LEFT
TOP_TO_BOTTOM = Direction.TOP_TO_BOTTOM
property name

handle) -> str

Type

(self

class omni.ui.DockPolicy

Bases: pybind11_builtins.pybind11_object

Members:

DO_NOTHING

CURRENT_WINDOW_IS_ACTIVE

TARGET_WINDOW_IS_ACTIVE

CURRENT_WINDOW_IS_ACTIVE = DockPolicy.CURRENT_WINDOW_IS_ACTIVE
DO_NOTHING = DockPolicy.DO_NOTHING
TARGET_WINDOW_IS_ACTIVE = DockPolicy.TARGET_WINDOW_IS_ACTIVE
property name

handle) -> str

Type

(self

class omni.ui.DockPosition

Bases: pybind11_builtins.pybind11_object

Members:

RIGHT

LEFT

TOP

BOTTOM

SAME

BOTTOM = DockPosition.BOTTOM
LEFT = DockPosition.LEFT
RIGHT = DockPosition.RIGHT
SAME = DockPosition.SAME
TOP = DockPosition.TOP
property name

handle) -> str

Type

(self

class omni.ui.DockPreference

Bases: pybind11_builtins.pybind11_object

Members:

DISABLED

MAIN

RIGHT

LEFT

RIGHT_TOP

RIGHT_BOTTOM

LEFT_BOTTOM

DISABLED = DockPreference.DISABLED
LEFT = DockPreference.LEFT
LEFT_BOTTOM = DockPreference.LEFT_BOTTOM
MAIN = DockPreference.MAIN
RIGHT = DockPreference.RIGHT
RIGHT_BOTTOM = DockPreference.RIGHT_BOTTOM
RIGHT_TOP = DockPreference.RIGHT_TOP
property name

handle) -> str

Type

(self

class omni.ui.DockSpace

Bases: pybind11_builtins.pybind11_object

The DockSpace class represents Dock Space for the OS Window.

property dock_frame

This represent Styling opportunity for the Window background.

class omni.ui.Ellipse

Bases: omni.ui._ui.Shape

Constructs Ellipse.

kwargs : dict

See below

### Keyword Arguments:

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget as a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

an optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

if the widgets has callback functions it will by default not capture the events event if is the top most widget setup this options to true to enable you to capture the events so they don’t also get routed to the bellow widgets

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where: ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.

class omni.ui.FillPolicy

Bases: pybind11_builtins.pybind11_object

Members:

STRETCH

PRESERVE_ASPECT_FIT

PRESERVE_ASPECT_CROP

PRESERVE_ASPECT_CROP = FillPolicy.PRESERVE_ASPECT_CROP
PRESERVE_ASPECT_FIT = FillPolicy.PRESERVE_ASPECT_FIT
STRETCH = FillPolicy.STRETCH
property name

handle) -> str

Type

(self

class omni.ui.FloatDrag

Bases: omni.ui._ui.FloatSlider

The drag widget that looks like a field but it’s possible to change the value with dragging.

class omni.ui.FloatField

Bases: omni.ui._ui.AbstractField

The FloatField widget is a one-line text editor with a string model.

class omni.ui.FloatSlider

Bases: omni.ui._ui.AbstractSlider

The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into a float value within the legal range.

property format

This property overrides automatic formatting if needed.

property max

This property holds the slider’s maximum value.

property min

This property holds the slider’s minimum value.

property step

This property control the steping speed on the drag.

class omni.ui.FloatStore

Bases: pybind11_builtins.pybind11_object

A singleton that stores all the UI Style float properties of omni.ui.

static find(name: str)float

Return the index of the color with specific name.

static store(name: str, value: float)None

Save the color by name.

class omni.ui.FontStyle

Bases: pybind11_builtins.pybind11_object

Supported font styles.

Members:

NONE

NORMAL

LARGE

SMALL

EXTRA_LARGE

XXL

XXXL

EXTRA_SMALL

XXS

XXXS

ULTRA

EXTRA_LARGE = FontStyle.EXTRA_LARGE
EXTRA_SMALL = FontStyle.EXTRA_SMALL
LARGE = FontStyle.LARGE
NONE = FontStyle.NONE
NORMAL = FontStyle.NORMAL
SMALL = FontStyle.SMALL
ULTRA = FontStyle.ULTRA
XXL = FontStyle.XXL
XXS = FontStyle.XXS
XXXL = FontStyle.XXL
XXXS = FontStyle.XXXS
property name

handle) -> str

Type

(self

class omni.ui.Fraction

Bases: omni.ui._ui.Length

Fraction length is made to take the space of the parent widget, divides it up into a row of boxes, and makes each child widget fill one box.

class omni.ui.Frame

Bases: omni.ui._ui.Container

The Frame is a widget that can hold one child widget. Frame is used to crop the contents of a child widget or to draw small widget in a big view. The child widget must be specified with addChild().

call_build_fn(self: omni.ui._ui.Frame)None

Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load.

has_build_fn(self: omni.ui._ui.Frame)bool

Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load.

property horizontal_clipping

When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction.

rebuild(self: omni.ui._ui.Frame)None

After this method is called, the next drawing cycle build_fn will be called again to rebuild everything.

property separate_window

A specail mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows.

set_build_fn(self: omni.ui._ui.Frame, fn: Callable[], None])None

Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load.

property vertical_clipping

When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertial direction.

class omni.ui.FreeBezierCurve

Bases: omni.ui._ui.BezierCurve

Smooth curve that can be scaled indefinitely.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

class omni.ui.FreeCircle

Bases: omni.ui._ui.Circle

The Circle widget provides a colored rectangle to display.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

class omni.ui.FreeEllipse

Bases: omni.ui._ui.Ellipse

The Ellipse widget provides a colored rectangle to display.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

class omni.ui.FreeLine

Bases: omni.ui._ui.Line

The Line widget provides a colored rectangle to display.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

class omni.ui.FreeRectangle

Bases: omni.ui._ui.Rectangle

The Rectangle widget provides a colored rectangle to display.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

class omni.ui.FreeTriangle

Bases: omni.ui._ui.Triangle

The Triangle widget provides a colored rectangle to display.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another.

class omni.ui.Grid

Bases: omni.ui._ui.Stack

Grid is a container that arranges its child views in a grid. The grid vertical/horizontal direction is the direction the grid size grows with creating more children.

property column_count

The number of columns. It’s only possible to set it if the grid is vertical. Once it’s set, the column width depends on the widget size.

property column_width

The width of the column. It’s only possible to set it if the grid is vertical. Once it’s set, the column count depends on the size of the widget.

property row_count

The number of rows. It’s only possible to set it if the grid is horizontal. Once it’s set, the row height depends on the widget size.

property row_height

The height of the row. It’s only possible to set it if the grid is horizontal. Once it’s set, the row count depends on the size of the widget.

class omni.ui.HGrid

Bases: omni.ui._ui.Grid

Shortcut for Grid{eLeftToRight}. The grid grows from left to right with the widgets placed.

class omni.ui.HStack

Bases: omni.ui._ui.Stack

Shortcut for Stack{eLeftToRight}. The widgets are placed in a row, with suitable sizes.

class omni.ui.Image

Bases: omni.ui._ui.Widget

The Image widget displays an image. The source of the image is specified as a URL using the source property. By default, specifying the width and height of the item causes the image to be scaled to that size. This behavior can be changed by setting the fill_mode property, allowing the image to be stretched or scaled instead. The property alignment controls where to align the scaled image.

property alignment

This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the image is centered.

property fill_policy

Define what happens when the source image has a different size than the item.

set_progress_changed_fn(self: omni.ui._ui.Image, fn: Callable[[float], None])None

The progress of the image loading.

property source_url

This property holds the image URL. It can be an omni: file:

class omni.ui.ImageProvider

Bases: pybind11_builtins.pybind11_object

ImageProvider class, the goal of this class is to provide ImGui reference for the image to be rendered.

destroy(self: omni.ui._ui.ImageProvider)None
property height

Gets image height.

property is_reference_valid

Returns true if ImGui reference is valid, false otherwise.

set_image_data(*args, **kwargs)

Overloaded function.

  1. set_image_data(self: omni.ui._ui.ImageProvider, arg0: capsule, arg1: int, arg2: int, arg3: omni.ui._ui.TextureFormat) -> None

  2. set_image_data(self: omni.ui._ui.ImageProvider, arg0: omni.gpu_foundation_factory._gpu_foundation_factory.RpResource) -> None

property width

Gets image width.

class omni.ui.ImageWithProvider

Bases: omni.ui._ui.Widget

The Image widget displays an image. The source of the image is specified as a URL using the source property. By default, specifying the width and height of the item causes the image to be scaled to that size. This behavior can be changed by setting the fill_mode property, allowing the image to be stretched or scaled instead. The property alignment controls where to align the scaled image.

property alignment

This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the image is centered.

property fill_policy

Define what happens when the source image has a different size than the item.

prepare_draw(self: omni.ui._ui.ImageWithProvider, width: float, height: float)None

Force call ImageProvider::prepareDraw to ensure the next draw call the image is loaded. It can be used to load the image for a hidden widget or to set the rasterization resolution.

class omni.ui.Inspector

Bases: pybind11_builtins.pybind11_object

Inspector is the helper to check the internal state of the widget. It’s not recommended to use it for the routine UI.

static get_children(widget: omni.ui._ui.Widget)List[omni.ui._ui.Widget]

Get the children of the given Widget.

static get_resolved_style(widget: omni.ui._ui.Widget)omni::ui::StyleContainer

Get the resolved style of the given Widget.

class omni.ui.IntDrag

Bases: omni.ui._ui.IntSlider

The drag widget that looks like a field but it’s possible to change the value with dragging.

property step

This property control the steping speed on the drag, its float to enable slower speed but off course the value on the Control are still integer.

class omni.ui.IntField

Bases: omni.ui._ui.AbstractField

The IntField widget is a one-line text editor with a string model.

class omni.ui.IntSlider

Bases: omni.ui._ui.AbstractSlider

The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into an integer value within the legal range.

property max

This property holds the slider’s maximum value.

property min

This property holds the slider’s minimum value.

class omni.ui.InvisibleButton

Bases: omni.ui._ui.Widget

The InvisibleButton widget provides a transparent command button.

call_clicked_fn(self: omni.ui._ui.InvisibleButton)None

Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button).

has_clicked_fn(self: omni.ui._ui.InvisibleButton)bool

Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button).

set_clicked_fn(self: omni.ui._ui.InvisibleButton, fn: Callable[], None])None

Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button).

class omni.ui.ItemModelHelper

Bases: pybind11_builtins.pybind11_object

The ItemModelHelper class provides the basic functionality for item widget classes.

property model

Returns the current model.

class omni.ui.IwpFillPolicy

Bases: pybind11_builtins.pybind11_object

Members:

IWP_STRETCH

IWP_PRESERVE_ASPECT_FIT

IWP_PRESERVE_ASPECT_CROP

IWP_PRESERVE_ASPECT_CROP = IwpFillPolicy.IWP_PRESERVE_ASPECT_CROP
IWP_PRESERVE_ASPECT_FIT = IwpFillPolicy.IWP_PRESERVE_ASPECT_FIT
IWP_STRETCH = IwpFillPolicy.IWP_STRETCH
property name

handle) -> str

Type

(self

class omni.ui.Label

Bases: omni.ui._ui.Widget

The Label widget provides a text to display. Label is used for displaying text. No additional to Widget user interaction functionality is provided.

property alignment

This property holds the alignment of the label’s contents By default, the contents of the label are left-aligned and vertically-centered.

property elided_text

When the text of a big length has to be displayed in a small area, it can be useful to give the user a visual hint that not all text is visible. Label can elide text that doesn’t fit in the area. When this property is true, Label elides the middle of the last visible line and replaces it with “…”.

property text

This property holds the label’s text.

property word_wrap

This property holds the label’s word-wrapping policy If this property is true then label text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. By default, word wrap is disabled.

class omni.ui.Length

Bases: pybind11_builtins.pybind11_object

OMNI.UI has several different units for expressing a length. Many widget properties take “Length” values, such as width, height, minWidth, minHeight, etc. Pixel is the absolute length unit. Percent and Fraction are relative length units, and they specify a length relative to the parent length. Relative length units are scaled with the parent.

property unit

(UnitType.) Unit.

property value

(float) Value

class omni.ui.Line

Bases: omni.ui._ui.Shape, omni.ui._ui.ArrowHelper

The Line widget provides a colored rectangle to display.

property alignment

This property holds the alignment of the Line can only LEFT, RIGHT, VCENTER, HCENTER , BOTTOM, TOP By default, the Line is HCenter.

class omni.ui.MainWindow

Bases: pybind11_builtins.pybind11_object

The MainWindow class represents Main Window for the Application, draw optional MainMenuBar and StatusBar.

property cpp_status_bar_enabled

Workaround to reserve space for C++ status bar.

property main_frame

This represent Styling opportunity for the Window background.

property main_menu_bar

The main MenuBar for the application.

property status_bar_frame

The StatusBar Frame is empty by default and is meant to be filled by other part of the system.

class omni.ui.Menu

Bases: omni.ui._ui.Stack, omni.ui._ui.MenuHelper

The Menu class provides a menu widget for use in menu bars, context menus, and other popup menus. It can be either a pull-down menu in a menu bar or a standalone context menu. Pull-down menus are shown by the menu bar when the user clicks on the respective item. Context menus are usually invoked by some special keyboard key or by right-clicking.

call_on_build_fn(self: omni.ui._ui.Menu)None

Called to re-create new children.

static get_current()omni.ui._ui.Menu

Return the menu that is currently shown.

has_on_build_fn(self: omni.ui._ui.Menu)bool

Called to re-create new children.

hide(self: omni.ui._ui.Menu)None

Close the menu window. It only works for pop-up context menu and for teared off menu.

invalidate(self: omni.ui._ui.Menu)None

Make Menu dirty so onBuild will be executed to replace the children.

set_on_build_fn(self: omni.ui._ui.Menu, fn: Callable[], None])None

Called to re-create new children.

set_shown_changed_fn(self: omni.ui._ui.Menu, fn: Callable[[bool], None])None

It’s true when the menu is shown on the screen.

set_teared_changed_fn(self: omni.ui._ui.Menu, fn: Callable[[bool], None])None

If the window is teared off.

show(self: omni.ui._ui.Menu)None

Create a popup window and show the menu in it. It’s usually used for context menus that are typically invoked by some special keyboard key or by right-clicking.

show_at(self: omni.ui._ui.Menu, arg0: float, arg1: float)None

Create a popup window and show the menu in it. This enable to popup the menu at specific position. X and Y are in points to make it easier to the Python users.

property shown

It’s true when the menu is shown on the screen.

property tearable

The ability to tear the window off.

property teared

If the window is teared off.

class omni.ui.MenuBar

Bases: omni.ui._ui.Menu

The MenuBar class provides a MenuBar at the top of the Window, could also be the MainMenuBar of the MainWindow. it can only contain Menu, at the moment there is no way to remove item appart from clearing it all together

class omni.ui.MenuDelegate

Bases: pybind11_builtins.pybind11_object

MenuDelegate is used to generate widgets that represent the menu item.

build_item(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper)None

This method must be reimplemented to generate custom item.

build_status(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper)None

This method must be reimplemented to generate custom widgets on the bottom of the window.

build_title(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper)None

This method must be reimplemented to generate custom title.

call_on_build_item_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper)None

Called to create a new item.

call_on_build_status_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper)None

Called to create a new widget on the bottom of the window.

call_on_build_title_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper)None

Called to create a new title.

has_on_build_item_fn(self: omni.ui._ui.MenuDelegate)bool

Called to create a new item.

has_on_build_status_fn(self: omni.ui._ui.MenuDelegate)bool

Called to create a new widget on the bottom of the window.

has_on_build_title_fn(self: omni.ui._ui.MenuDelegate)bool

Called to create a new title.

property propagate
static set_default_delegate(delegate: MenuDelegate)None

Set the default delegate to use it when the item doesn’t have a delegate.

set_on_build_item_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None])None

Called to create a new item.

set_on_build_status_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None])None

Called to create a new widget on the bottom of the window.

set_on_build_title_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None])None

Called to create a new title.

class omni.ui.MenuHelper

Bases: pybind11_builtins.pybind11_object

The helper class for the menu that draws the menu line.

call_triggered_fn(self: omni.ui._ui.MenuHelper)None

Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination.

property checkable

This property holds whether this menu item is checkable. A checkable item is one which has an on/off state.

property delegate
has_triggered_fn(self: omni.ui._ui.MenuHelper)bool

Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination.

property hide_on_click

Hide or keep the window when the user clicked this item.

property hotkey_text

This property holds the menu’s hotkey text.

property menu_compatibility
set_triggered_fn(self: omni.ui._ui.MenuHelper, fn: Callable[], None])None

Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination.

property text

This property holds the menu’s text.

class omni.ui.MenuItem

Bases: omni.ui._ui.Widget, omni.ui._ui.MenuHelper

A MenuItem represents the items the Menu consists of. MenuItem can be inserted only once in the menu.

class omni.ui.MenuItemCollection

Bases: omni.ui._ui.Menu

The MenuItemCollection is the menu that unchecks children when one of them is checked.

class omni.ui.MultiFloatDragField

Bases: omni.ui._ui.AbstractMultiField

MultiFloatDragField is the widget that has a sub widget (FloatDrag) per model item. It’s handy to use it for multi-component data, like for example, float3 or color.

property max

This property holds the drag’s maximum value.

property min

This property holds the drag’s minimum value.

property step

This property control the steping speed on the drag.

class omni.ui.MultiFloatField

Bases: omni.ui._ui.AbstractMultiField

MultiFloatField is the widget that has a sub widget (FloatField) per model item. It’s handy to use it for multi-component data, like for example, float3 or color.

class omni.ui.MultiIntDragField

Bases: omni.ui._ui.AbstractMultiField

MultiIntDragField is the widget that has a sub widget (IntDrag) per model item. It’s handy to use it for multi-component data, like for example, int3.

property max

This property holds the drag’s maximum value.

property min

This property holds the drag’s minimum value.

property step

This property control the steping speed on the drag.

class omni.ui.MultiIntField

Bases: omni.ui._ui.AbstractMultiField

MultiIntField is the widget that has a sub widget (IntField) per model item. It’s handy to use it for multi-component data, like for example, int3.

class omni.ui.MultiStringField

Bases: omni.ui._ui.AbstractMultiField

MultiStringField is the widget that has a sub widget (StringField) per model item. It’s handy to use it for string arrays.

class omni.ui.OffsetLine

Bases: omni.ui._ui.FreeLine

The free widget is the widget that is independent of the layout. It draws the line stuck to the bounds of other widgets.

The free widget is the widget that is independent of the layout. It draws the line stuck to the bounds of other widgets.

property bound_offset

The offset from the bounds of the widgets this line is stuck to.

property offset

The offset to the direction of the line normal.

class omni.ui.Percent

Bases: omni.ui._ui.Length

Percent is the length in percents from the parent widget.

class omni.ui.Pixel

Bases: omni.ui._ui.Length

Pixel length is exact length in pixels.

class omni.ui.Placer

Bases: omni.ui._ui.Container

The Placer class place a single widget to a particular position based on the offet.

property drag_axis

Sets if dragging can be horizontally or vertically.

property draggable

Provides a convenient way to make an item draggable.

property frames_to_start_drag

The placer size depends on the position of the child when false.

property offset_x

offsetX define the offset placement for the child widget relative to the Placer

property offset_y

offsetY define the offset placement for the child widget relative to the Placer

set_offset_x_changed_fn(self: omni.ui._ui.Placer, arg0: Callable[[omni.ui._ui.Length], None])None

offsetX define the offset placement for the child widget relative to the Placer

set_offset_y_changed_fn(self: omni.ui._ui.Placer, arg0: Callable[[omni.ui._ui.Length], None])None

offsetY define the offset placement for the child widget relative to the Placer

property stable_size

The placer size depends on the position of the child when false.

class omni.ui.Plot

Bases: omni.ui._ui.Widget

The Plot widget provides a line/histogram to display.

property scale_max

This property holds the max scale values. By default, the value is FLT_MAX.

property scale_min

This property holds the min scale values. By default, the value is FLT_MAX.

set_data(self: omni.ui._ui.Plot, *args)None

Sets the image data value.

set_data_provider_fn(self: omni.ui._ui.Plot, arg0: Callable[[int], float], arg1: int)None

Sets the function that will be called when when data required.

property title

This property holds the title of the image.

property type

This property holds the type of the image, can only line or histogram. By default, the type is line.

property value_offset

This property holds the value offset. By default, the value is 0.

property value_stride

This property holds the stride to get value list. By default, the value is 1.

class omni.ui.ProgressBar

Bases: omni.ui._ui.Widget, omni.ui._ui.ValueModelHelper

A progressbar is a classic widget for showing the progress of an operation.

class omni.ui.RadioButton

Bases: omni.ui._ui.Button

RadioButton is the widget that allows the user to choose only one of a predefined set of mutually exclusive options. RadioButtons are arranged in collections of two or more with the class RadioCollection, which is the central component of the system and controls the behavior of all the RadioButtons in the collection.

property radio_collection

This property holds the button’s text.

class omni.ui.RadioCollection

Bases: omni.ui._ui.ValueModelHelper

Radio Collection is a class that groups RadioButtons and coordinates their state. It makes sure that the choice is mutually exclusive, it means when the user selects a radio button, any previously selected radio button in the same collection becomes deselected.

class omni.ui.RasterImageProvider

Bases: omni.ui._ui.ImageProvider

doc

property max_mip_levels

Maximum number of mip map levels allowed

property source_url

Sets byte data that the image provider will turn into an image.

class omni.ui.Rectangle

Bases: omni.ui._ui.Widget

The Rectangle widget provides a colored rectangle to display.

class omni.ui.ScrollBarPolicy

Bases: pybind11_builtins.pybind11_object

Members:

SCROLLBAR_AS_NEEDED

SCROLLBAR_ALWAYS_OFF

SCROLLBAR_ALWAYS_ON

SCROLLBAR_ALWAYS_OFF = ScrollBarPolicy.SCROLLBAR_ALWAYS_OFF
SCROLLBAR_ALWAYS_ON = ScrollBarPolicy.SCROLLBAR_ALWAYS_ON
SCROLLBAR_AS_NEEDED = ScrollBarPolicy.SCROLLBAR_AS_NEEDED
property name

handle) -> str

Type

(self

class omni.ui.ScrollingFrame

Bases: omni.ui._ui.Frame

The ScrollingFrame class provides the ability to scroll onto another widget. ScrollingFrame is used to display the contents of a child widget within a frame. If the widget exceeds the size of the frame, the frame can provide scroll bars so that the entire area of the child widget can be viewed. The child widget must be specified with addChild().

property horizontal_scrollbar_policy

This property holds the policy for the horizontal scroll bar.

property scroll_x

The horizontal position of the scroll bar. When it’s changed, the contents will be scrolled accordingly.

property scroll_x_max

The max position of the horizontal scroll bar.

property scroll_y

The vertical position of the scroll bar. When it’s changed, the contents will be scrolled accordingly.

property scroll_y_max

The max position of the vertical scroll bar.

set_scroll_x_changed_fn(self: omni.ui._ui.ScrollingFrame, arg0: Callable[[float], None])None

The horizontal position of the scroll bar. When it’s changed, the contents will be scrolled accordingly.

set_scroll_y_changed_fn(self: omni.ui._ui.ScrollingFrame, arg0: Callable[[float], None])None

The vertical position of the scroll bar. When it’s changed, the contents will be scrolled accordingly.

property vertical_scrollbar_policy

This property holds the policy for the vertical scroll bar.

class omni.ui.Separator

Bases: omni.ui._ui.Widget, omni.ui._ui.MenuHelper

The Separator class provides blank space. Normally, it’s used to create separator line in the UI elements

class omni.ui.Shape

Bases: omni.ui._ui.Widget

The Shape widget provides a base class for all the Shape Widget currently implemented are Rectangle, Circle, Tiangle, Line TODO: those need to have a special draw overide to deal with intersection better.

class omni.ui.SimpleBoolModel

Bases: omni.ui._ui.AbstractValueModel

A very simple bool model.

get_max(self: omni.ui._ui.SimpleBoolModel)bool
get_min(self: omni.ui._ui.SimpleBoolModel)bool
property max

This property holds the model’s maximum value.

property min

This property holds the model’s minimum value.

set_max(self: omni.ui._ui.SimpleBoolModel, arg0: bool)None
set_min(self: omni.ui._ui.SimpleBoolModel, arg0: bool)None
class omni.ui.SimpleFloatModel

Bases: omni.ui._ui.AbstractValueModel

A very simple double model.

get_max(self: omni.ui._ui.SimpleFloatModel)float
get_min(self: omni.ui._ui.SimpleFloatModel)float
property max

This property holds the model’s minimum value.

property min

This property holds the model’s minimum value.

set_max(self: omni.ui._ui.SimpleFloatModel, arg0: float)None
set_min(self: omni.ui._ui.SimpleFloatModel, arg0: float)None
class omni.ui.SimpleIntModel

Bases: omni.ui._ui.AbstractValueModel

A very simple Int model.

get_max(self: omni.ui._ui.SimpleIntModel)int
get_min(self: omni.ui._ui.SimpleIntModel)int
property max

This property holds the model’s minimum value.

property min

This property holds the model’s minimum value.

set_max(self: omni.ui._ui.SimpleIntModel, arg0: int)None
set_min(self: omni.ui._ui.SimpleIntModel, arg0: int)None
class omni.ui.SimpleStringModel

Bases: omni.ui._ui.AbstractValueModel

A very simple value model that holds a single string.

class omni.ui.SliderDrawMode

Bases: pybind11_builtins.pybind11_object

Members:

FILLED

HANDLE

DRAG

DRAG = SliderDrawMode.DRAG
FILLED = SliderDrawMode.FILLED
HANDLE = SliderDrawMode.HANDLE
property name

handle) -> str

Type

(self

class omni.ui.Spacer

Bases: omni.ui._ui.Widget

The Spacer class provides blank space. Normally, it’s used to place other widgets correctly in a layout.

class omni.ui.Stack

Bases: omni.ui._ui.Container

The Stack class lines up child widgets horizontally, vertically or sorted in a Z-order.

property content_clipping

Determines if the child widgets should be clipped by the rectangle of this Stack.

property direction

This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a aertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a aertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front.

property spacing

Sets a non-stretchable space in pixels between child items of this layout.

class omni.ui.StringField

Bases: omni.ui._ui.AbstractField

The StringField widget is a one-line text editor with a string model.

property allow_tab_input

This property holds the if the field allows Tab input.

property multiline

Multiline allows to press enter and and create a new line.

property password_mode

This property holds the if the field is in the password mode when the entered text is obscured.

property read_only

This property holds the if the field is read-only.

class omni.ui.StringStore

Bases: pybind11_builtins.pybind11_object

A singleton that stores all the UI Style string properties of omni.ui.

static find(name: str)str

Return the index of the color with specific name.

static store(name: str, string: str)None

Save the color by name.

class omni.ui.Style

Bases: pybind11_builtins.pybind11_object

A singleton that controls the global style of the session.

property default

Set the default root style. It’s the style that is preselected when no alternative is specified.

static get_instance()omni.ui._ui.Style

Get the instance of this singleton object.

class omni.ui.TextureFormat

Bases: pybind11_builtins.pybind11_object

Members:

R8_UNORM

R8_SNORM

R8_UINT

R8_SINT

RG8_UNORM

RG8_SNORM

RG8_UINT

RG8_SINT

BGRA8_UNORM

BGRA8_SRGB

RGBA8_UNORM

RGBA8_SNORM

RGBA8_UINT

RGBA8_SINT

RGBA8_SRGB

R16_UNORM

R16_SNORM

R16_UINT

R16_SINT

R16_SFLOAT

RG16_UNORM

RG16_SNORM

RG16_UINT

RG16_SINT

RG16_SFLOAT

RGBA16_UNORM

RGBA16_SNORM

RGBA16_UINT

RGBA16_SINT

RGBA16_SFLOAT

R32_UINT

R32_SINT

R32_SFLOAT

RG32_UINT

RG32_SINT

RG32_SFLOAT

RGB32_UINT

RGB32_SINT

RGB32_SFLOAT

RGBA32_UINT

RGBA32_SINT

RGBA32_SFLOAT

R10_G10_B10_A2_UNORM

R10_G10_B10_A2_UINT

R11_G11_B10_UFLOAT

R9_G9_B9_E5_UFLOAT

B5_G6_R5_UNORM

B5_G5_R5_A1_UNORM

BC1_RGBA_UNORM

BC1_RGBA_SRGB

BC2_RGBA_UNORM

BC2_RGBA_SRGB

BC3_RGBA_UNORM

BC3_RGBA_SRGB

BC4_R_UNORM

BC4_R_SNORM

BC5_RG_UNORM

BC5_RG_SNORM

BC6H_RGB_UFLOAT

BC6H_RGB_SFLOAT

BC7_RGBA_UNORM

BC7_RGBA_SRGB

D16_UNORM

D24_UNORM_S8_UINT

D32_SFLOAT

D32_SFLOAT_S8_UINT_X24

R24_UNORM_X8

X24_R8_UINT

X32_R8_UINT_X24

R32_SFLOAT_X8_X24

SAMPLER_FEEDBACK_MIN_MIP

SAMPLER_FEEDBACK_MIP_REGION_USED

B5_G5_R5_A1_UNORM = TextureFormat.B5_G5_R5_A1_UNORM
B5_G6_R5_UNORM = TextureFormat.B5_G6_R5_UNORM
BC1_RGBA_SRGB = TextureFormat.BC1_RGBA_SRGB
BC1_RGBA_UNORM = TextureFormat.BC1_RGBA_UNORM
BC2_RGBA_SRGB = TextureFormat.BC2_RGBA_SRGB
BC2_RGBA_UNORM = TextureFormat.BC2_RGBA_UNORM
BC3_RGBA_SRGB = TextureFormat.BC3_RGBA_SRGB
BC3_RGBA_UNORM = TextureFormat.BC3_RGBA_UNORM
BC4_R_SNORM = TextureFormat.BC4_R_SNORM
BC4_R_UNORM = TextureFormat.BC4_R_UNORM
BC5_RG_SNORM = TextureFormat.BC5_RG_SNORM
BC5_RG_UNORM = TextureFormat.BC5_RG_UNORM
BC6H_RGB_SFLOAT = TextureFormat.BC6H_RGB_SFLOAT
BC6H_RGB_UFLOAT = TextureFormat.BC6H_RGB_UFLOAT
BC7_RGBA_SRGB = TextureFormat.BC7_RGBA_SRGB
BC7_RGBA_UNORM = TextureFormat.BC7_RGBA_UNORM
BGRA8_SRGB = TextureFormat.BGRA8_SRGB
BGRA8_UNORM = TextureFormat.BGRA8_UNORM
D16_UNORM = TextureFormat.D16_UNORM
D24_UNORM_S8_UINT = TextureFormat.D24_UNORM_S8_UINT
D32_SFLOAT = TextureFormat.D32_SFLOAT
D32_SFLOAT_S8_UINT_X24 = TextureFormat.D32_SFLOAT_S8_UINT_X24
R10_G10_B10_A2_UINT = TextureFormat.R10_G10_B10_A2_UINT
R10_G10_B10_A2_UNORM = TextureFormat.R10_G10_B10_A2_UNORM
R11_G11_B10_UFLOAT = TextureFormat.R11_G11_B10_UFLOAT
R16_SFLOAT = TextureFormat.R16_SFLOAT
R16_SINT = TextureFormat.R16_SINT
R16_SNORM = TextureFormat.R16_SNORM
R16_UINT = TextureFormat.R16_UINT
R16_UNORM = TextureFormat.R16_UNORM
R24_UNORM_X8 = TextureFormat.R24_UNORM_X8
R32_SFLOAT = TextureFormat.R32_SFLOAT
R32_SFLOAT_X8_X24 = TextureFormat.R32_SFLOAT_X8_X24
R32_SINT = TextureFormat.R32_SINT
R32_UINT = TextureFormat.R32_UINT
R8_SINT = TextureFormat.R8_SINT
R8_SNORM = TextureFormat.R8_SNORM
R8_UINT = TextureFormat.R8_UINT
R8_UNORM = TextureFormat.R8_UNORM
R9_G9_B9_E5_UFLOAT = TextureFormat.R9_G9_B9_E5_UFLOAT
RG16_SFLOAT = TextureFormat.RG16_SFLOAT
RG16_SINT = TextureFormat.RG16_SINT
RG16_SNORM = TextureFormat.RG16_SNORM
RG16_UINT = TextureFormat.RG16_UINT
RG16_UNORM = TextureFormat.RG16_UNORM
RG32_SFLOAT = TextureFormat.RG32_SFLOAT
RG32_SINT = TextureFormat.RG32_SINT
RG32_UINT = TextureFormat.RG32_UINT
RG8_SINT = TextureFormat.RG8_SINT
RG8_SNORM = TextureFormat.RG8_SNORM
RG8_UINT = TextureFormat.RG8_UINT
RG8_UNORM = TextureFormat.RG8_UNORM
RGB32_SFLOAT = TextureFormat.RGB32_SFLOAT
RGB32_SINT = TextureFormat.RGB32_SINT
RGB32_UINT = TextureFormat.RGB32_UINT
RGBA16_SFLOAT = TextureFormat.RGBA16_SFLOAT
RGBA16_SINT = TextureFormat.RGBA16_SINT
RGBA16_SNORM = TextureFormat.RGBA16_SNORM
RGBA16_UINT = TextureFormat.RGBA16_UINT
RGBA16_UNORM = TextureFormat.RGBA16_UNORM
RGBA32_SFLOAT = TextureFormat.RGBA32_SFLOAT
RGBA32_SINT = TextureFormat.RGBA32_SINT
RGBA32_UINT = TextureFormat.RGBA32_UINT
RGBA8_SINT = TextureFormat.RGBA8_SINT
RGBA8_SNORM = TextureFormat.RGBA8_SNORM
RGBA8_SRGB = TextureFormat.RGBA8_SRGB
RGBA8_UINT = TextureFormat.RGBA8_UINT
RGBA8_UNORM = TextureFormat.RGBA8_UNORM
SAMPLER_FEEDBACK_MIN_MIP = TextureFormat.SAMPLER_FEEDBACK_MIN_MIP
SAMPLER_FEEDBACK_MIP_REGION_USED = TextureFormat.SAMPLER_FEEDBACK_MIP_REGION_USED
X24_R8_UINT = TextureFormat.X24_R8_UINT
X32_R8_UINT_X24 = TextureFormat.X32_R8_UINT_X24
property name

handle) -> str

Type

(self

class omni.ui.ToolBar

Bases: omni.ui._ui.Window

The ToolBar class represents a window in the underlying windowing system that as some fixed size property.

property axis
set_axis_changed_fn(self: omni.ui._ui.ToolBar, arg0: Callable[[omni.ui._ui.ToolBarAxis], None])None
class omni.ui.ToolBarAxis

Bases: pybind11_builtins.pybind11_object

Members:

X

Y

X = ToolBarAxis.X
Y = ToolBarAxis.Y
property name

handle) -> str

Type

(self

class omni.ui.ToolButton

Bases: omni.ui._ui.Button, omni.ui._ui.ValueModelHelper

ToolButton is functionally similar to Button, but provides a model that determines if the button is checked. This button toggles between checked (on) and unchecked (off) when the user clicks it.

class omni.ui.TreeView

Bases: omni.ui._ui.Widget, omni.ui._ui.ItemModelHelper

TreeView a widget that presents a hierarchical view of information. Each item can have a number of subitems. An indentation often visualizes this in a list. An item can be expanded to reveal subitems, if any exist, and collapsed to hide subitems. TreeView can be used in file manager applications, where it allows the user to navigate the file system directories. They are also used to present hierarchical data, such as the scene object hierarchy. TreeView uses a model/view pattern to manage the relationship between data and the way it is presented. The separation of functionality gives developers greater flexibility to customize the presentation of items and provides a standard interface to allow a wide range of data sources to be used with other widgets. TreeView is responsible for the presentation of model data to the user and processing user input. To allow some flexibility in the way the data is presented, the creation of the sub-widgets is performed by the delegate. It provides the ability to customize any sub-item of TreeView.

call_selection_changed_fn(self: omni.ui._ui.TreeView, arg0: List[omni.ui._ui.AbstractItem])None

Set the callback that is called when the selection is changed.

clear_selection(self: omni.ui._ui.TreeView)None

Deselects all selected items.

property column_widths

Widths of the columns. If not set, the width is Fraction(1).

property columns_resizable

When true, the columns can be resized with the mouse.

dirty_widgets(self: omni.ui._ui.TreeView)None

When called, it will make the delerate to regenerate all visible widgets the next frame.

property drop_between_items

When true, the tree nodes can be droped between items.

property expand_on_branch_click

This flag allows to prevent expanding when the user clicks the plus icon. It’s used in the case the user wants to control how the items expanded or collapsed.

extend_selection(self: omni.ui._ui.TreeView, item: omni.ui._ui.AbstractItem)None

Extends the current selection selecting all the items between currently selected nodes and the given item. It’s when user does shift+click.

has_selection_changed_fn(self: omni.ui._ui.TreeView)bool

Set the callback that is called when the selection is changed.

property header_visible

This property holds if the header is shown or not.

is_expanded(self: omni.ui._ui.TreeView, item: omni.ui._ui.AbstractItem)bool

Returns true if the given item is expanded.

property keep_alive

When true, the tree nodes are never destroyed even if they are disappeared from the model. It’s useul for the temporary filtering if it’s necessary to display thousands of nodes.

property keep_expanded

Expand all the nodes and keep them expanded regardless their state.

property root_expanded

The expanded state of the root item. Changing this flag doesn’t make the children repopulated.

property root_visible

This property holds if the root is shown. It can be used to make a single level tree appear like a simple list.

property selection

Set current selection.

set_expanded(self: omni.ui._ui.TreeView, item: omni.ui._ui.AbstractItem, expanded: bool, recursive: bool)None

Sets the given item expanded or collapsed.

### Arguments:

item :

The item to expand or collapse.

expanded :

True if it’s necessary to expand, false to collapse.

recursive :

True if it’s necessary to expand children.

set_selection_changed_fn(self: omni.ui._ui.TreeView, fn: Callable[[List[omni.ui._ui.AbstractItem]], None])None

Set the callback that is called when the selection is changed.

toggle_selection(self: omni.ui._ui.TreeView, item: omni.ui._ui.AbstractItem)None

Switches the selection state of the given item.

class omni.ui.Triangle

Bases: omni.ui._ui.Shape

The Triangle widget provides a colored rectangle to display.

property alignment

This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered.

class omni.ui.Type

Bases: pybind11_builtins.pybind11_object

Members:

LINE

HISTOGRAM

HISTOGRAM = Type.HISTOGRAM
LINE = Type.LINE
property name

handle) -> str

Type

(self

class omni.ui.UIntDrag

Bases: omni.ui._ui.UIntSlider

property step

This property control the steping speed on the drag, its float to enable slower speed but off course the value on the Control are still integer.

class omni.ui.UIntSlider

Bases: omni.ui._ui.AbstractSlider

The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into an integer value within the legal range. The difference with IntSlider is that UIntSlider has unsigned min/max.

property max

This property holds the slider’s maximum value.

property min

This property holds the slider’s minimum value.

class omni.ui.UnitType

Bases: pybind11_builtins.pybind11_object

Unit types.

Widths, heights or other UI length can be specified in pixels or relative to window (or child window) size.

Members:

PIXEL

PERCENT

FRACTION

FRACTION = UnitType.FRACTION
PERCENT = UnitType.PERCENT
PIXEL = UnitType.PIXEL
property name

handle) -> str

Type

(self

class omni.ui.VGrid

Bases: omni.ui._ui.Grid

Shortcut for Grid{eTopToBottom}. The grid grows from top to bottom with the widgets placed.

class omni.ui.VStack

Bases: omni.ui._ui.Stack

Shortcut for Stack{eTopToBottom}. The widgets are placed in a column, with suitable sizes.

class omni.ui.ValueModelHelper

Bases: pybind11_builtins.pybind11_object

TODO

property model
class omni.ui.VectorImageProvider

Bases: omni.ui._ui.ImageProvider

doc

property max_mip_levels

Maximum number of mip map levels allowed

property source_url

Sets the vector image URL. Asset loading doesn’t happen immediately, but rather is started the next time widget is visible, in prepareDraw call.

class omni.ui.Widget

Bases: pybind11_builtins.pybind11_object

The Widget class is the base class of all user interface objects. The widget is the atom of the user interface: it receives mouse, keyboard and other events, and paints a representation of itself on the screen. Every widget is rectangular. A widget is clipped by its parent and by the widgets in front of it.

FLAG_WANT_CAPTURE_KEYBOARD = 1073741824
call_accept_drop_fn(self: omni.ui._ui.Widget, arg0: str)bool

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

call_computed_content_size_changed_fn(self: omni.ui._ui.Widget)None

Called when the size of the widget is changed.

call_drag_fn(self: omni.ui._ui.Widget)str

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

call_drop_fn(self: omni.ui._ui.Widget, arg0: omni.ui._ui.WidgetMouseDropEvent)None

Specify that this Widget accepts drops and set the callback to the drop operation.

call_key_pressed_fn(self: omni.ui._ui.Widget, arg0: int, arg1: int, arg2: bool)None

Sets the function that will be called when the user presses the keyboard key when the mouse hovers the widget. void onKeyboardKey(int32_t key, carb::input::KeyboardModifierFlags modifier, bool pressed)

call_mouse_double_clicked_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int, arg3: int)None

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

call_mouse_hovered_fn(self: omni.ui._ui.Widget, arg0: bool)None

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

call_mouse_moved_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int, arg3: bool)None

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

call_mouse_pressed_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int, arg3: int)None

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where: ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

call_mouse_released_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int, arg3: int)None

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

call_mouse_wheel_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int)None

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

call_tooltip_fn(self: omni.ui._ui.Widget)None

set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

property checked

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

property computed_content_height

Returns the final computed height of the content of the widget. It’s in puplic section. For the explanation why please see the draw() method.

property computed_content_width

Returns the final computed width of the content of the widget. It’s in puplic section. For the explanation why please see the draw() method.

property computed_height

Returns the final computed height of the widget. It includes margins. It’s in puplic section. For the explanation why please see the draw() method.

property computed_width

Returns the final computed width of the widget. It includes margins. It’s in puplic section. For the explanation why please see the draw() method.

destroy(self: omni.ui._ui.Widget)None

Removes all the callbacks and circular references.

property dragging

This property holds if the widget is being dragged.

property enabled

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

has_accept_drop_fn(self: omni.ui._ui.Widget)bool

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

has_computed_content_size_changed_fn(self: omni.ui._ui.Widget)bool

Called when the size of the widget is changed.

has_drag_fn(self: omni.ui._ui.Widget)bool

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

has_drop_fn(self: omni.ui._ui.Widget)bool

Specify that this Widget accepts drops and set the callback to the drop operation.

has_key_pressed_fn(self: omni.ui._ui.Widget)bool

Sets the function that will be called when the user presses the keyboard key when the mouse hovers the widget. void onKeyboardKey(int32_t key, carb::input::KeyboardModifierFlags modifier, bool pressed)

has_mouse_double_clicked_fn(self: omni.ui._ui.Widget)bool

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

has_mouse_hovered_fn(self: omni.ui._ui.Widget)bool

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

has_mouse_moved_fn(self: omni.ui._ui.Widget)bool

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

has_mouse_pressed_fn(self: omni.ui._ui.Widget)bool

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where: ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

has_mouse_released_fn(self: omni.ui._ui.Widget)bool

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

has_mouse_wheel_fn(self: omni.ui._ui.Widget)bool

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

has_tooltip_fn(self: omni.ui._ui.Widget)bool

set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

property height

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

property identifier

an optional identifier of the widget we can use to refer to it in queries.

property name

The name of the widget that user can set.

property opaque_for_mouse_events

if the widgets has callback functions it will by default not capture the events event if is the top most widget setup this options to true to enable you to capture the events so they don’t also get routed to the bellow widgets

property screen_position_x

Returns the X Screen coordinate the widget was last draw this is in Screen Pixel size. It’s float because we need negative numbers and precise position considerring DPI scale factor.

property screen_position_y

Returns the Y Screen coordinate the widget was last draw this is in Screen Pixel size. It’s float because we need negative numbers and precise position considerring DPI scale factor.

scroll_here(self: omni.ui._ui.Widget, center_ratio_x: float = 0.0, center_ratio_y: float = 0.0)None

Adjust scrolling amount in two axes to make current item visible.

### Arguments:

centerRatioX :

0.0: left, 0.5: center, 1.0: right

centerRatioY :

0.0: top, 0.5: center, 1.0: bottom

scroll_here_x(self: omni.ui._ui.Widget, center_ratio: float = 0.0)None

Adjust scrolling amount to make current item visible.

### Arguments:

centerRatio :

0.0: left, 0.5: center, 1.0: right

scroll_here_y(self: omni.ui._ui.Widget, center_ratio: float = 0.0)None

Adjust scrolling amount to make current item visible.

### Arguments:

centerRatio :

0.0: top, 0.5: center, 1.0: bottom

property selected

This property holds a flag that specifies the widget has to use eSelected state of the style.

set_accept_drop_fn(self: omni.ui._ui.Widget, fn: Callable[[str], bool])None

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

set_checked_changed_fn(self: omni.ui._ui.Widget, fn: Callable[[bool], None])None

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

set_computed_content_size_changed_fn(self: omni.ui._ui.Widget, fn: Callable[], None])None

Called when the size of the widget is changed.

set_drag_fn(self: omni.ui._ui.Widget, fn: Callable[], str])None

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

set_drop_fn(self: omni.ui._ui.Widget, fn: Callable[[omni.ui._ui.WidgetMouseDropEvent], None])None

Specify that this Widget accepts drops and set the callback to the drop operation.

set_key_pressed_fn(self: omni.ui._ui.Widget, fn: Callable[[int, int, bool], None])None

Sets the function that will be called when the user presses the keyboard key when the mouse hovers the widget. void onKeyboardKey(int32_t key, carb::input::KeyboardModifierFlags modifier, bool pressed)

set_mouse_double_clicked_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int, int], None])None

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

set_mouse_hovered_fn(self: omni.ui._ui.Widget, fn: Callable[[bool], None])None

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

set_mouse_moved_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int, bool], None])None

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

set_mouse_pressed_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int, int], None])None

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where: ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

set_mouse_released_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int, int], None])None

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

set_mouse_wheel_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int], None])None

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

set_style(self: omni.ui._ui.Widget, arg0: handle)None

Set the current style. The style contains a description of customizations to the widget’s style.

set_tooltip(self: omni.ui._ui.Widget, tooltip_label: str)None

set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

set_tooltip_fn(self: omni.ui._ui.Widget, fn: Callable[], None])None

set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

property skip_draw_when_clipped

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

property style

The local style. When the user calls setStyle()

property style_type_name_override

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget as a part of another widget. (Label is a part of Button) This property can override the name to use in style.

property tooltip

set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

property tooltip_offset_x

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

property tooltip_offset_y

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

property visible

This property holds whether the widget is visible.

property visible_max

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

property visible_min

If the current zoom factor and DPI is less than this value, the widget is not visible.

property width

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

class omni.ui.WidgetMouseDropEvent

Bases: pybind11_builtins.pybind11_object

Holds the data which is sent when a drag and drop action is completed.

property mime_data

The data that was dropped on the widget.

property x

Position where the drop was made.

property y

Position where the drop was made.

class omni.ui.Window

Bases: omni.ui._ui.WindowHandle

The Window class represents a window in the underlying windowing system. This window is a child window of main Kit window. And it can be docked.

property auto_resize

setup the window to resize automatically based on its content

call_key_pressed_fn(self: omni.ui._ui.Window, arg0: int, arg1: int, arg2: bool)None

Sets the function that will be called when the user presses the keyboard key on the focused window. void onKeyboardKey(int32_t key, carb::input::KeyboardModifierFlags modifier, bool pressed)

deferred_dock_in(self: omni.ui._ui.Window, target_window: str, active_window: omni.ui._ui.DockPolicy = DockPolicy.DO_NOTHING)None

Deferred docking. We need it when we want to dock windows before they was actually created. It’s helpful when extension initialization, before any window is created.

### Arguments:

targetWindowTitle :

Dock to window with this title when it appears.

activeWindow :

Make target or this window active when docked.

destroy(self: omni.ui._ui.Window)None

Removes all the callbacks and circular references.

property detachable

If the window is able to be separated from the main application window.

dock_in_window(self: omni.ui._ui.Window, title: str, dockPosition: omni.ui._ui.DockPosition, ratio: float = 0.5)bool

place the window in a specific docking position based on a target window nane We will find the target window dock node and insert this window in it, either by spliting on ratio or on top if the window is not found false is return, otherwise true

property docked

Has true if this window is docked. False otherwise. It’s a read-only property.

property exclusive_keyboard

When true, only the current window will receive keyboard events when it’s focused. It’s useful to override the global key bindings.

property flags

This property set the Flags for the Window.

property focused
property frame

The main layout of this window.

get_window_callback(self: omni.ui._ui.Window)omni::ui::windowmanager::IWindowCallback

Returns window set draw callback pointer for the given UI window.

has_key_pressed_fn(self: omni.ui._ui.Window)bool

Sets the function that will be called when the user presses the keyboard key on the focused window. void onKeyboardKey(int32_t key, carb::input::KeyboardModifierFlags modifier, bool pressed)

property height

This property holds the window Height.

property menu_bar
move_to_app_window(self: omni.ui._ui.Window, arg0: omni.appwindow._appwindow.IAppWindow)None

Moves the window to the specific OS window.

property noTabBar

setup the visibility of the TabBar Handle, this is the small triangle at the corner of the view If it is not shown then it is not possible to undock that window and it need to be closed/moved programatically

notify_app_window_change(self: omni.ui._ui.Window, arg0: omni.appwindow._appwindow.IAppWindow)None

Notifies the window that window set has changed.

property padding_x

This property set the padding to the frame on the X axis.

property padding_y

This property set the padding to the frame on the Y axis.

property position_x

This property set/get the position of the window in the X Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position.

property position_y

This property set/get the position of the window in the Y Axis The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position.

property selected_in_dock

Read only property that is true when the window is focused.

setPosition(self: omni.ui._ui.Window, x: float, y: float)None

This property set/get the position of the window in both axis calling the property.

set_docked_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[bool], None])None

Has true if this window is docked. False otherwise. It’s a read-only property.

set_focused_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[bool], None])None

Read only property that is true when the window is focused.

set_height_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[float], None])None

This property holds the window Height.

set_key_pressed_fn(self: omni.ui._ui.Window, fn: Callable[[int, int, bool], None])None

Sets the function that will be called when the user presses the keyboard key on the focused window. void onKeyboardKey(int32_t key, carb::input::KeyboardModifierFlags modifier, bool pressed)

set_position_x_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[float], None])None

This property set/get the position of the window in the X Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position.

set_position_y_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[float], None])None

This property set/get the position of the window in the Y Axis The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position.

set_selected_in_dock_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[bool], None])None

Has true if this window is currently selected in the dock. False otherwise. It’s a read-only property.

set_top_modal(self: omni.ui._ui.Window)None

Brings this window to the top level of modal windows.

set_visibility_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[bool], None])None

This property holds whether the window is visible.

set_width_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[float], None])None

This property holds the window Width.

property title

This property holds the window’s title.

property visible

This property holds whether the window is visible.

property width

This property holds the window Width.

class omni.ui.WindowHandle

Bases: pybind11_builtins.pybind11_object

WindowHandle is a handle object to control any of the windows in Kit. It can be created any time, and if it’s destroyed, the source window doesn’t disappear.

property dock_id

Returns ID of the dock node this window is docked to.

dock_in(self: omni.ui._ui.WindowHandle, window: omni.ui._ui.WindowHandle, dock_position: omni.ui._ui.DockPosition, ratio: float = 0.5)None

Dock the window to the existing window. It can split the window to two parts or it can convert the window to a docking tab.

property dock_order

The position of the window in the dock.

property dock_tab_bar_enabled

Checks if the current docking space is disabled. The disabled docking tab bar can’t be shown by the user.

property dock_tab_bar_visible

Checks if the current docking space has the tab bar.

property docked

True if this window is docked. False otherwise.

focus(self: omni.ui._ui.WindowHandle)None

Brings the window to the top. If it’s a docked window, it makes the window currently visible in the dock.

property height

The height of the window in points.

is_selected_in_dock(self: omni.ui._ui.WindowHandle)bool

Return true is the window is the current window in the docking area.

notify_app_window_change(self: omni.ui._ui.WindowHandle, arg0: omni.appwindow._appwindow.IAppWindow)None

Notifies the UI window that the AppWindow it attached to has changed.

property position_x

The position of the window in points.

property position_y

The position of the window in points.

property title

The title of the window.

undock(self: omni.ui._ui.WindowHandle)None

Undock the window and make it floating.

property visible

Returns whether the window is visible.

property width

The width of the window in points.

class omni.ui.Workspace

Bases: pybind11_builtins.pybind11_object

Workspace object provides access to the windows in Kit.

static clear()None

Undock all.

dump_workspace()

Capture current workspace and return the dict with the description of the docking state and window size.

static get_dock_children_id(dock_id: int)object

Get two dock children of the given dock ID. true if the given dock ID has children

### Arguments:

dockId :

the given dock ID

first :

output. the first child dock ID

second :

output. the second child dock ID

static get_dock_position(dock_id: int)omni.ui._ui.DockPosition

Returns the position of the given dock ID. Left/Right/Top/Bottom.

static get_docked_neighbours(member: omni.ui._ui.WindowHandle)List[omni.ui._ui.WindowHandle]

Get all the windows that docked with the given widow.

static get_docked_windows(dock_id: int)List[omni.ui._ui.WindowHandle]

Get all the windows of the given dock ID.

static get_dpi_scale()float

Returns current DPI Scale.

static get_main_window_height()float

Get the height in points of the current main window.

static get_main_window_width()float

Get the width in points of the current main window.

static get_selected_window_index(dock_id: int)int

Get currently selected window inedx from the given dock id.

static get_window(title: str)omni.ui._ui.WindowHandle

Find Window by name.

static get_window_from_callback(callback: omni::ui::windowmanager::IWindowCallback)omni.ui._ui.WindowHandle

Find Window by window callback.

static get_windows()List[omni.ui._ui.WindowHandle]

Returns the list of windows ordered from back to front. If the window is a Omni::UI window, it can be upcasted.

restore_workspace(keep_windows_open=False)

Dock the windows according to the workspace description.

### Arguments

workspace_dump : List[Any]

The dictionary with the description of the layout. It’s the dict received from dump_workspace.

keep_windows_open : bool

Determines if it’s necessary to hide the already opened windows that are not present in workspace_dump.

static set_show_window_fn(title: str, fn: Callable[[bool], None])None

Add the callback to create a window with the given title. When the callback’s argument is true, it’s necessary to create the window. Otherwise remove.

static set_window_created_callback(fn: Callable[[omni.ui._ui.WindowHandle], None])None

Addd the callback that is triggered when a new window is created.

static show_window(title: str, show: bool = True)bool

Makes the window visible or create the window with the callback provided with set_show_window_fn. true if the window is already created, otherwise it’s necessary to wait one frame

### Arguments:

title :

the given window title

show :

true to show, false to hide

class omni.ui.ZStack

Bases: omni.ui._ui.Stack

Shortcut for Stack{eBackToFront}. The widgets are placed sorted in a Z-order in top right corner with suitable sizes.

omni.ui.add_to_namespace(module=None, module_locals={'AbstractField': <class 'omni.ui._ui.AbstractField'>, 'AbstractItem': <class 'omni.ui._ui.AbstractItem'>, 'AbstractItemDelegate': <class 'omni.ui._ui.AbstractItemDelegate'>, 'AbstractItemModel': <class 'omni.ui._ui.AbstractItemModel'>, 'AbstractMultiField': <class 'omni.ui._ui.AbstractMultiField'>, 'AbstractSlider': <class 'omni.ui._ui.AbstractSlider'>, 'AbstractValueModel': <class 'omni.ui._ui.AbstractValueModel'>, 'Alignment': <class 'omni.ui._ui.Alignment'>, 'ArrowHelper': <class 'omni.ui._ui.ArrowHelper'>, 'ArrowType': <class 'omni.ui._ui.ArrowType'>, 'Axis': <class 'omni.ui._ui.Axis'>, 'BezierCurve': <class 'omni.ui._ui.BezierCurve'>, 'Button': <class 'omni.ui._ui.Button'>, 'ByteImageProvider': <class 'omni.ui._ui.ByteImageProvider'>, 'CanvasFrame': <class 'omni.ui._ui.CanvasFrame'>, 'CheckBox': <class 'omni.ui._ui.CheckBox'>, 'Circle': <class 'omni.ui._ui.Circle'>, 'CircleSizePolicy': <class 'omni.ui._ui.CircleSizePolicy'>, 'CollapsableFrame': <class 'omni.ui._ui.CollapsableFrame'>, 'ColorStore': <class 'omni.ui._ui.ColorStore'>, 'ColorWidget': <class 'omni.ui._ui.ColorWidget'>, 'ComboBox': <class 'omni.ui._ui.ComboBox'>, 'Container': <class 'omni.ui._ui.Container'>, 'CornerFlag': <class 'omni.ui._ui.CornerFlag'>, 'Direction': <class 'omni.ui._ui.Direction'>, 'DockPolicy': <class 'omni.ui._ui.DockPolicy'>, 'DockPosition': <class 'omni.ui._ui.DockPosition'>, 'DockPreference': <class 'omni.ui._ui.DockPreference'>, 'DockSpace': <class 'omni.ui._ui.DockSpace'>, 'Ellipse': <class 'omni.ui._ui.Ellipse'>, 'FillPolicy': <class 'omni.ui._ui.FillPolicy'>, 'FloatDrag': <class 'omni.ui._ui.FloatDrag'>, 'FloatField': <class 'omni.ui._ui.FloatField'>, 'FloatSlider': <class 'omni.ui._ui.FloatSlider'>, 'FloatStore': <class 'omni.ui._ui.FloatStore'>, 'FontStyle': <class 'omni.ui._ui.FontStyle'>, 'Fraction': <class 'omni.ui._ui.Fraction'>, 'Frame': <class 'omni.ui._ui.Frame'>, 'FreeBezierCurve': <class 'omni.ui._ui.FreeBezierCurve'>, 'FreeCircle': <class 'omni.ui._ui.FreeCircle'>, 'FreeEllipse': <class 'omni.ui._ui.FreeEllipse'>, 'FreeLine': <class 'omni.ui._ui.FreeLine'>, 'FreeRectangle': <class 'omni.ui._ui.FreeRectangle'>, 'FreeTriangle': <class 'omni.ui._ui.FreeTriangle'>, 'Grid': <class 'omni.ui._ui.Grid'>, 'HGrid': <class 'omni.ui._ui.HGrid'>, 'HStack': <class 'omni.ui._ui.HStack'>, 'Image': <class 'omni.ui._ui.Image'>, 'ImageProvider': <class 'omni.ui._ui.ImageProvider'>, 'ImageWithProvider': <class 'omni.ui._ui.ImageWithProvider'>, 'Inspector': <class 'omni.ui._ui.Inspector'>, 'IntDrag': <class 'omni.ui._ui.IntDrag'>, 'IntField': <class 'omni.ui._ui.IntField'>, 'IntSlider': <class 'omni.ui._ui.IntSlider'>, 'InvisibleButton': <class 'omni.ui._ui.InvisibleButton'>, 'ItemModelHelper': <class 'omni.ui._ui.ItemModelHelper'>, 'IwpFillPolicy': <class 'omni.ui._ui.IwpFillPolicy'>, 'Label': <class 'omni.ui._ui.Label'>, 'Length': <class 'omni.ui._ui.Length'>, 'Line': <class 'omni.ui._ui.Line'>, 'MainWindow': <class 'omni.ui._ui.MainWindow'>, 'Menu': <class 'omni.ui._ui.Menu'>, 'MenuBar': <class 'omni.ui._ui.MenuBar'>, 'MenuDelegate': <class 'omni.ui._ui.MenuDelegate'>, 'MenuHelper': <class 'omni.ui._ui.MenuHelper'>, 'MenuItem': <class 'omni.ui._ui.MenuItem'>, 'MenuItemCollection': <class 'omni.ui._ui.MenuItemCollection'>, 'MultiFloatDragField': <class 'omni.ui._ui.MultiFloatDragField'>, 'MultiFloatField': <class 'omni.ui._ui.MultiFloatField'>, 'MultiIntDragField': <class 'omni.ui._ui.MultiIntDragField'>, 'MultiIntField': <class 'omni.ui._ui.MultiIntField'>, 'MultiStringField': <class 'omni.ui._ui.MultiStringField'>, 'OffsetLine': <class 'omni.ui._ui.OffsetLine'>, 'Optional': typing.Optional, 'Percent': <class 'omni.ui._ui.Percent'>, 'Pixel': <class 'omni.ui._ui.Pixel'>, 'Placer': <class 'omni.ui._ui.Placer'>, 'Plot': <class 'omni.ui._ui.Plot'>, 'ProgressBar': <class 'omni.ui._ui.ProgressBar'>, 'RadioButton': <class 'omni.ui._ui.RadioButton'>, 'RadioCollection': <class 'omni.ui._ui.RadioCollection'>, 'RasterImageProvider': <class 'omni.ui._ui.RasterImageProvider'>, 'Rectangle': <class 'omni.ui._ui.Rectangle'>, 'ScrollBarPolicy': <class 'omni.ui._ui.ScrollBarPolicy'>, 'ScrollingFrame': <class 'omni.ui._ui.ScrollingFrame'>, 'Separator': <class 'omni.ui._ui.Separator'>, 'Shape': <class 'omni.ui._ui.Shape'>, 'SimpleBoolModel': <class 'omni.ui._ui.SimpleBoolModel'>, 'SimpleFloatModel': <class 'omni.ui._ui.SimpleFloatModel'>, 'SimpleIntModel': <class 'omni.ui._ui.SimpleIntModel'>, 'SimpleStringModel': <class 'omni.ui._ui.SimpleStringModel'>, 'SliderDrawMode': <class 'omni.ui._ui.SliderDrawMode'>, 'Spacer': <class 'omni.ui._ui.Spacer'>, 'Stack': <class 'omni.ui._ui.Stack'>, 'StringField': <class 'omni.ui._ui.StringField'>, 'StringStore': <class 'omni.ui._ui.StringStore'>, 'Style': <class 'omni.ui._ui.Style'>, 'TextureFormat': <class 'omni.ui._ui.TextureFormat'>, 'ToolBar': <class 'omni.ui._ui.ToolBar'>, 'ToolBarAxis': <class 'omni.ui._ui.ToolBarAxis'>, 'ToolButton': <class 'omni.ui._ui.ToolButton'>, 'TreeView': <class 'omni.ui._ui.TreeView'>, 'Triangle': <class 'omni.ui._ui.Triangle'>, 'Type': <class 'omni.ui._ui.Type'>, 'UIntDrag': <class 'omni.ui._ui.UIntDrag'>, 'UIntSlider': <class 'omni.ui._ui.UIntSlider'>, 'UnitType': <class 'omni.ui._ui.UnitType'>, 'VGrid': <class 'omni.ui._ui.VGrid'>, 'VStack': <class 'omni.ui._ui.VStack'>, 'ValueModelHelper': <class 'omni.ui._ui.ValueModelHelper'>, 'VectorImageProvider': <class 'omni.ui._ui.VectorImageProvider'>, 'WINDOW_FLAGS_FORCE_HORIZONTAL_SCROLLBAR': 32768, 'WINDOW_FLAGS_FORCE_VERTICAL_SCROLLBAR': 16384, 'WINDOW_FLAGS_MENU_BAR': 1024, 'WINDOW_FLAGS_MODAL': 134217728, 'WINDOW_FLAGS_NONE': 0, 'WINDOW_FLAGS_NO_BACKGROUND': 128, 'WINDOW_FLAGS_NO_CLOSE': 2147483648, 'WINDOW_FLAGS_NO_COLLAPSE': 32, 'WINDOW_FLAGS_NO_DOCKING': 2097152, 'WINDOW_FLAGS_NO_FOCUS_ON_APPEARING': 4096, 'WINDOW_FLAGS_NO_MOUSE_INPUTS': 512, 'WINDOW_FLAGS_NO_MOVE': 4, 'WINDOW_FLAGS_NO_RESIZE': 2, 'WINDOW_FLAGS_NO_SAVED_SETTINGS': 256, 'WINDOW_FLAGS_NO_SCROLLBAR': 8, 'WINDOW_FLAGS_NO_SCROLL_WITH_MOUSE': 16, 'WINDOW_FLAGS_NO_TITLE_BAR': 1, 'WINDOW_FLAGS_POPUP': 67108864, 'WINDOW_FLAGS_SHOW_HORIZONTAL_SCROLLBAR': 2048, 'Widget': <class 'omni.ui._ui.Widget'>, 'WidgetMouseDropEvent': <class 'omni.ui._ui.WidgetMouseDropEvent'>, 'Window': <class 'omni.ui._ui.Window'>, 'WindowHandle': <class 'omni.ui._ui.WindowHandle'>, 'Workspace': <class 'omni.ui._ui.Workspace'>, 'ZStack': <class 'omni.ui._ui.ZStack'>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__pybind11_internals_v3_gxx_1008_glibc_20180303___': <capsule object NULL>, '__pybind11_internals_v3_gxx_1011_glibc_20180303___': <capsule object NULL>, '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2021 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/__pycache__/__init__.cpython-37.pyc', '__doc__': '\nOmni::UI\n--------\n\nOmni::UI is Omniverse\'s UI toolkit for creating beautiful and flexible graphical user interfaces\nin the Kit extensions. Omni::UI provides the basic types necessary to create rich extensions with\na fluid and dynamic user interface in Omniverse Kit. It gives a layout system and includes\nwidgets for creating visual components, receiving user input, and creating data models. It allows\nser interface components to be built around their behavior and enables a declarative flavor of\ndescribing the layout of the application. Omni::UI gives a very flexible styling system that\nallows deep customizing the final look of the application.\n\nTypical Example\n---------------\n\nTypical example to create a window with two buttons:\n\n.. code-block::\n\n    import omni.ui as ui\n\n    _window_example = ui.Window("Example Window", width=300, height=300)\n\n    with _window_example.frame:\n        with ui.VStack():\n            ui.Button("click me")\n\n            def move_me(window):\n                window.setPosition(200, 200)\n\n            def size_me(window):\n                window.width = 300\n                window.height = 300\n\n            ui.Button("Move to (200,200)", clicked_fn=lambda w=self._window_example: move_me(w))\n            ui.Button("Set size (300,300)", clicked_fn=lambda w=self._window_example: size_me(w))\n\nDetailed Documentation\n----------------------\n\nOmni::UI is shipped with the developer documentation that is written with Omni::UI. For detailed documentation, please\nsee `omni.example.ui` extension. It has detailed descriptions of all the classes, best practices, and real-world usage\nexamples.\n\nLayout\n------\n\n* Arrangement of elements\n    * :class:`.CollapsableFrame`\n    * :class:`.Frame`\n    * :class:`.HStack`\n    * :class:`.Placer`\n    * :class:`.ScrollingFrame`\n    * :class:`.Spacer`\n    * :class:`.VStack`\n    * :class:`.ZStack`\n\n* Lengths\n    * :class:`.Fraction`\n    * :class:`.Percent`\n    * :class:`.Pixel`\n\nWidgets\n-------\n\n* Base Widgets\n    * :class:`.Button`\n    * :class:`.Image`\n    * :class:`.Label`\n\n* Shapes\n    * :class:`.Circle`\n    * :class:`.Line`\n    * :class:`.Rectangle`\n    * :class:`.Triangle`\n\n* Menu\n    * :class:`.Menu`\n    * :class:`.MenuItem`\n\n* Model-View Widgets\n    * :class:`.AbstractItemModel`\n    * :class:`.AbstractValueModel`\n    * :class:`.CheckBox`\n    * :class:`.ColorWidget`\n    * :class:`.ComboBox`\n    * :class:`.RadioButton`\n    * :class:`.RadioCollection`\n    * :class:`.TreeView`\n\n* Model-View Fields\n    * :class:`.FloatField`\n    * :class:`.IntField`\n    * :class:`.MultiField`\n    * :class:`.StringField`\n\n* Model-View Drags and Sliders\n    * :class:`.FloatDrag`\n    * :class:`.FloatSlider`\n    * :class:`.IntDrag`\n    * :class:`.IntSlider`\n\n* Model-View ProgressBar\n    * :class:`.ProgressBar`\n\n* Windows\n    * :class:`.ToolBar`\n    * :class:`.Window`\n    * :class:`.Workspace`\n\n* Web\n    * :class:`.WebViewWidget`\n\n', '__file__': '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/__init__.py', '__loader__': <_frozen_importlib_external.SourceFileLoader object>, '__name__': 'omni.ui', '__package__': 'omni.ui', '__path__': ['/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui'], '__spec__': ModuleSpec(name='omni.ui', loader=<_frozen_importlib_external.SourceFileLoader object>, origin='/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/__init__.py', submodule_search_locations=['/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui']), '_ui': <module 'omni.ui._ui' from '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/_ui.cpython-37m-x86_64-linux-gnu.so'>, 'abstract_shade': <module 'omni.ui.abstract_shade' from '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/abstract_shade.py'>, 'add_to_namespace': <function add_to_namespace>, 'color': <omni.ui.color_utils.ColorShade object>, 'color_utils': <module 'omni.ui.color_utils' from '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/color_utils.py'>, 'constant': <omni.ui.constant_utils.FloatShade object>, 'constant_utils': <module 'omni.ui.constant_utils' from '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/constant_utils.py'>, 'dock_window_in_window': <built-in method dock_window_in_window of PyCapsule object>, 'get_custom_glyph_code': <built-in method get_custom_glyph_code of PyCapsule object>, 'get_main_window_height': <built-in method get_main_window_height of PyCapsule object>, 'get_main_window_width': <built-in method get_main_window_width of PyCapsule object>, 'set_menu_delegate': <function set_menu_delegate>, 'set_shade': <function set_shade>, 'singleton': <module 'omni.ui.singleton' from '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/singleton.py'>, 'style': <omni.ui._ui.Style object>, 'style_utils': <module 'omni.ui.style_utils' from '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/style_utils.py'>, 'url': <omni.ui.url_utils.StringShade object>, 'url_utils': <module 'omni.ui.url_utils' from '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/url_utils.py'>, 'workspace_utils': <module 'omni.ui.workspace_utils' from '/buildAgent/work/b873e20d07f4fbd1/kit/_build/linux-x86_64/release/extscore/omni.ui/omni/ui/workspace_utils.py'>})
omni.ui.dock_window_in_window(arg0: str, arg1: str, arg2: omni.ui._ui.DockPosition, arg3: float)bool

place a named window in a specific docking position based on a target window nane We will find the target window dock node and insert this named window in it, either by spliting on ratio or on top if the windows is not found false is return, otherwise true

omni.ui.get_custom_glyph_code(file_path: str, font_style: omni.ui._ui.FontStyle = FontStyle.NORMAL)str

Get glyph code.

Parameters
  • file_path (str) – Path to svg file

  • font_style (FontStyle) – font style to use.

omni.ui.get_main_window_height()float

Get the height in ponts of the current main window.

omni.ui.get_main_window_width()float

Get the width in ponts of the current main window.

omni.ui.set_menu_delegate(delegate: omni.ui._ui.MenuDelegate)

Set the default delegate to use it when the item doesn’t have a delegate.

omni.ui.set_shade(shade_name: Optional[str] = None)