Files
machinepainting-ComfyUI-Mac…/boolean.py
T

31 lines
692 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# boolean.py
class Boolean:
"""
Simple standalone Boolean toggle
MachinePaintingNodes – clean and minimal
"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"boolean": ("BOOLEAN", {
"default": True,
"label_on": "TRUE",
"label_off": "FALSE"
}),
}
}
RETURN_TYPES = ("BOOLEAN",)
RETURN_NAMES = ("boolean",)
FUNCTION = "execute"
CATEGORY = "MachinePainting/Utils"
def execute(self, boolean=True):
return (boolean,)
@classmethod
def IS_CHANGED(cls, **kwargs):
return float("NaN")