diff --git a/FETextCombine.py b/FETextCombine.py index e47e439..18b0f7a 100644 --- a/FETextCombine.py +++ b/FETextCombine.py @@ -1,5 +1,4 @@ from .categories import CATE_UTILS -from .utils.any_hack import any class FETextCombine: @@ -8,7 +7,7 @@ class FETextCombine: def INPUT_TYPES(cls): return { "required": {}, - "optional": {"input": (any, {"default": None})}, + "optional": {"input": ("STRING", {"default": "", 'forceInput': True})}, } @classmethod @@ -21,5 +20,9 @@ class FETextCombine: CATEGORY = CATE_UTILS def out(self, **kwargs): - output = "".join([str(_) for _ in list(kwargs.values()) if _ is not None]) + if kwargs.get('input') == 'undefined': + kwargs['input'] = '' + if "input" in kwargs and not kwargs["input"]: + del kwargs['input'] + output = "".join([str(_) for _ in list(kwargs.values())]) return (output,) diff --git a/web/js/packer.js b/web/js/packer.js index 02932ab..8018541 100644 --- a/web/js/packer.js +++ b/web/js/packer.js @@ -46,12 +46,17 @@ app.registerExtension({ } } } + if (nodeData.name == "FETextCombine"){ + // remove widgets + this.widgets = [] + this.widgets_values = [] + } } if (FE_DATA_UNPACKER.includes(nodeData.name)) { nodeType.prototype.onConnectionsChange = function (type, _, connected, link_info) { - console.log("onConnectionsChange", this) + // console.log("onConnectionsChange", this) for (let i = 0; i < this.outputs.length - 1; i++) { if (!this.outputs[i].links || this.outputs[i].links.length === 0) { console.log("onConnectionsChange pop", i, this.removeOutput(i--));