From 80b4a86678ef8b615ffb5d2ec688b1eb71e3dbfa Mon Sep 17 00:00:00 2001 From: Hayden Reeve Date: Wed, 31 Jan 2024 03:26:16 +0800 Subject: [PATCH] Fix missing FUNCTION in Better String Node While it works in some cases, other cases need this little stubby thing here. This will stop errors when feeding into nodes such as Save Image. --- __init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index 4ad38f3..94ea50e 100644 --- a/__init__.py +++ b/__init__.py @@ -7,17 +7,18 @@ class BetterString: def INPUT_TYPES(s): return { "required": { - "string_field": ("STRING", { - "multiline": True, - "default": "" - }), + "string": ("STRING", {"multiline": True}), }, } + FUNCTION = "event" RETURN_TYPES = ("STRING",) CATEGORY = "Better Things 💡" + def event(self, string): + return (string, ) + NODE_CLASS_MAPPINGS = { "BetterString": BetterString @@ -25,4 +26,4 @@ NODE_CLASS_MAPPINGS = { NODE_DISPLAY_NAME_MAPPINGS = { "BetterString": "Better String" -} +} \ No newline at end of file