From a450cc80451ef8b102e4e5cedc7f2f386db41b09 Mon Sep 17 00:00:00 2001 From: FredBill1 <36622430+FredBill1@users.noreply.github.com> Date: Sun, 5 May 2024 16:14:40 +0100 Subject: [PATCH] update --- nodes/string_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nodes/string_utils.py b/nodes/string_utils.py index 4d16648..c5de019 100644 --- a/nodes/string_utils.py +++ b/nodes/string_utils.py @@ -26,6 +26,7 @@ class FBMultilineStringList: INPUT_TYPES = lambda: { "required": { "value": ("STRING", {"default": "", "multiline": True, "dynamicPrompts": False}), + "enabled": ("BOOLEAN", {"default": True}), }, "optional": { "prepend": ("STRING_LIST",), @@ -34,8 +35,8 @@ class FBMultilineStringList: RETURN_TYPES = ("STRING_LIST",) FUNCTION = "execute" - def execute(self, value: str, prepend: Optional[list[str]] = None) -> tuple[list[str]]: - res = [line.strip() for line in value.split("\n")] + def execute(self, value: str, enabled: bool, prepend: Optional[list[str]] = None) -> tuple[list[str]]: + res = [line.strip() for line in value.split("\n")] if enabled else [] if prepend is not None: res = prepend + res return (res,)