diff --git a/nodes/constant.py b/nodes/constant.py new file mode 100644 index 0000000..c83b0f0 --- /dev/null +++ b/nodes/constant.py @@ -0,0 +1,27 @@ +import json + +from ..log import log + + +class MTB_Constant: + @classmethod + def INPUT_TYPES(cls): + return { + "required": {"Value": ("*",)}, + } + + RETURN_TYPES = ("*",) + RETURN_NAMES = ("output",) + CATEGORY = "mtb/utils" + FUNCTION = "execute" + + def execute( + self, + **kwargs, + ): + log.debug("Received kwargs") + log.debug(json.dumps(kwargs, check_circular=True)) + return (kwargs.get("Value"),) + + +__nodes__ = [MTB_Constant]