This commit is contained in:
space-nuko
2023-06-01 17:18:51 -05:00
parent 51b2bd612c
commit acb3a4a1f4
2 changed files with 1735 additions and 1735 deletions

View File

@@ -7109,8 +7109,8 @@ LGraphNode.prototype.executeAction = function(action)
var selected_nodes_array = []; var selected_nodes_array = [];
for (var i in this.selected_nodes) { for (var i in this.selected_nodes) {
var node = this.selected_nodes[i]; var node = this.selected_nodes[i];
if (node.clonable === false) if (node.clonable === false)
continue; continue;
node._relative_id = index; node._relative_id = index;
selected_nodes_array.push(node); selected_nodes_array.push(node);
index += 1; index += 1;
@@ -7118,12 +7118,12 @@ LGraphNode.prototype.executeAction = function(action)
for (var i = 0; i < selected_nodes_array.length; ++i) { for (var i = 0; i < selected_nodes_array.length; ++i) {
var node = selected_nodes_array[i]; var node = selected_nodes_array[i];
var cloned = node.clone(); var cloned = node.clone();
if(!cloned) if(!cloned)
{ {
console.warn("node type not found: " + node.type ); console.warn("node type not found: " + node.type );
continue; continue;
} }
clipboard_info.nodes.push(cloned.serialize()); clipboard_info.nodes.push(cloned.serialize());
if (node.inputs && node.inputs.length) { if (node.inputs && node.inputs.length) {
for (var j = 0; j < node.inputs.length; ++j) { for (var j = 0; j < node.inputs.length; ++j) {

View File

@@ -341,20 +341,20 @@
// Reconnect links // Reconnect links
for (const node of graph.nodes) { for (const node of graph.nodes) {
if (node.inputs) { if (node.inputs) {
for (const input of node.inputs) { for (const input of node.inputs) {
if (input.link) { if (input.link) {
input.link = idMap.linkIDs[input.link] input.link = idMap.linkIDs[input.link]
} }
} }
} }
if (node.outputs) { if (node.outputs) {
for (const output of node.outputs) { for (const output of node.outputs) {
if (output.links) { if (output.links) {
output.links = output.links.map(l => idMap.linkIDs[l]); output.links = output.links.map(l => idMap.linkIDs[l]);
} }
} }
} }
} }
// Recurse! // Recurse!