lightspeed.trex.capture_tree.model

  • 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.capture_tree.model.CaptureTreeDelegate(preview_on_hover: bool = True)

Bases: omni.ui._ui.AbstractItemDelegate

Delegate of the action lister

DEFAULT_BIG_IMAGE_SIZE = (600, 600)
DEFAULT_IMAGE_ICON_SIZE = 24
DEFAULT_NO_IMAGE_SIZE = (400, 100)
build_branch(model, item, column_id, level, expanded)

Create a branch model that opens or closes subtree

build_header(column_id)

Build the header

build_widget(model, item, column_id, level, expanded)

Create a model per item

destroy()
get_path_scroll_frames()
get_window_bigger_image()
class lightspeed.trex.capture_tree.model.CaptureTreeItem(path, image)

Bases: omni.ui._ui.AbstractItem

Item of the model

class lightspeed.trex.capture_tree.model.CaptureTreeModel(context_name, show_progress: bool = True)

Bases: omni.ui._ui.AbstractItemModel

List model of actions

async async_get_captured_hashes(item: lightspeed.trex.capture_tree.model.items.CaptureTreeItem, replaced_items: List[str])
cancel_tasks()
destroy()
enable_listeners(value: bool)
fetch_progress(items: Optional[List[lightspeed.trex.capture_tree.model.items.CaptureTreeItem]] = None)
get_item_children(item)

Returns all the children when the model asks it.

get_item_value_model(item, column_id)

Return value model. It’s the object that tracks the specific value. In our case we use ui.SimpleStringModel.

get_item_value_model_count(_)

The number of columns

refresh(paths: List[Tuple[str, str]])

Refresh the list

subscribe_progress_updated(func)

Return the object that will automatically unsubscribe when destroyed.