Freak-ppa's picture
Upload 532 files
2de3b69 verified
raw
history blame
759 Bytes
# μ™€μΌλ“œ μΉ΄λ“œλ₯Ό μ†μ΄λŠ” μš©λ„? μž„νŒ©νŠΈνŒ©μ—μ„œ κ°€μ Έμ˜΄
class AnyType(str):
def __ne__(self, __value: object) -> bool:
return False
any_typ = AnyType("*")
class NodeSwitch:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"DeTK": ("BOOLEAN", { "default": True, "label_on": "case1", "label_off": "case2" }),
},
"optional": {
"case1": (any_typ,),
"case2": (any_typ,)
}
}
CATEGORY = "Switch"
FUNCTION = "run"
RETURN_TYPES = (any_typ,)
def run(self, DeTK, case1, case2):
return ((case1 if DeTK else case2),)
NODE_CLASS_MAPPINGS = {
"NodeSwitch": NodeSwitch
}
NODE_DISPLAY_NAME_MAPPINGS = {
"NodeSwitch": "NodeSwitch",
}