OmniGraph Node omni.graph.action.OnMouseInput¶
omni.graph.action.OnMouseInput Properties¶
Name |
Value |
---|---|
Version |
1 |
Extension |
omni.graph.action |
Has State? |
False |
Implementation Language |
C++ |
Default Memory Type |
cpu |
Generated Code Exclusions |
None |
uiName |
On Mouse Input |
__categories |
graph:action,input:mouse |
Generated Class Name |
OgnOnMouseInputDatabase |
Python Module |
omni.graph.action |
omni.graph.action.OnMouseInput Description¶
- Event node which fires when a mouse event occurs.
You can choose which mouse element this node reacts to. When mouse element is chosen to be a button, the only meaningful outputs are: outputs:pressed, outputs:released and outputs:isPressed. When scroll or move events are chosen, the only meaningful outputs are: outputs:valueChanged and outputs:value. You can choose to output normalized or pixel coordinates of the mouse. Pixel coordinates are the absolute position of the mouse cursor in pixel unit. The original point is the upper left corner. The minimum value is 0, and the maximum value depends on the size of the window. Normalized coordinates are the relative position of the mouse cursor to the window. The value is always between 0 and 1.
omni.graph.action.OnMouseInput Inputs¶
Name |
Type |
Default |
Required? |
Descripton |
---|---|---|---|---|
inputs:mouseElement |
token |
Left Button |
Y |
The event to trigger the downstream execution |
displayGroup |
parameters |
|||
literalOnly |
1 |
|||
allowedTokens |
Left Button,Middle Button,Right Button,Normalized Move,Pixel Move,Scroll |
|||
outputOnly |
1 |
|||
__allowedTokens |
{“LeftButton”: “Left Button”, “MiddleButton”: “Middle Button”, “RightButton”: “Right Button”, “NormalizedMove”: “Normalized Move”, “PixelMove”: “Pixel Move”, “Scroll”: “Scroll”} |
|||
uiName |
Mouse Element |
|||
__default |
“Left Button” |
|||
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 |
omni.graph.action.OnMouseInput Outputs¶
Name |
Type |
Default |
Required? |
Descripton |
---|---|---|---|---|
outputs:isPressed |
bool |
None |
Y |
True if the mouse button was pressed, False if it was released or mouse element is not related to a button |
outputs:pressed |
execution |
None |
Y |
Executes when mouse button was pressed. Will not execute on move or scroll events |
uiName |
Pressed |
|||
outputs:released |
execution |
None |
Y |
Executes when mouse button was released. Will not execute on move or scroll events |
uiName |
Released |
|||
outputs:value |
float[2] |
None |
Y |
The meaning of this output depends on Event In. Normalized Move: will output the normalized coordinates of mouse, each element of the vector is in the range of [0, 1] Pixel Move: will output the absolute coordinates of mouse, each vector is in the range of [0, pixel width/height of the window] Scroll: will output the change of scroll value Otherwise: will output [0,0] |
uiName |
Delta Value |
|||
outputs:valueChanged |
execution |
None |
Y |
Executes when user moves the cursor or scrolls the cursor. Will not execute on button events |
uiName |
Moved |