Make text inputs optional

This commit is contained in:
Daniel
2024-05-09 03:58:22 +02:00
committed by GitHub
parent 3f2c021e50
commit 0bfab12bec
+3 -3
View File
@@ -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 = ""