omni.ui.scene module¶
omni.ui.scene module documentation¶
omni.ui.scene module reference¶
-
class
omni.ui_scene.scene.
AbstractContainer
¶ Base class for all the items that have children.
-
clear
(self: omni.ui_scene._scene.AbstractContainer) → None¶ Removes the container items from the container.
-
-
class
omni.ui_scene.scene.
AbstractGesture
¶ The base class for the gestures to provides a way to capture mouse events in 3d scene.
-
class
GesturePayload
¶ -
property
item_closest_point
¶
-
property
ray_closest_point
¶
-
property
ray_distance
¶
-
property
-
property
gesture_payload
¶ Shortcut for sender.get_gesturePayload. OMNIUI_SCENE_API const*
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.AbstractGesture) -> omni.ui_scene._scene.AbstractGesture.GesturePayload
Shortcut for sender.get_gesturePayload. OMNIUI_SCENE_API const*
get_gesture_payload(self: omni.ui_scene._scene.AbstractGesture, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.AbstractGesture.GesturePayload
Shortcut for sender.get_gesturePayload. OMNIUI_SCENE_API const*
-
property
manager
¶ The Manager that controld this gesture.
-
property
name
¶ The name of the object. It’s used for debugging.
-
process
(self: omni.ui_scene._scene.AbstractGesture) → None¶ Process the gesture and call callbacks if necessary.
-
property
state
¶ Get the internal state of the gesture.
-
class
-
class
omni.ui_scene.scene.
AbstractItem
¶ -
compute_visibility
(self: omni.ui_scene._scene.AbstractItem) → bool¶ Calculate the effective visibility of this prim, as defined by its most ancestral invisible opinion, if any.
-
property
scene_view
¶ The current SceneView this item is parented to.
-
transform_space
(self: omni.ui_scene._scene.AbstractItem, arg0: omni.ui_scene._scene.Space, arg1: omni.ui_scene._scene.Space, arg2: handle) → object¶ Transform the given point from the coordinate system fromspace to the coordinate system tospace.
-
property
visible
¶ This property holds whether the item is visible.
-
-
class
omni.ui_scene.scene.
AbstractManipulatorItem
¶
-
class
omni.ui_scene.scene.
AbstractManipulatorModel
¶ Bridge to data. Operates with double and int arrays. No strings. No tree, it’s a flat list of items. Manipulator requires the model has specific items.
-
add_item_changed_fn
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: Callable[[omni.ui_scene._scene.AbstractManipulatorModel, omni.ui_scene._scene.AbstractManipulatorItem], None]) → int¶ Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.
-
get_as_bool
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle) → bool¶ Shortcut for get_as_ints that returns the first item of the list.
-
get_as_float
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle) → float¶ Shortcut for get_as_floats that returns the first item of the list.
-
get_as_floats
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle) → List[float]¶ Returns the Float values of the item.
-
get_as_int
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle) → int¶ Shortcut for get_as_ints that returns the first item of the list.
-
get_as_ints
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle) → List[int]¶ Returns the int values of the item.
-
get_item
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: str) → omni.ui_scene._scene.AbstractManipulatorItem¶ Returns the items that represents the identifier.
-
remove_item_changed_fn
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: int) → None¶ Remove the callback by its id.
### Arguments:
- id :
The id that addValueChangedFn returns.
-
set_bool
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle, arg1: bool) → None¶ Shortcut for set_ints that sets an array with the size of one.
-
set_float
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle, arg1: float) → None¶ Shortcut for set_floats that sets an array with the size of one.
-
set_floats
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle, arg1: List[float]) → None¶ Sets the Float values of the item.
-
set_int
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle, arg1: int) → None¶ Shortcut for set_ints that sets an array with the size of one.
-
set_ints
(self: omni.ui_scene._scene.AbstractManipulatorModel, arg0: handle, arg1: List[int]) → None¶ Sets the int values of the item.
-
subscribe_item_changed_fn
(self: AbstractManipulatorModel, arg0: Callable[[omni.ui_scene._scene.AbstractManipulatorModel, omni.ui_scene._scene.AbstractManipulatorItem], None]) → carb._carb.Subscription¶ Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.
-
-
class
omni.ui_scene.scene.
AbstractShape
¶ Base class for all the items that can be drawn and intersected with mouse pointer.
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
property
gestures
¶ All the gestures assigned to this shape.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.AbstractShape) -> omni.ui_scene._scene.AbstractGesture.GesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.AbstractShape, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.AbstractGesture.GesturePayload
Contains all the information about the intersection at the specific state.
-
property
-
class
omni.ui_scene.scene.
Arc
¶ -
property
axis
¶ The axis the circle plane is perpendicular to.
-
property
begin
¶ The start angle of the arc. Angle placement and directions are (0 to 90): Y to Z, Z to X, X to Y
-
property
color
¶ The color of the line.
-
property
culling
¶ Draw two radii of the circle.
-
property
end
¶ The end angle of the arc. Angle placement and directions are (0 to 90): Y to Z, Z to X, X to Y
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.Arc) -> omni.ui_scene._scene.ArcGesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.Arc, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.ArcGesturePayload
Contains all the information about the intersection at the specific state.
-
property
intersection_thickness
¶ The thickness of the line for the intersection.
-
property
radius
¶
-
property
sector
¶ Draw two radii of the circle.
-
property
tesselation
¶ Number of points on the curve.
-
property
thickness
¶ The thickness of the line.
-
property
wireframe
¶ When true, it’s a line. When false it’s a mesh.
-
property
-
class
omni.ui_scene.scene.
ArcGesturePayload
¶ -
property
angle
¶
-
property
culled
¶
-
property
distance_to_center
¶
-
property
moved
¶
-
property
moved_angle
¶
-
property
moved_distance_to_center
¶
-
property
-
class
omni.ui_scene.scene.
AspectRatioPolicy
¶ Members:
STRETCH
PRESERVE_ASPECT_FIT
PRESERVE_ASPECT_CROP
PRESERVE_ASPECT_VERTICAL
PRESERVE_ASPECT_HORIZONTAL
-
PRESERVE_ASPECT_CROP
= AspectRatioPolicy.PRESERVE_ASPECT_CROP¶
-
PRESERVE_ASPECT_FIT
= AspectRatioPolicy.PRESERVE_ASPECT_FIT¶
-
PRESERVE_ASPECT_HORIZONTAL
= AspectRatioPolicy.PRESERVE_ASPECT_HORIZONTAL¶
-
PRESERVE_ASPECT_VERTICAL
= AspectRatioPolicy.PRESERVE_ASPECT_VERTICAL¶
-
STRETCH
= AspectRatioPolicy.STRETCH¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
class
omni.ui_scene.scene.
CameraModel
¶ A model that holds projection and view matrices
-
property
projection
¶ The camera projection matrix.
-
property
view
¶ The camera projection matrix.
-
property
-
class
omni.ui_scene.scene.
ClickGesture
¶ The gesture that provides a way to capture click mouse event.
-
call_on_ended_fn
(self: omni.ui_scene._scene.ClickGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the user releases the button.
-
has_on_ended_fn
(self: omni.ui_scene._scene.ClickGesture) → bool¶ Called when the user releases the button.
-
property
modifiers
¶ The modifier that should be pressed to trigger this gesture.
The mouse button this gesture is watching.
-
set_on_ended_fn
(self: omni.ui_scene._scene.ClickGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the user releases the button.
-
-
class
omni.ui_scene.scene.
Color4
¶
-
omni.ui_scene.scene.
Cross
(arg0: handle, arg1: handle) → object¶
-
class
omni.ui_scene.scene.
Culling
¶ Members:
NONE
BACK
FRONT
-
BACK
= Culling.BACK¶
-
FRONT
= Culling.FRONT¶
-
NONE
= Culling.NONE¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
class
omni.ui_scene.scene.
Curve
¶ Represents the curve.
-
class
CurveType
¶ Members:
LINEAR
CUBIC
-
CUBIC
= CurveType.CUBIC¶
-
LINEAR
= CurveType.LINEAR¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
property
colors
¶ The list of colors which defines color per vertex. It has the same length as positions.
-
property
curve_type
¶ The curve interpolation type.
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.Curve) -> omni.ui_scene._scene.CurveGesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.Curve, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.CurveGesturePayload
Contains all the information about the intersection at the specific state.
-
property
intersection_thicknesses
¶ The thickness of the line for the intersection.
-
property
positions
¶ The list of positions which defines the curve. It has at least two positions. The curve has len(positions)-1
-
property
tesselation
¶ The number of points per curve segment. It can’t be less than 2.
-
property
tessellation
¶ The number of points per curve segment. It can’t be less than 2.
-
property
thicknesses
¶ The list of thicknesses which defines thickness per vertex. It has the same length as positions.
-
class
-
class
omni.ui_scene.scene.
CurveGesturePayload
¶ -
property
curve_distance
¶
-
property
moved
¶
-
property
moved_distance
¶
-
property
-
omni.ui_scene.scene.
Dot
(arg0: handle, arg1: handle) → float¶
-
class
omni.ui_scene.scene.
DoubleClickGesture
¶ The gesture that provides a way to capture double clicks.
-
call_on_ended_fn
(self: omni.ui_scene._scene.DoubleClickGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the user releases the button.
-
has_on_ended_fn
(self: omni.ui_scene._scene.DoubleClickGesture) → bool¶ Called when the user releases the button.
-
set_on_ended_fn
(self: omni.ui_scene._scene.ClickGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the user releases the button.
-
-
class
omni.ui_scene.scene.
DragGesture
¶ The gesture that provides a way to capture click-and-drag mouse event.
-
call_on_began_fn
(self: omni.ui_scene._scene.DragGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the user starts drag.
-
call_on_changed_fn
(self: omni.ui_scene._scene.DragGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the user is dragging.
-
call_on_ended_fn
(self: omni.ui_scene._scene.DragGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the user releases the mouse and finishes the drag.
-
property
check_mouse_moved
¶ Check when the mouse is moved to call on_changed. Useful to filter events when the camera is moving.
-
has_on_began_fn
(self: omni.ui_scene._scene.DragGesture) → bool¶ Called when the user starts drag.
-
has_on_changed_fn
(self: omni.ui_scene._scene.DragGesture) → bool¶ Called when the user is dragging.
-
has_on_ended_fn
(self: omni.ui_scene._scene.DragGesture) → bool¶ Called when the user releases the mouse and finishes the drag.
-
property
modifiers
¶ The keyboard modifier that should be active ti start the gesture.
Mouse button that should be active to start the gesture.
-
set_on_began_fn
(self: omni.ui_scene._scene.DragGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the user starts drag.
-
set_on_changed_fn
(self: omni.ui_scene._scene.DragGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the user is dragging.
-
set_on_ended_fn
(self: omni.ui_scene._scene.DragGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the user releases the mouse and finishes the drag.
-
-
class
omni.ui_scene.scene.
GestureManager
¶ The object that controls batch processing and preventing of gestures. Typically each scene has a default manager and if the user wants to have own prevention logic, he can reimplement it.
-
amend_input
(self: omni.ui_scene._scene.GestureManager, arg0: omni::ui::scene::MouseInput) → omni::ui::scene::MouseInput¶ Called once a frame. Should be overriden to inject own input to the gestures.
-
can_be_prevented
(self: omni.ui_scene._scene.GestureManager, arg0: omni.ui_scene._scene.AbstractGesture) → bool¶ Called per gesture. Determines if the gesture can be prevented.
-
should_prevent
(self: omni.ui_scene._scene.GestureManager, arg0: omni.ui_scene._scene.AbstractGesture, arg1: omni.ui_scene._scene.AbstractGesture) → bool¶ Called per gesture. Determines if the gesture should be prevented with another gesture. Useful to resolve intersections.
-
-
class
omni.ui_scene.scene.
GestureState
¶ Members:
NONE
POSSIBLE
BEGAN
CHANGED
ENDED
CANCELED
PREVENTED
-
BEGAN
= GestureState.BEGAN¶
-
CANCELED
= GestureState.CANCELED¶
-
CHANGED
= GestureState.CHANGED¶
-
ENDED
= GestureState.ENDED¶
-
NONE
= GestureState.NONE¶
-
POSSIBLE
= GestureState.POSSIBLE¶
-
PREVENTED
= GestureState.PREVENTED¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
class
omni.ui_scene.scene.
HoverGesture
¶ The gesture that provides a way to capture event when mouse enters/leaves the item.
-
call_on_began_fn
(self: omni.ui_scene._scene.HoverGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the mouse enters the item.
-
call_on_changed_fn
(self: omni.ui_scene._scene.HoverGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the mouse is hovering the item.
-
call_on_ended_fn
(self: omni.ui_scene._scene.HoverGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the mouse leaves the item.
-
has_on_began_fn
(self: omni.ui_scene._scene.HoverGesture) → bool¶ Called when the mouse enters the item.
-
has_on_changed_fn
(self: omni.ui_scene._scene.HoverGesture) → bool¶ Called when the mouse is hovering the item.
-
has_on_ended_fn
(self: omni.ui_scene._scene.HoverGesture) → bool¶ Called when the mouse leaves the item.
-
property
modifiers
¶ The modifier that should be pressed to trigger this gesture.
The mouse button this gesture is watching.
-
set_on_began_fn
(self: omni.ui_scene._scene.HoverGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the mouse enters the item.
-
set_on_changed_fn
(self: omni.ui_scene._scene.HoverGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the mouse is hovering the item.
-
set_on_ended_fn
(self: omni.ui_scene._scene.HoverGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the mouse leaves the item.
-
-
class
omni.ui_scene.scene.
Image
¶ -
class
FillPolicy
¶ Members:
STRETCH
PRESERVE_ASPECT_FIT
PRESERVE_ASPECT_CROP
-
PRESERVE_ASPECT_CROP
= FillPolicy.PRESERVE_ASPECT_CROP¶
-
PRESERVE_ASPECT_FIT
= FillPolicy.PRESERVE_ASPECT_FIT¶
-
STRETCH
= FillPolicy.STRETCH¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
property
fill_policy
¶ Define what happens when the source image has a different size than the item.
-
property
image_provider
¶ This property holds the image provider. It can be an omni: file:
-
property
source_url
¶ This property holds the image URL. It can be an omni: file:
-
class
-
class
omni.ui_scene.scene.
Label
¶ Defines a standard label for user interface items
-
property
alignment
¶ This property holds the alignment of the label’s contents By default, the contents of the label are left-aligned and vertically-centered.
-
property
color
¶ The color of the text.
-
property
size
¶ The font size.
-
property
text
¶ This property holds the label’s text.
-
property
-
class
omni.ui_scene.scene.
Line
¶ -
property
color
¶ The line color.
-
property
end
¶ The end point of the line.
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.Line) -> omni.ui_scene._scene.LineGesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.Line, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.LineGesturePayload
Contains all the information about the intersection at the specific state.
-
property
intersection_thickness
¶ The thickness of the line for the intersection.
-
property
start
¶ The start point of the line.
-
property
thickness
¶ The line thickness.
-
property
-
class
omni.ui_scene.scene.
LineGesturePayload
¶ -
property
line_closest_point
¶
-
property
line_distance
¶
-
property
moved
¶
-
property
-
class
omni.ui_scene.scene.
Manipulator
¶ The base object for the custom manipulators.
-
call_on_build_fn
(self: omni.ui_scene._scene.Manipulator, arg0: omni.ui_scene._scene.Manipulator) → None¶ Called when Manipulator is dirty to build the content. It’s another way to build the manipulator’s content on the case the user doesn’t want to reimplement the class.
-
property
gestures
¶ All the gestures assigned to this manipulator.
-
has_on_build_fn
(self: omni.ui_scene._scene.Manipulator) → bool¶ Called when Manipulator is dirty to build the content. It’s another way to build the manipulator’s content on the case the user doesn’t want to reimplement the class.
-
invalidate
(self: omni.ui_scene._scene.Manipulator) → None¶ Make Manipulator dirty so onBuild will be executed in _preDrawContent.
-
property
model
¶ Returns the current model.
-
on_build
(self: omni.ui_scene._scene.Manipulator) → None¶ Called when Manipulator is dirty to build the content. It’s another way to build the manipulator’s content on the case the user doesn’t want to reimplement the class.
-
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.
-
set_on_build_fn
(self: omni.ui_scene._scene.Manipulator, fn: Callable[[omni.ui_scene._scene.Manipulator], None]) → None¶ Called when Manipulator is dirty to build the content. It’s another way to build the manipulator’s content on the case the user doesn’t want to reimplement the class.
-
-
class
omni.ui_scene.scene.
ManipulatorGesture
¶ The base class for the gestures to provides a way to capture events of the manipulator objects.
-
property
sender
¶ Returns the relevant shape driving the gesture.
-
property
-
class
omni.ui_scene.scene.
Matrix44
¶ Stores a 4x4 matrix of float elements. A basic type. Matrices are defined to be in row-major order. The matrix mode is required to define the matrix that resets the transformation to fit the geometry into NDC, Screen space, or rotate it to the camera direction.
-
get_inverse
(self: omni.ui_scene._scene.Matrix44) → omni.ui_scene._scene.Matrix44¶
-
static
get_rotation_matrix
(x: float, y: float, z: float, degrees: bool = False) → omni.ui_scene._scene.Matrix44¶ Creates a matrix to specify a rotation around each axis.
### Arguments:
- degrees :
true if the angles are specified in degrees
-
static
get_scale_matrix
(x: float, y: float, z: float) → omni.ui_scene._scene.Matrix44¶ Creates a matrix to specify a scaling with the given scale factor per axis.
-
static
get_translation_matrix
(x: float, y: float, z: float) → omni.ui_scene._scene.Matrix44¶ Creates a matrix to specify a translation at the given coordinates.
-
property
inversed
¶
-
-
class
omni.ui_scene.scene.
MouseInput
¶ -
property
clicked
¶
-
property
double_clicked
¶
-
property
down
¶
-
property
modifiers
¶
-
property
mouse
¶
-
property
mouse_direction
¶
-
property
mouse_origin
¶
-
property
mouse_wheel
¶
-
property
released
¶
-
property
-
class
omni.ui_scene.scene.
Points
¶ Represents the point cloud.
-
property
colors
¶ List of colors of the points.
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.Points) -> omni.ui_scene._scene.PointsGesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.Points, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.PointsGesturePayload
Contains all the information about the intersection at the specific state.
-
property
intersection_sizes
¶ The size of the points for the intersection.
-
property
positions
¶ List with positions of the points.
-
property
sizes
¶ List of point sizes.
-
property
-
class
omni.ui_scene.scene.
PointsGesturePayload
¶ -
property
closest_point
¶
-
property
distance_to_point
¶
-
property
moved
¶
-
property
-
class
omni.ui_scene.scene.
PolygonMesh
¶ Encodes a mesh.
-
property
colors
¶ Describes colors per vertex.
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.PolygonMesh) -> omni.ui_scene._scene.PolygonMeshGesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.PolygonMesh, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.PolygonMeshGesturePayload
Contains all the information about the intersection at the specific state.
-
property
intersection_thicknesses
¶ The thickness of the line for the intersection.
-
property
positions
¶ The primary geometry attribute, describes points in local space.
-
property
thicknesses
¶ When wireframe is true, it defines the thicknesses of lines.
-
property
vertex_counts
¶ Provides the number of vertices in each face of the mesh, which is also the number of consecutive indices in vertex_indices that define the face. The length of this attribute is the number of faces in the mesh.
-
property
vertex_indices
¶ Flat list of the index (into the points attribute) of each vertex of each face in the mesh.
-
property
wireframe
¶ When true, the mesh is drawn as lines.
-
property
-
class
omni.ui_scene.scene.
Rectangle
¶ -
property
axis
¶ The axis the rectangle is perpendicular to.
-
property
color
¶ The color of the line.
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.Rectangle) -> omni.ui_scene._scene.RectangleGesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.Rectangle, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.RectangleGesturePayload
Contains all the information about the intersection at the specific state.
-
property
height
¶ The size of the rectangle.
-
property
intersection_thickness
¶ The thickness of the line for the intersection.
-
property
thickness
¶ The thickness of the line.
-
property
width
¶ The size of the rectangle.
-
property
wireframe
¶ When true, it’s a line. When false it’s a mesh.
-
property
-
class
omni.ui_scene.scene.
RectangleGesturePayload
¶ -
property
moved
¶
-
property
moved_s
¶
-
property
moved_t
¶
-
property
s
¶
-
property
t
¶
-
property
-
class
omni.ui_scene.scene.
Scene
¶ Represents the root of the scene and holds the shapes, gestures and managers.
-
class
omni.ui_scene.scene.
SceneView
¶ The widget to render omni.ui.scene.
-
property
aspect_ratio_policy
¶ Define what happens when the aspect ratio of the camera is different from the aspect ratio of the widget.
-
property
child_windows_input
¶ When it’s false, the mouse events from other widgets inside the bounds are ignored. We need it to filter out mouse events from mouse events of widgets in ui.VStack(content_clipping=1).
-
get_ray_from_ndc
(self: omni.ui_scene._scene.SceneView, ndc: omni.ui_scene._scene.Vector2) → Tuple[omni.ui_scene._scene.Vector3, omni.ui_scene._scene.Vector3]¶ Convert NDC 2D [-1..1] coordinates to 3D ray.
-
property
model
¶ Returns the current model.
-
property
projection
¶ The camera projection matrix. It’s a shortcut for Matrix44(SceneView.model.get_as_floats(“projection”))
-
property
scene
¶ The container that holds the shapes, gestures and managers.
-
property
screen_aspect_ratio
¶ Aspect ratio of the rendering screen. This screen will be fit to the widget. SceneView simulates the behavior of the Kit viewport where the rendered image (screen) fits into the viewport (widget), and the camera has multiple policies that modify the camera projection matrix’s aspect ratio to match it to the screen aspect ratio. When screen_aspect_ratio is 0, Screen size matches the Widget bounds.
-
property
view
¶ The camera view matrix. It’s a shortcut for Matrix44(SceneView.model.get_as_floats(“view”))
-
property
-
class
omni.ui_scene.scene.
Screen
¶ The empty shape that triggers all the gestures at any place. Is used to track gestures when the user clicked the empty space. For example for cameras.
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.Screen) -> omni.ui_scene._scene.ScreenGesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.Screen, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.ScreenGesturePayload
Contains all the information about the intersection at the specific state.
-
property
-
class
omni.ui_scene.scene.
ScreenGesturePayload
¶ -
property
direction
¶
-
property
mouse
¶
-
property
mouse_moved
¶
-
property
moved
¶
-
property
-
class
omni.ui_scene.scene.
ScrollGesture
¶ The gesture that provides a way to capture mouse scroll event.
-
call_on_ended_fn
(self: omni.ui_scene._scene.ScrollGesture, arg0: omni::ui::scene::AbstractShape) → None¶ Called when the user scrolls.
-
has_on_ended_fn
(self: omni.ui_scene._scene.ScrollGesture) → bool¶ Called when the user scrolls.
-
property
modifiers
¶ The modifier that should be pressed to trigger this gesture.
The mouse button this gesture is watching.
-
property
scroll
¶ Returns the current scroll state.
-
set_on_ended_fn
(self: omni.ui_scene._scene.ScrollGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) → None¶ Called when the user scrolls.
-
-
class
omni.ui_scene.scene.
ShapeGesture
¶ The base class for the gestures to provides a way to capture mouse events in 3d scene.
-
property
sender
¶
-
property
-
class
omni.ui_scene.scene.
Space
¶ Members:
CURRENT
WORLD
OBJECT
NDC
SCREEN
-
CURRENT
= Space.CURRENT¶
-
NDC
= Space.NDC¶
-
OBJECT
= Space.OBJECT¶
-
SCREEN
= Space.SCREEN¶
-
WORLD
= Space.WORLD¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
class
omni.ui_scene.scene.
TexturedMesh
¶ Encodes a polygonal mesh with free-form textures.
-
property
gesture_payload
¶ Contains all the information about the intersection.
-
get_gesture_payload
(*args, **kwargs)¶ Overloaded function.
get_gesture_payload(self: omni.ui_scene._scene.TexturedMesh) -> omni.ui_scene._scene.TexturedMeshGesturePayload
Contains all the information about the intersection.
get_gesture_payload(self: omni.ui_scene._scene.TexturedMesh, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.TexturedMeshGesturePayload
Contains all the information about the intersection at the specific state.
-
property
image_height
¶ This property holds the image height
-
property
image_provider
¶ This property holds the image provider. It can be an omni: file:
-
property
image_width
¶ This property holds the image width
-
property
source_url
¶ This property holds the image URL. It can be an omni: file:
-
property
uvs
¶ This property holds the texture coordinates of the mesh.
-
property
-
class
omni.ui_scene.scene.
Transform
¶ Transforms children with component affine transformations.
-
class
LookAt
¶ Members:
NONE
CAMERA
-
CAMERA
= LookAt.CAMERA¶
-
NONE
= LookAt.NONE¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
property
look_at
¶ Rotates this transform to align the direction with the camera.
-
property
scale_to
¶ Which space the current transform will be rescaled before applying the matrix. It’s useful to make the object the same size regardless the distance to the camera.
-
property
transform
¶ Single transformation matrix.
-
class
-
class
omni.ui_scene.scene.
Vector2
¶
-
class
omni.ui_scene.scene.
Vector3
¶
-
class
omni.ui_scene.scene.
Widget
¶ The shape that contains the omni.ui widgets. It automatically creates IAppWindow and transfers its content to the texture of the rectangle. It interacts with the mouse and sends the mouse events to the underlying window, so interacting with the UI on this rectangle is smooth for the user.
-
class
FillPolicy
¶ Members:
STRETCH
PRESERVE_ASPECT_FIT
PRESERVE_ASPECT_CROP
-
PRESERVE_ASPECT_CROP
= FillPolicy.PRESERVE_ASPECT_CROP¶
-
PRESERVE_ASPECT_FIT
= FillPolicy.PRESERVE_ASPECT_FIT¶
-
STRETCH
= FillPolicy.STRETCH¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
class
UpdatePolicy
¶ Members:
ON_DEMAND
ALWAYS
ON_MOUSE_HOVERED
-
ALWAYS
= UpdatePolicy.ALWAYS¶
-
ON_DEMAND
= UpdatePolicy.ON_DEMAND¶
-
ON_MOUSE_HOVERED
= UpdatePolicy.ON_MOUSE_HOVERED¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
property
fill_policy
¶ Define what happens when the source image has a different size than the item.
-
property
frame
¶ Return the main frame of the widget.
-
invalidate
(self: omni.ui_scene._scene.Widget) → None¶ Rebuild and recapture the widgets at the next frame. If frame build_fn
-
property
update_policy
¶ Define when to redraw the widget.
-
class