forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
36
leenkx/blender/lnx/logicnode/input/LN_get_mouse_started.py
Normal file
36
leenkx/blender/lnx/logicnode/input/LN_get_mouse_started.py
Normal file
@ -0,0 +1,36 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
|
||||
class GetMouseStartedNode(LnxLogicTreeNode):
|
||||
"""."""
|
||||
bl_idname = 'LNGetMouseStartedNode'
|
||||
bl_label = 'Get Mouse Started'
|
||||
lnx_version = 2
|
||||
|
||||
property0: HaxeBoolProperty(
|
||||
'property0',
|
||||
name='Include Debug Console',
|
||||
description=(
|
||||
'If disabled, this node does not react to mouse press events'
|
||||
' over the debug console area. Enable this option to catch those events'
|
||||
)
|
||||
)
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
self.add_output('LnxStringSocket', 'Button')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
||||
|
||||
def get_replacement_node(self, node_tree: bpy.types.NodeTree):
|
||||
if self.lnx_version not in (0, 1):
|
||||
raise LookupError()
|
||||
|
||||
return NodeReplacement(
|
||||
'LNGetMouseStartedNode', self.lnx_version, 'LNGetMouseStartedNode', 2,
|
||||
in_socket_mapping={0: 0}, out_socket_mapping={0: 0, 1: 1},
|
||||
property_defaults={'property0': True}
|
||||
)
|
Reference in New Issue
Block a user