fix: declare input_string in Python INPUT_TYPES for Nodes 2.0 compatibility (Issue #12)
This commit is contained in:
@@ -2,7 +2,12 @@ class StringPreviewNode:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {},
|
||||
"required": {
|
||||
"input_string": ("STRING", {
|
||||
"forceInput": True,
|
||||
"tooltip": "The string to preview"
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING",)
|
||||
@@ -16,5 +21,5 @@ class StringPreviewNode:
|
||||
# Force re-evaluation every time to ensure fresh data in PNG metadata
|
||||
return float("nan")
|
||||
|
||||
def preview_string(self, input_string=""):
|
||||
def preview_string(self, input_string):
|
||||
return {"ui": {"text": (input_string,)}, "result": (input_string,)}
|
||||
Reference in New Issue
Block a user