armory/blender/arm/logicnode/input/LN_get_cursor_state.py
Moritz Brückner 96aa0ee890 Use custom sockets for default data types
This allows to listen for socket updates for the live patch system
2021-07-10 21:46:44 +02:00

24 lines
819 B
Python

import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class GetCursorStateNode(ArmLogicTreeNode):
"""Returns the state of the mouse cursor.
@seeNode Set Cursor State
@output Is Hidden Locked: `true` if the mouse cursor is both hidden and locked.
@output Is Hidden: `true` if the mouse cursor is hidden.
@output Is Locked: `true` if the mouse cursor is locked."""
bl_idname = 'LNGetCursorStateNode'
bl_label = 'Get Cursor State'
arm_section = 'mouse'
arm_version = 1
def init(self, context):
super(GetCursorStateNode, self).init(context)
self.outputs.new('ArmBoolSocket', 'Is Hidden Locked')
self.outputs.new('ArmBoolSocket', 'Is Hidden')
self.outputs.new('ArmBoolSocket', 'Is Locked')