lightspeed.ui_scene.light_manipulator#
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.ui_scene.light_manipulator.AbstractLightManipulator(viewport_layers, **kwargs)#
Bases:
Manipulator
Base class for light manipulators
- build_shape_xform()#
- intensity_scale = 142.85714285714286#
- light_class = None#
- model_class = None#
- on_build()#
Called when the model is changed
- on_model_updated(
- self: omni.ui_scene._scene.Manipulator,
- arg0: omni::ui::scene::AbstractManipulatorModel::AbstractManipulatorItem,
Called by the model when the model value is changed. The class should react to the changes.
### Arguments:
- item :
The item in the model that is changed. If it’s NULL, the root is changed.
- property shape_xform: Transform#
- property viewport_layers: ViewportLayers#
- property xform: Transform#
- class lightspeed.ui_scene.light_manipulator.AbstractLightModel(
- prim: Usd.Prim,
- usd_context_name: str = '',
- viewport_layer: LightManipulatorLayer = None,
Bases:
AbstractManipulatorModel
A model that tracks the attributes of the selected light.
- get_as_floats(item: None) list[float] #
get the item value directly from USD
- get_item(
- self: omni.ui_scene._scene.AbstractManipulatorModel,
- arg0: str,
Returns the items that represents the identifier.
- get_prim_path() str #
- light_class: type[UsdLuxLight] = None#
- linked_axes = [0, 0, 0]#
- redirect(prim_path)#
- set_float_commands(item, value: float | None)#
Shortcut for set_floats_commands that sets an array with the size of one.
- set_float_commands_multiple(
- name,
- item: None,
- value: float,
forward set_floats to all selected manipulator models
- set_float_multiple(name, item: None, value: float)#
forward set_floats to all selected manipulator models
- set_floats(item: None, value: list[float])#
Set the item value directly to USD. This is useful when we want to update the usd but not record it in commands.
- set_floats_commands(
- item: None,
- value: list[float] | None,
set the item value to USD using commands, this is useful because it supports undo/redo
- set_floats_commands_multiple(
- name,
- item: None,
- value: list[float],
forward set_floats to all selected manipulator models
- set_floats_multiple(
- name,
- item: None,
- value: list[float],
forward set_floats to all selected manipulator models
- set_item_value(item: None, value)#
This is used to set the model value instead of the usd. (This is used to record previous value for omni.kit.commands)
- set_manipulator_scale(scale: float)#
- set_path_redirect(path: Path)#
- set_raw_intensity_commands_multiple(
- item: None,
- value: float,
- set_raw_intensity_multiple(
- item: None,
- value: float,
- update_from_prim()#
- class lightspeed.ui_scene.light_manipulator.DiskLightManipulator(viewport_layers, **kwargs)#
Bases:
AbstractLightManipulator
- intensity_scale = 142.85714285714286#
- light_class#
alias of
DiskLight
- property model: DiskLightModel#
Returns the current model.
- model_class#
alias of
DiskLightModel
- class lightspeed.ui_scene.light_manipulator.DiskLightModel(
- prim: Usd.Prim,
- usd_context_name: str = '',
- viewport_layer: LightManipulatorLayer = None,
Bases:
AbstractLightModel
- light_class#
alias of
DiskLight
- linked_axes = [1, 1, 0]#
- update_from_prim()#
- class lightspeed.ui_scene.light_manipulator.DistantLightManipulator(viewport_layers, **kwargs)#
Bases:
AbstractLightManipulator
- intensity_scale = 7.142857142857143#
- light_class#
alias of
DistantLight
- property model: DistantLightModel#
Returns the current model.
- model_class#
alias of
DistantLightModel
- class lightspeed.ui_scene.light_manipulator.DistantLightModel(
- prim: Usd.Prim,
- usd_context_name: str = '',
- viewport_layer: LightManipulatorLayer = None,
Bases:
AbstractLightModel
- light_class#
alias of
DistantLight
- class lightspeed.ui_scene.light_manipulator.LightManipulatorExtension#
Bases:
IExt
- on_shutdown()#
- on_startup(ext_id)#
- class lightspeed.ui_scene.light_manipulator.LightManipulatorLayer(desc: dict)#
Bases:
object
The viewport layer for Light Manipulators.
To add to a viewport: >>> RegisterViewportLayer(LightManipulatorLayer, “omni.kit.viewport.LightManipulatorLayer”)
- property categories#
- destroy()#
- property manipulator_scale#
- property manipulators#
- property name#
- property visible#
- class lightspeed.ui_scene.light_manipulator.RectLightManipulator(viewport_layers, **kwargs)#
Bases:
AbstractLightManipulator
- intensity_scale = 114.28571428571429#
- light_class#
alias of
RectLight
- property model: RectLightModel#
Returns the current model.
- model_class#
alias of
RectLightModel
- class lightspeed.ui_scene.light_manipulator.RectLightModel(
- prim: Usd.Prim,
- usd_context_name: str = '',
- viewport_layer: LightManipulatorLayer = None,
Bases:
AbstractLightModel
- light_class#
alias of
RectLight
- update_from_prim()#
- class lightspeed.ui_scene.light_manipulator.SphereLightManipulator(*args, **kwargs)#
Bases:
IntensityMixinFor3DManipulators
,AbstractLightManipulator
- intensity_scale = 28.571428571428573#
- light_class#
alias of
SphereLight
- property model: SphereLightModel#
Returns the current model.
- model_class#
alias of
SphereLightModel
- class lightspeed.ui_scene.light_manipulator.SphereLightModel(
- prim: Usd.Prim,
- usd_context_name: str = '',
- viewport_layer: LightManipulatorLayer = None,
Bases:
DiskLightModel
- light_class#
alias of
SphereLight
- linked_axes = [1, 1, 1]#
- lightspeed.ui_scene.light_manipulator.get_manipulator_class(light: Prim) type[None] | None #