Files
Bjornulf_custom_nodes/note_text.py
justumen 39dfb0220a 0.77
2025-03-19 17:36:25 +01:00

28 lines
858 B
Python

class Everything(str):
def __ne__(self, __value: object) -> bool:
return False
class DisplayNote:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"any": (Everything("*"), {"forceInput": True}), # Accept any input
"display_text": ("STRING", {
"multiline": True, # Allow multiline text
"default": "" # Default text
}),
}
}
RETURN_TYPES = (Everything("*"),) # Return same type as input
RETURN_NAMES = ("any",) # Return same type as input
FUNCTION = "display_text_pass"
CATEGORY = "Bjornulf"
def display_text_pass(self, any, display_text):
# Simply pass through the input
if any is None:
return (None,)
else:
return (any,)