lightspeed.trex.utils.widget#

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class lightspeed.trex.utils.widget.WorkspaceWidget#

Interface for workspace window content widgets. All widgets used in WorkspaceWindowBase should implement this interface.

abstract destroy()#

Clean up all resources, subscriptions, and references. Called when the window is being permanently closed.

abstract show(visible: bool)#

Enable/disable the widget and its subscriptions.

Parameters:

visible – True to enable updates and subscriptions, False to pause them.

class lightspeed.trex.utils.widget.WorkspaceWindowBase(
usd_context_name: str | None = None,
show_dock_tab_bars: bool = True,
)#

Base class with common functionalities for all workspace windows.

cleanup()#

Clean up all window resources. Properly destroys the content widget before cleanup.

create_window(
width: int | None = None,
height: int | None = None,
)#

Creates the ui.Window instance and sets up the “Window” menu item.

abstract property flags: int#

The Window flags integer mask. Check omni.ui.WINDOW_FLAGS_*

menu_path() str | None#

The menu path for this window in the Window menu. None means no menu entry.

abstract property title: str#

The Window title, also used as ID in Kit Workspace