WidgetModel#

class omni.kit.window.inspector.property.widget_model.WidgetModel(widget: Widget, property: str, dragable=True)#

Bases: AbstractValueModel

Model for widget Properties

Methods

__init__(widget, property[, dragable])

Args:

destroy()

get_value_as_bool(self)

Return the bool representation of the value.

get_value_as_float(self)

Return the float representation of the value.

get_value_as_int(self)

Return the int representation of the value.

get_value_as_string(self)

Return the string representation of the value.

set_value(*args, **kwargs)

Overloaded function.

Attributes

__init__(
widget: Widget,
property: str,
dragable=True,
)#

Args:

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.

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.