From 15ca881d4b6825f04c3121e31ce7b513adf0fb50 Mon Sep 17 00:00:00 2001 From: cubiq Date: Mon, 19 Aug 2024 19:07:21 +0200 Subject: [PATCH] add simple boolean --- misc.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/misc.py b/misc.py index 6f61a4b..5b1c7a2 100644 --- a/misc.py +++ b/misc.py @@ -70,6 +70,22 @@ class SimpleMathSlider: def execute(self, value): return (value, ) +class SimpleMathBoolean: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "value": ("BOOLEAN", { "default": False }), + }, + } + + RETURN_TYPES = ("BOOLEAN",) + FUNCTION = "execute" + CATEGORY = "essentials/utilities" + + def execute(self, value): + return (value, ) + class SimpleMath: @classmethod def INPUT_TYPES(s): @@ -405,6 +421,7 @@ MISC_CLASS_MAPPINGS = { "SimpleCondition+": SimpleCondition, "SimpleMath+": SimpleMath, "SimpleMathCondition+": SimpleMathCondition, + "SimpleMathBoolean+": SimpleMathBoolean, "SimpleMathFloat+": SimpleMathFloat, "SimpleMathInt+": SimpleMathInt, "SimpleMathPercent+": SimpleMathPercent, @@ -422,6 +439,7 @@ MISC_NAME_MAPPINGS = { "SimpleCondition+": "🔧 Simple Condition", "SimpleMath+": "🔧 Simple Math", "SimpleMathCondition+": "🔧 Simple Math Condition", + "SimpleMathBoolean+": "🔧 Simple Math Boolean", "SimpleMathFloat+": "🔧 Simple Math Float", "SimpleMathInt+": "🔧 Simple Math Int", "SimpleMathPercent+": "🔧 Simple Math Percent",