feat: ✨ simple not boolean node

requested and contributed by vallestutz
This commit is contained in:
Mel Massadian
2025-06-28 13:49:54 +02:00
parent ea750b5e8b
commit 71f601094a
+21
View File
@@ -867,6 +867,26 @@ class MTB_TensorOps:
return (result,)
class MTB_BooleanNot:
"""Inverts a boolean."""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"bool_in": ("BOOLEAN", {"default": False}),
},
}
RETURN_TYPES = ("BOOLEAN",)
RETURN_NAMES = ("inverted_bool",)
FUNCTION = "invert"
CATEGORY = "mtb/utils"
def invert(self, bool_in: bool):
return (not bool_in,)
__nodes__ = [
MTB_StringReplace,
MTB_FitNumber,
@@ -882,4 +902,5 @@ __nodes__ = [
MTB_FloatToFloats,
MTB_FloatsToInts,
MTB_TensorOps,
MTB_BooleanNot,
]