From 0bfab12bec430cfd399d55fef9f7c30177e2ff73 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 9 May 2024 03:58:22 +0200 Subject: [PATCH] Make text inputs optional --- py/string_function.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py/string_function.py b/py/string_function.py index cdf9a00..b315039 100644 --- a/py/string_function.py +++ b/py/string_function.py @@ -7,10 +7,10 @@ class StringFunction: "required": { "action": (["append", "replace"], {}), "tidy_tags": (["yes", "no"], {}), - "text_a": ("STRING", {"multiline": True, "dynamicPrompts": False}), - "text_b": ("STRING", {"multiline": True, "dynamicPrompts": False}), }, "optional": { + "text_a": ("STRING", {"multiline": True, "dynamicPrompts": False}), + "text_b": ("STRING", {"multiline": True, "dynamicPrompts": False}), "text_c": ("STRING", {"multiline": True, "dynamicPrompts": False}) } } @@ -20,7 +20,7 @@ class StringFunction: CATEGORY = "utils" OUTPUT_NODE = True - def exec(self, action, tidy_tags, text_a, text_b, text_c=""): + def exec(self, action, tidy_tags, text_a="", text_b="", text_c=""): # Converted inputs are sent as the string of 'undefined' if not connected if text_a == "undefined": text_a = ""