fix FETextCombine widgets
This commit is contained in:
+6
-3
@@ -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,)
|
||||
|
||||
+6
-1
@@ -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--));
|
||||
|
||||
Reference in New Issue
Block a user