Closed MaxTrautwein closed 2 years ago
Used Inputs can be determined using the following setup:
var tid = this.id;
var input_Usage = Array(4).fill(undefined);
RED.nodes.eachNode(function(n){
if (n.wires === undefined) return;
for(let i = 0 ; i<n.wires.length;i++){
if (n.wires[i][0] == tid){
let tp = n.full_wires[i][0]["target_port"];
input_Usage[tp] = n.id
}
}
});
Sample output:
[ 'c4ded3954c88a635', undefined, undefined, 'c4ded3954c88a635' ]
Currently there is no way to check for the number of connected inputs from a node. This should be easily accessible.