16 lines
560 B
Python
16 lines
560 B
Python
|
from lnx.logicnode.lnx_nodes import *
|
||
|
|
||
|
|
||
|
class IntegerNode(LnxLogicVariableNodeMixin, LnxLogicTreeNode):
|
||
|
"""Stores the given integer (a whole number) as a variable."""
|
||
|
bl_idname = 'LNIntegerNode'
|
||
|
bl_label = 'Integer'
|
||
|
lnx_version = 1
|
||
|
|
||
|
def lnx_init(self, context):
|
||
|
self.add_input('LnxIntSocket', 'Int In')
|
||
|
self.add_output('LnxIntSocket', 'Int Out', is_var=True)
|
||
|
|
||
|
def synchronize_from_master(self, master_node: LnxLogicVariableNodeMixin):
|
||
|
self.inputs[0].default_value_raw = master_node.inputs[0].get_default_value()
|