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 enable omni.graph.ui_nodes in the Extension Manager.
Inputs#
Name |
Type |
Descripton |
Default |
---|---|---|---|
Gesture (inputs:gesture) |
|
The input gesture to trigger viewport press events |
Left Mouse Press |
Metadata |
displayGroup = parameters |
||
Metadata |
allowedTokens = Left Mouse Press,Right Mouse Press,Middle Mouse Press |
||
Use Normalized Coords (inputs:useNormalizedCoords) |
|
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 (inputs:viewport) |
|
Name of the viewport window to watch for press events |
Viewport |
Outputs#
Name |
Type |
Descripton |
Default |
---|---|---|---|
Is Pressed (outputs:isPressed) |
|
True if the specified viewport is currently pressed |
None |
Is Release Position Valid (outputs:isReleasePositionValid) |
|
True if the press was released inside of the viewport, and false otherwise |
None |
Is Valid (outputs:isValid) |
|
True if a valid event state was detected and the outputs of this node are valid, and false otherwise |
None |
Press Position (outputs:pressPosition) |
|
The position at which the specified viewport was last pressed |
None |
Release Position (outputs:releasePosition) |
|
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 |
None |
Metadata#
Name |
Value |
---|---|
Unique ID |
omni.graph.ui_nodes.ReadViewportPressState |
Version |
1 |
Extension |
omni.graph.ui_nodes |
Has State? |
False |
Implementation Language |
C++ |
Default Memory Type |
cpu |
Generated Code Exclusions |
tests |
uiName |
Read Viewport Press State (BETA) |
Categories |
ui |
Generated Class Name |
OgnReadViewportPressStateDatabase |
Python Module |
omni.graph.ui_nodes |