2020-09-20 20:10:01 +02:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
|
|
|
class GetCursorLocationNode(ArmLogicTreeNode):
|
2020-10-05 19:55:56 +02:00
|
|
|
"""Returns the mouse cursor location in screen coordinates (pixels)."""
|
2020-09-20 20:10:01 +02:00
|
|
|
bl_idname = 'LNGetCursorLocationNode'
|
|
|
|
bl_label = 'Get Cursor Location'
|
2020-10-27 19:44:37 +01:00
|
|
|
arm_section = 'mouse'
|
2020-09-20 20:10:01 +02:00
|
|
|
arm_version = 1
|
|
|
|
|
|
|
|
def init(self, context):
|
|
|
|
super(GetCursorLocationNode, self).init(context)
|
|
|
|
self.add_output('NodeSocketInt', 'X')
|
|
|
|
self.add_output('NodeSocketInt', 'Y')
|
|
|
|
self.add_output('NodeSocketInt', 'Inverted X')
|
|
|
|
self.add_output('NodeSocketInt', 'Inverted Y')
|