Spaces:
Running
on
L40S
Running
on
L40S
File size: 412 Bytes
4450790 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
export function removeUnusedInputsFromEnd(node, minNumber = 1, nameMatch) {
var _a;
for (let i = node.inputs.length - 1; i >= minNumber; i--) {
if (!((_a = node.inputs[i]) === null || _a === void 0 ? void 0 : _a.link)) {
if (!nameMatch || nameMatch.test(node.inputs[i].name)) {
node.removeInput(i);
}
continue;
}
break;
}
}
|