MaterialBrowserWidget#

class omni.kit.window.material.MaterialBrowserWidget(**kwargs)#

Bases: TreeFolderBrowserWidget

Represent material browser widget with kinds of view mode supoort.

Methods

__init__(**kwargs)

build_widgets()

Build widgets for mateiral browser.

destroy()

Destroys all widget components and releases resources.

preview_material(item, on)

Material preview on/off.

Attributes

library_options_menu

Gets the library options menu for the widget.

stage_options_menu

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,
) None#

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

property library_options_menu: OptionsMenu | None#

Gets the library options menu for the widget.

Returns:

The options menu used for library mode in the MaterialBrowserWidget.

Return type:

Optional[OptionsMenu]

property stage_options_menu: OptionsMenu | None#

Gets the stage options menu for the widget.

Returns:

The options menu used for stage mode in the MaterialBrowserWidget.

Return type:

Optional[OptionsMenu]