API
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
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.packaging.core.ModPackagingSchema(*args: Any, **kwargs: Any)
Bases:
pydantic.BaseModel
- at_least_one(v)
Check that at least 1 mod file was selected
- context_name: str = Ellipsis
- is_mod_file_valid(v)
Check that the file is a valid mod file
- is_not_empty(v)
Check that the mod name is not empty
- is_valid_version(v)
Check that the mod version has a valid format
- layer_exists(v)
Check that every selected layer file exists
- mod_details: Optional[str] = None
- mod_layer_paths: List[pathlib.Path] = Ellipsis
- mod_name: str = Ellipsis
- mod_version: str = Ellipsis
- output_directory: pathlib.Path = Ellipsis
- redirect_external_dependencies: Optional[bool] = True
- selected_layer_paths: List[pathlib.Path] = Ellipsis
- class lightspeed.trex.packaging.core.PackagingCore
Bases:
object
- __init__()
- cancel()
Cancel the packaging process.
- property current_count: int
Get the current packaged items count
- destroy()
- package(schema: Dict)
Execute the project packaging process using the given schema.
- Parameters
schema – the schema to use for the project packaging. Please see the documentation.
Examples
>>> core = PackagingCore() >>> core.package( >>> { >>> "context_name": "Packaging", >>> "mod_layer_paths": [Path("R:\Remix\projects\MyProject\mod.usda")], >>> "selected_layer_paths": [ >>> Path("R:\Remix\projects\MyProject\mod.usda"), >>> Path("R:\Remix\projects\MyProject\sublayer.usda"), >>> ], >>> "output_directory": Path("R:\Remix\rtx-remix\captures\capture_1.usda"), >>> "mod_name": "Packaged Mod Name", >>> "mod_version": "1.0.0", >>> "mod_details": "Optional Mod Details", >>> } >>>)
- async package_async(schema: Dict)
Asynchronous implementation of package
- async package_async_with_exceptions(schema: Dict)
Asynchronous implementation of package, but async without error handling. This is meant for testing.
- property status: str
Get the current total items count
- subscribe_packaging_completed(function)
Return the object that will automatically unsubscribe when destroyed.
- subscribe_packaging_progress(function)
Return the object that will automatically unsubscribe when destroyed.
- property total_count: int
Get the current total items count