forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
19
leenkx/blender/lnx/logicnode/variable/LN_float.py
Normal file
19
leenkx/blender/lnx/logicnode/variable/LN_float.py
Normal file
@ -0,0 +1,19 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
|
||||
class FloatNode(LnxLogicVariableNodeMixin, LnxLogicTreeNode):
|
||||
"""Stores the given float as a variable. If the set float value has more
|
||||
than 3 decimal places, the displayed value in the node will be
|
||||
rounded, but when you click on it you can still edit the exact
|
||||
value which will be used in the game as well."""
|
||||
bl_idname = 'LNFloatNode'
|
||||
bl_label = 'Float'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxFloatSocket', 'Float In')
|
||||
self.add_output('LnxFloatSocket', 'Float 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()
|
||||
|
Reference in New Issue
Block a user