Files
LNXSDK/leenkx/blender/lnx/logicnode/signal/LN_signal.py

28 lines
886 B
Python

from lnx.logicnode.lnx_nodes import *
class SignalNode(LnxLogicTreeNode):
"""Creates a new Signal or references an existing Signal from an object's property.
**Standalone Mode (default):**
Creates a new Signal instance that can be connected to OnSignal and EmitSignal nodes.
The Signal is stored in the LogicTree and persists for the lifetime of the trait.
**Reference Mode:**
When Object and Property inputs are connected, retrieves an existing Signal
from a Haxe trait's property using reflection.
@seeNode On Signal
@seeNode Emit Signal"""
bl_idname = 'LNSignalNode'
bl_label = 'Signal'
lnx_version = 1
lnx_section = 'signal'
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxStringSocket', 'Property')
self.add_output('LnxDynamicSocket', 'Signal')