UsdShadeMaterialWidget
- class omni.kit.property.material.scripts.widgets.usdshade.UsdShadeMaterialWidget(title: str = 'Material and Shader')
Bases:
UsdShadeBaseWidget
A widget for displaying and editing USD Shade materials.
This widget extends the UsdShadeBaseWidget to provide a user interface for interacting with materials defined in USD (Universal Scene Description) files. It allows users to view and modify material properties, including shader parameters and render contexts. The widget dynamically updates to reflect changes in the underlying USD file and provides a way to visualize different shader effects.
The widget is designed to work within the NVIDIA Omniverse Kit framework and interacts with various USD and Omniverse Kit APIs to manage material properties. It subscribes to changes in application settings to reflect updates in the UI and supports async operations for handling material attributes.
- Parameters
title (str) – The title of the widget, defaulting to ‘Material and Shader’.
Methods
__init__
([title])Initializes the UsdShadeMaterialWidget with optional title.
clean
()Clean up function to be called before destroying the object.
on_new_payload
(payload)Handles a new payload for the widget.
Attributes
Path to base shader display settings.
Path to render contexts settings.
- __init__(title: str = 'Material and Shader')
Initializes the UsdShadeMaterialWidget with optional title.
- clean() None
Clean up function to be called before destroying the object.
- on_new_payload(payload: PrimSelectionPayload) bool
Handles a new payload for the widget.
- Parameters
payload (
PrimSelectionPayload
) – The new payload to be handled by the widget.- Returns
True if the prims contained within the payload can be represented by this widget.
- Return type
bool
- DISPLAY_BASE_SHADER_SETTINGS_PATH = '/persistent/app/properties/material/displayBaseShader'
Path to base shader display settings.
- Type
str
- RENDER_CONTEXTS_SETTING_PATH = '/persistent/app/hydra/material/renderContexts'
Path to render contexts settings.
- Type
str