lightspeed.trex.capture.core.shared#

  • 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.core.shared.Setup(context_name: str)#

Bases: object

async async_get_replaced_hashes(
layer_path: str,
replaced_items: List[str],
) Tuple[Set[str], Set[str]]#

Get the number of asset replaced from a capture layer and the current replacement layer

Parameters:
  • layer_path – the capture layer path

  • replaced_items – list of hash from the replacement layer

Returns:

Replaced hash from the current layer path, all hashes from the current layer path

async deferred_get_capture_files(callback)#
async deferred_get_upscaled_game_icon_from_folder(
folder_path: str,
callback,
)#
destroy()#
get_capture_files() List[str]#
get_capture_image(path: str) str | None#
get_captured_hashes(
layer: Layer,
ignore_capture_check: bool = False,
) Tuple[Dict[str, Path], Dict[str, Set[str]]]#
get_directory() str#
static get_game_icon_from_folder(folder_path: str) str | None#
get_game_name(path: str) str#
static get_hashes_from_capture_layer(
layer: Layer,
) Tuple[Dict[str, Path], Dict[str, Set[str]]]#

Faster version that use pre defined prims from a capture layer

Parameters:

layer – The layer to traverse

Returns:

A dictionary of the various hashes found and their respective prims

get_layer()#
static get_upscaled_game_icon_from_folder(
folder_path: str,
) str | None#
import_capture_layer(path: str)#
static is_capture_file(path: str) bool#
static is_layer_a_capture_file(layer: Layer) bool#
static is_path_valid(
path: str,
error_callback: Callable[[str, str], None] | None = None,
) bool#
set_directory(path: str)#