OmniGraph Node omni.graph.ui.OnViewportDragged

omni.graph.ui.OnViewportDragged Properties

Name

Value

Version

1

Extension

omni.graph.ui

Has State?

False

Implementation Language

C++

Default Memory Type

cpu

Generated Code Exclusions

None

uiName

On Viewport Dragged (BETA)

__categories

graph:action,ui

Generated Class Name

OgnOnViewportDraggedDatabase

Python Module

omni.graph.ui

omni.graph.ui.OnViewportDragged Description

Event node which fires when a viewport drag event occurs in the specified viewport. Note that viewport mouse events must be enabled on the specified viewport using a SetViewportMode node.

omni.graph.ui.OnViewportDragged Inputs

Name

Type

Default

Required?

Descripton

inputs:gesture

token

Left Mouse Drag

Y

The input gesture to trigger viewport drag events

displayGroup

parameters

literalOnly

1

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

bool

True

Y

When true, the node is only computed while Stage is being played

literalOnly

1

uiName

Only Simulate On Play

__default

true

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.

literalOnly

1

uiName

Use Normalized Coords

__default

false

inputs:viewport

token

Viewport

Y

Name of the viewport window to watch for drag events

literalOnly

1

uiName

Viewport

__default

“Viewport”

omni.graph.ui.OnViewportDragged Outputs

Name

Type

Default

Required?

Descripton

outputs:began

execution

None

Y

Enabled when the drag begins, populating ‘Initial Position’ with the current mouse position

uiName

Began

outputs:ended

execution

None

Y

Enabled when the drag ends, populating ‘Final Position’ with the current mouse position

uiName

Ended

outputs:finalPosition

double[2]

None

Y

The mouse position at which the drag ended (valid when ‘Ended’ is enabled)

uiName

Final Position

outputs:initialPosition

double[2]

None

Y

The mouse position at which the drag began (valid when either ‘Began’ or ‘Ended’ is enabled)

uiName

Initial Position