OmniGraph Node omni.graph.ui.ReadViewportDragState

omni.graph.ui.ReadViewportDragState 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 Drag State (BETA)

__categories

ui

Generated Class Name

OgnReadViewportDragStateDatabase

Python Module

omni.graph.ui

omni.graph.ui.ReadViewportDragState Description

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

omni.graph.ui.ReadViewportDragState Inputs

Name

Type

Default

Required?

Descripton

inputs:gesture

token

Left Mouse Drag

Y

The input gesture to trigger viewport drag events

displayGroup

parameters

allowedTokens

Left Mouse Drag,Right Mouse Drag,Middle Mouse Drag

__allowedTokens

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

uiName

Gesture

__default

“Left Mouse Drag”

inputs:useNormalizedCoords

bool

False

Y

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.

uiName

Use Normalized Coords

__default

false

inputs:viewport

token

Viewport

Y

Name of the viewport window to watch for drag events

uiName

Viewport

__default

“Viewport”

omni.graph.ui.ReadViewportDragState Outputs

Name

Type

Default

Required?

Descripton

outputs:currentPosition

double[2]

None

Y

The current mouse position if a drag is in progress, or the final mouse position of the most recent drag if a drag is not in progress

uiName

Current Position

outputs:initialPosition

double[2]

None

Y

The mouse position at which the most recent drag began

uiName

Initial Position

outputs:isDragInProgress

bool

None

Y

True if a viewport drag event is currently in progress in the specified viewport

uiName

Is Drag In Progress

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:velocity

double[2]

None

Y

A vector representing the change in position of the mouse since the previous frame if a drag is in progress, otherwise (0,0)

uiName

Velocity