2025-01-22 16:18:30 +01:00
|
|
|
from lnx.logicnode.lnx_nodes import *
|
|
|
|
|
|
|
|
|
|
class SplitStringNode(LnxLogicTreeNode):
|
|
|
|
|
"""Splits the given string."""
|
|
|
|
|
bl_idname = 'LNSplitStringNode'
|
|
|
|
|
bl_label = 'Split String'
|
2026-09-04 10:46:13 -07:00
|
|
|
lnx_version = 2
|
2025-01-22 16:18:30 +01:00
|
|
|
|
|
|
|
|
def lnx_init(self, context):
|
|
|
|
|
self.add_input('LnxStringSocket', 'String')
|
|
|
|
|
self.add_input('LnxStringSocket', 'Split')
|
2026-09-04 10:46:13 -07:00
|
|
|
|
|
|
|
|
self.add_output('LnxNodeSocketArray', 'Array')
|
|
|
|
|
self.add_output('LnxIntSocket', 'Length')
|
|
|
|
|
|
|
|
|
|
def get_replacement_node(self, node_tree: bpy.types.NodeTree):
|
|
|
|
|
return NodeReplacement.Identity(self)
|