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

  • 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.ui_scene.light_manipulator.AbstractLightManipulator(viewport_layers, **kwargs)

Bases: omni.ui_scene._scene.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) None

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: omni.ui_scene._scene.Transform
property viewport_layers: ViewportLayers
property xform: omni.ui_scene._scene.Transform
class lightspeed.ui_scene.light_manipulator.AbstractLightModel(prim: Usd.Prim, usd_context_name: str = '', viewport_layer: LightManipulatorLayer = None)

Bases: omni.ui_scene._scene.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) omni.ui_scene._scene.AbstractManipulatorItem

Returns the items that represents the identifier.

get_prim_path() str
light_class: type[UsdLuxLight] = None
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: pxr.Sdf.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: lightspeed.ui_scene.light_manipulator.light_manipulator.AbstractLightManipulator

intensity_scale = 142.85714285714286
light_class

alias of pxr.UsdLux.DiskLight

property model: lightspeed.ui_scene.light_manipulator.light_model.DiskLightModel

Returns the current model.

model_class

alias of lightspeed.ui_scene.light_manipulator.light_model.DiskLightModel

class lightspeed.ui_scene.light_manipulator.DiskLightModel(prim: Usd.Prim, usd_context_name: str = '', viewport_layer: LightManipulatorLayer = None)

Bases: lightspeed.ui_scene.light_manipulator.light_model.AbstractLightModel

light_class

alias of pxr.UsdLux.DiskLight

update_from_prim()
class lightspeed.ui_scene.light_manipulator.DistantLightManipulator(viewport_layers, **kwargs)

Bases: lightspeed.ui_scene.light_manipulator.light_manipulator.AbstractLightManipulator

intensity_scale = 7.142857142857143
light_class

alias of pxr.UsdLux.DistantLight

property model: lightspeed.ui_scene.light_manipulator.light_model.DistantLightModel

Returns the current model.

model_class

alias of lightspeed.ui_scene.light_manipulator.light_model.DistantLightModel

class lightspeed.ui_scene.light_manipulator.DistantLightModel(prim: Usd.Prim, usd_context_name: str = '', viewport_layer: LightManipulatorLayer = None)

Bases: lightspeed.ui_scene.light_manipulator.light_model.AbstractLightModel

light_class

alias of pxr.UsdLux.DistantLight

class lightspeed.ui_scene.light_manipulator.LightManipulatorExtension

Bases: omni.ext._extensions.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: lightspeed.ui_scene.light_manipulator.light_manipulator.AbstractLightManipulator

intensity_scale = 114.28571428571429
light_class

alias of pxr.UsdLux.RectLight

property model: lightspeed.ui_scene.light_manipulator.light_model.RectLightModel

Returns the current model.

model_class

alias of lightspeed.ui_scene.light_manipulator.light_model.RectLightModel

class lightspeed.ui_scene.light_manipulator.RectLightModel(prim: Usd.Prim, usd_context_name: str = '', viewport_layer: LightManipulatorLayer = None)

Bases: lightspeed.ui_scene.light_manipulator.light_model.AbstractLightModel

light_class

alias of pxr.UsdLux.RectLight

update_from_prim()
class lightspeed.ui_scene.light_manipulator.SphereLightManipulator(*args, **kwargs)

Bases: lightspeed.ui_scene.light_manipulator.light_manipulator.AbstractLightManipulator

build_intensity_xform()
intensity_scale = 28.571428571428573
light_class

alias of pxr.UsdLux.SphereLight

property model: lightspeed.ui_scene.light_manipulator.light_model.SphereLightModel

Returns the current model.

model_class

alias of lightspeed.ui_scene.light_manipulator.light_model.SphereLightModel

class lightspeed.ui_scene.light_manipulator.SphereLightModel(prim: Usd.Prim, usd_context_name: str = '', viewport_layer: LightManipulatorLayer = None)

Bases: lightspeed.ui_scene.light_manipulator.light_model.DiskLightModel

light_class

alias of pxr.UsdLux.SphereLight

lightspeed.ui_scene.light_manipulator.get_manipulator_class(light: pxr.Usd.Prim) type[None] | None