MaterialBrowserWidget#
- class omni.kit.window.material.MaterialBrowserWidget(**kwargs)#
Bases:
TreeFolderBrowserWidgetRepresent material browser widget with kinds of view mode supoort.
Methods
__init__(**kwargs)Build widgets for mateiral browser.
destroy()Destroys all widget components and releases resources.
preview_material(item, on)Material preview on/off.
Attributes
Gets the library options menu for the widget.
Gets the stage options menu for the widget.
- __init__(**kwargs)#
- build_widgets() None#
Build widgets for mateiral browser.
- destroy() None#
Destroys all widget components and releases resources.
Releases callbacks registered with the search bar and stage material model, removes widget listeners, and calls destroy on the toolbar, preview widget, stage options menu, browser model, and delegate. Finally, calls the parent destroy method to complete cleanup.
- preview_material(
- item: MaterialPrimDetailItem,
- on: bool,
Material preview on/off. :param item: Detail item to preview the material. :type item: Optional[MaterialPrimDetailItem] :param on: True means preview is on, False means preview off :type on: bool
Gets the library options menu for the widget.
- Returns:
The options menu used for library mode in the MaterialBrowserWidget.
- Return type:
Optional[OptionsMenu]
Gets the stage options menu for the widget.
- Returns:
The options menu used for stage mode in the MaterialBrowserWidget.
- Return type:
Optional[OptionsMenu]