This commit is contained in:
justumen
2024-11-27 14:37:10 +01:00
parent 230ed2c446
commit 038842e80e
27 changed files with 2192 additions and 82 deletions

26
anything_to_text.py Normal file
View File

@@ -0,0 +1,26 @@
class AnythingToText:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"anything": (Everything("*"), {"forceInput": True})
},
}
@classmethod
def VALIDATE_INPUTS(s, input_types):
return True
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("text",)
FUNCTION = "any_to_text"
CATEGORY = "Bjornulf"
def any_to_text(self, anything):
# Convert the input to string representation
return (str(anything),)
# Keep the Everything class definition as it's needed for type handling
class Everything(str):
def __ne__(self, __value: object) -> bool:
return False