LayerPathWidget

class omni.kit.property.layer.layer_property_widgets.LayerPathWidget(icon_path)

Bases: SimplePropertyWidget

A widget for displaying and interacting with the file path of a USD layer.

This widget provides an interface for users to view, select, and change the file path of a USD layer. It includes functionality to open a file picker dialog, navigate to the selected file, and update the path based on user input. The widget also supports displaying whether the current layer is missing and allows for finding and replacing layer paths.

Parameters

icon_path (str) – The file system path to the directory containing the icons used in the widget.

Methods

__init__(icon_path)

Initializes the LayerPathWidget with necessary setup.

build_items()

Constructs the UI elements for the layer path widget.

destroy()

Cleans up resources, specifically the file picker if it was created.

on_new_payload(payload)

Handles a new payload for the widget.

__init__(icon_path)

Initializes the LayerPathWidget with necessary setup.

build_items()

Constructs the UI elements for the layer path widget.

destroy()

Cleans up resources, specifically the file picker if it was created.

on_new_payload(payload)

Handles a new payload for the widget.

Parameters

payload (Dict) – The new payload to be handled by the widget.

Returns

True if the payload is not None, False otherwise.

Return type

bool