Spaces:
Sleeping
Sleeping
| # ์์ผ๋ ์นด๋๋ฅผ ์์ด๋ ์ฉ๋? ์ํฉํธํฉ์์ ๊ฐ์ ธ์ด | |
| class AnyType(str): | |
| def __ne__(self, __value: object) -> bool: | |
| return False | |
| any_typ = AnyType("*") | |
| class NodeSwitch: | |
| def __init__(self): | |
| pass | |
| 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", | |
| } | |