.. _omni_graph_action_OnMouseInput_1:

.. _omni_graph_action_OnMouseInput:

.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================

:orphan:

.. meta::
    :title: On Mouse Input
    :keywords: lang-en omnigraph node graph:action,input:mouse threadsafe compute-on-request action on-mouse-input


On Mouse Input
==============

.. <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.

.. </description>


Installation
------------

To use this node enable :ref:`omni.graph.action<ext_omni_graph_action>` in the Extension Manager.


Inputs
------
.. csv-table::
    :header: "Name", "Type", "Descripton", "Default"
    :widths: 20, 20, 50, 10

    "Mouse Element (*inputs:mouseElement*)", "``token``", "The event to trigger the downstream execution ", "Left Button"
    "", "*displayGroup*", "parameters", ""
    "", "*literalOnly*", "1", ""
    "", "*allowedTokens*", "Left Button,Middle Button,Right Button,Normalized Move,Pixel Move,Scroll", ""
    "Only Simulate On Play (*inputs:onlyPlayback*)", "``bool``", "When true, the node is only computed while Stage is being played.", "True"
    "", "*literalOnly*", "1", ""


Outputs
-------
.. csv-table::
    :header: "Name", "Type", "Descripton", "Default"
    :widths: 20, 20, 50, 10

    "outputs:isPressed", "``bool``", "True if the mouse button was pressed, False if it was released or mouse element is not related to a button", "None"
    "Pressed (*outputs:pressed*)", "``execution``", "Executes when mouse button was pressed. Will not execute on move or scroll events", "None"
    "Released (*outputs:released*)", "``execution``", "Executes when mouse button was released. Will not execute on move or scroll events", "None"
    "Delta Value (*outputs:value*)", "``float[2]``", "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]", "None"
    "Moved (*outputs:valueChanged*)", "``execution``", "Executes when user moves the cursor or scrolls the cursor. Will not execute on button events", "None"


Metadata
--------
.. csv-table::
    :header: "Name", "Value"
    :widths: 30,70

    "Unique ID", "omni.graph.action.OnMouseInput"
    "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"

