Files
LNXSDK/leenkx/blender/lnx/logicnode/string/LN_format_number.py

15 lines
586 B
Python
Raw Normal View History

from lnx.logicnode.lnx_nodes import *
class FormatNumberNode(LnxLogicTreeNode):
bl_idname = 'LNFormatNumberNode'
bl_label = 'Format Number'
lnx_section = 'util'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxFloatSocket', 'Number', default_value=0.0)
self.add_input('LnxStringSocket', 'Thousands Sep', default_value=".")
self.add_input('LnxStringSocket', 'Decimal Sep', default_value=",")
self.add_input('LnxBoolSocket', 'Include Symbol $', default_value=False)
self.add_output('LnxStringSocket', 'Result')