Read Viewport Hover State (BETA)#

Read the state of the last viewport hover event from the specified viewport. Note that viewport mouse events must be enabled on the specified viewport using a SetViewportMode node.

Installation#

To use this node enable omni.graph.ui_nodes in the Extension Manager.

Inputs#

Name

Type

Descripton

Default

Use Normalized Coords (inputs:useNormalizedCoords)

bool

When true, the components of 2D position and velocity outputs are scaled to between 0 and 1, where 0 is top/left and 1 is bottom/right. When false, components are in viewport render resolution pixels.

False

Viewport (inputs:viewport)

token

Name of the viewport window to watch for hover events

Viewport

Outputs#

Name

Type

Descripton

Default

Is Hovered (outputs:isHovered)

bool

True if the specified viewport is currently hovered

None

Is Valid (outputs:isValid)

bool

True if a valid event state was detected and the outputs of this node are valid, and false otherwise

None

Position (outputs:position)

double[2]

The current mouse position if the specified viewport is currently hovered, otherwise (0,0)

None

Velocity (outputs:velocity)

double[2]

A vector representing the change in position of the mouse since the previous frame if the specified viewport is currently hovered, otherwise (0,0)

None

Metadata#

Name

Value

Unique ID

omni.graph.ui_nodes.ReadViewportHoverState

Version

1

Extension

omni.graph.ui_nodes

Has State?

False

Implementation Language

C++

Default Memory Type

cpu

Generated Code Exclusions

tests

uiName

Read Viewport Hover State (BETA)

Categories

ui

Generated Class Name

OgnReadViewportHoverStateDatabase

Python Module

omni.graph.ui_nodes