lightspeed.trex.material_properties.shared.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.material_properties.shared.widget.SetupUI(context_name: str)#

Bases: object

MATERIAL_LABEL_NAME_SIZE = 32#
MAT_PROP_FRAME = 'material_property_frame'#
destroy()#
get_custom_field_builders() USDBuilderList#
get_materials_from_prims(
prims: list[Prim],
) list[Path]#

Get a list of material paths relevant to a list of input prims without duplicates.

get_mesh_from_instance(
prim: Prim,
) Prim | None#

Get a corresponding mesh prim from an input instance prim.

refresh(items: list[Prim])#

Items should be a list Usd.Prim from which materials can be derived.

set_external_drag_and_drop(window_name='Trex Main Window')#
show(value: bool)#
subscribe_go_to_ingest_tab(func)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_on_material_changed(function)#

Return the object that will automatically unsubscribe when destroyed. Called when we click on a tool (change of the selected tool)