PropertyWidget
- class omni.kit.window.property.templates.simple_property_widget.PropertyWidget(title: str)
Bases:
object
Base class to create a group of widgets in Property Window
Methods
__init__
(title)Initialize class function
build
([filter_cls])UI builder function.
Main function to creates the UI elements.
clean
()Clean up function to be called before destroying the object.
on_new_payload
(payload)Called when a new payload is delivered.
reset
()Clean up function to be called when previously built widget is no longer visible given new scheme/payload.
- __init__(title: str)
Initialize class function
- build(filter_cls: Optional[PropertyFilter] = None)
UI builder function.
- Parameters
filter_cls (PropertyFilter) – filter to use while building UI.
- abstract build_impl()
Main function to creates the UI elements.
- abstract clean()
Clean up function to be called before destroying the object.
- abstract on_new_payload(payload) bool
Called when a new payload is delivered. PropertyWidget can take this opportunity to update its ui models, or schedule full UI rebuild.
- Parameters
payload – The new payload to refresh UI or update model.
- Returns
True if the UI needs to be rebuilt. build_impl will be called as a result. False if the UI does not need to be rebuilt. build_impl will not be called.
- abstract reset()
Clean up function to be called when previously built widget is no longer visible given new scheme/payload.