UsdShadeShaderWidget

class omni.kit.property.material.scripts.widgets.usdshade.UsdShadeShaderWidget(title: str = 'Shader')

Bases: UsdShadeBaseWidget

A widget class for representing and interacting with USD Shade shaders.

This widget is specifically designed for working with shading elements within a USD scene. It extends the capabilities of the UsdShadeBaseWidget to provide a user interface component that allows for the selection and manipulation of Shader prims. The widget can be titled for context within the UI.

Parameters

title (str) – The title of the shader widget. Defaults to ‘Shader’.

Methods

__init__([title])

Initializes the UsdShadeShaderWidget.

on_new_payload(payload)

Processes the given payload and updates the shader widget if necessary.

Attributes

__init__(title: str = 'Shader')

Initializes the UsdShadeShaderWidget.

on_new_payload(payload: PrimSelectionPayload) bool

Processes the given payload and updates the shader widget if necessary.

Parameters

payload (PrimSelectionPayload) – The payload containing prims to represent.

Returns

True if the prims can be represented, False otherwise.

Return type

bool