22 lines
790 B
Python
22 lines
790 B
Python
from lnx.logicnode.lnx_nodes import *
|
|
|
|
class SetVariableNode(LnxLogicTreeNode):
|
|
"""Sets the value of the given variable.
|
|
|
|
@input Variable: this socket must be connected to a variable node
|
|
(recognized by the little dot inside the socket). The value that
|
|
is stored inside the connected node is changed upon activation.
|
|
@input Value: the value that should be written into the variable.
|
|
"""
|
|
bl_idname = 'LNSetVariableNode'
|
|
bl_label = 'Set Variable'
|
|
lnx_section = 'set'
|
|
lnx_version = 1
|
|
|
|
def lnx_init(self, context):
|
|
self.add_input('LnxNodeSocketAction', 'In')
|
|
self.add_input('LnxDynamicSocket', 'Variable', is_var=True)
|
|
self.add_input('LnxDynamicSocket', 'Value')
|
|
|
|
self.add_output('LnxNodeSocketAction', 'Out')
|