lightspeed.trex.asset_replacements.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.asset_replacements.core.shared.AssetReplacementsCoreSharedExtension#

Register asset replacement core commands.

on_shutdown()#

Unregister asset replacement core commands on extension shutdown.

on_startup(_ext_id)#

Register asset replacement core commands on extension startup.

class lightspeed.trex.asset_replacements.core.shared.CachedReplacementSkeletons#

Container to cache replacement skeletons for performance

exception lightspeed.trex.asset_replacements.core.shared.SkeletonAutoRemappingError#

Skeleton replacement does not have the proper attributes to be remapped as is.

exception lightspeed.trex.asset_replacements.core.shared.SkeletonDefinitionError#

Missing part of SkelRoot, Skeleton or Binding

lightspeed.trex.asset_replacements.core.shared.repair_skinned_replacement_scale(
bound_prim: Prim,
target_layer: Layer | None = None,
) → int#

Normalize large replacement skel scales for one bound replacement mesh.

Runtime remapping evaluates these meshes against the captured skeleton. Toolkit USD skinning still applies the replacement asset’s authored bind-space unit scale, so remapped meshes and their source skeletons can appear huge. The repair is scoped to a selected replacement binding and authored to the current non-session edit target.