Read Viewport Press State (BETA)

Read the state of the last viewport press 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, you must enable omni.graph.ui_nodes in the Extension Manager.

Inputs

Name

Type

Description

Default

Use Normalized Coords (useNormalizedCoords)

bool

When true, the components of 2D position 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 (viewport)

token

Name of the viewport window to watch for press events

Viewport

Gesture (gesture)

token

The input gesture to trigger viewport press events

Left Mouse Press

Outputs

Name

Type

Description

Default

Press Position (pressPosition)

double[2]

The position at which the specified viewport was last pressed

Release Position (releasePosition)

double[2]

The position at which the last press on the specified viewport was released, or (0,0) if the press was released outside of the viewport or the viewport is currently pressed

Is Release Position Valid (isReleasePositionValid)

bool

True if the press was released inside of the viewport, and false otherwise

Is Pressed (isPressed)

bool

True if the specified viewport is currently pressed

Is Valid (isValid)

bool

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