OmniGraph Node omni.graph.ui.ReadViewportPressState

omni.graph.ui.ReadViewportPressState Properties

Name

Value

Version

1

Extension

omni.graph.ui

Has State?

False

Implementation Language

C++

Default Memory Type

cpu

Generated Code Exclusions

None

uiName

Read Viewport Press State (BETA)

__categories

ui

Generated Class Name

OgnReadViewportPressStateDatabase

Python Module

omni.graph.ui

omni.graph.ui.ReadViewportPressState Description

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.

omni.graph.ui.ReadViewportPressState Inputs

Name

Type

Default

Required?

Descripton

inputs:gesture

token

Left Mouse Press

Y

The input gesture to trigger viewport press events

displayGroup

parameters

allowedTokens

Left Mouse Press,Right Mouse Press,Middle Mouse Press

__allowedTokens

{“LeftMouseDrag”: “Left Mouse Press”, “RightMouseDrag”: “Right Mouse Press”, “MiddleMouseDrag”: “Middle Mouse Press”}

uiName

Gesture

__default

“Left Mouse Press”

inputs:useNormalizedCoords

bool

False

Y

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.

uiName

Use Normalized Coords

__default

false

inputs:viewport

token

Viewport

Y

Name of the viewport window to watch for press events

uiName

Viewport

__default

“Viewport”

omni.graph.ui.ReadViewportPressState Outputs

Name

Type

Default

Required?

Descripton

outputs:isPressed

bool

None

Y

True if the specified viewport is currently pressed

uiName

Is Pressed

outputs:isReleasePositionValid

bool

None

Y

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

uiName

Is Release Position Valid

outputs:isValid

bool

None

Y

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

uiName

Is Valid

outputs:pressPosition

double[2]

None

Y

The position at which the specified viewport was last pressed

uiName

Press Position

outputs:releasePosition

double[2]

None

Y

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

uiName

Release Position