Files
Bjornulf_custom_nodes/anything_to_text.py
justumen 038842e80e 0.61
2024-11-27 14:37:10 +01:00

26 lines
693 B
Python

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