LNXSDK/leenkx/blender/lnx/logicnode/string/LN_string_replace.py

16 lines
495 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class StringReplaceNode(LnxLogicTreeNode):
"""Replace all ocurrences of string to find in the input String"""
bl_idname = 'LNStringReplaceNode'
bl_label = 'String Replace'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxStringSocket', 'String')
self.add_input('LnxStringSocket', 'Find')
self.add_input('LnxStringSocket', 'Replace')
self.add_output('LnxStringSocket', 'String')