Fix #124788: Missing passes after drag and drop image

Multi-layer image passes are missing after dragging and dropping an EXR
into the compositor editor. To fix this, we tag the new nodes as needing
an update due to changed ID.

Pull Request: https://projects.blender.org/blender/blender/pulls/124855
This commit is contained in:
Omar Emara
2024-07-17 11:34:19 +02:00
committed by Omar Emara
parent 555352faf9
commit 3ca6aa19c9

View File

@@ -780,6 +780,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
}
}
bNodeTree &node_tree = *snode.edittree;
float2 position = snode.runtime->cursor;
Vector<bNode *> nodes;
/* Add a node for each image. */
@@ -796,7 +797,9 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
}
else {
node->id = (ID *)image;
blender::bke::nodeTagUpdateID(node);
}
BKE_ntree_update_tag_node_property(&node_tree, node);
nodes.append(node);
/* Initial offset between nodes. */
position[1] -= 20.0f;
@@ -807,7 +810,6 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
}
/* Set new nodes as selected. */
bNodeTree &node_tree = *snode.edittree;
node_deselect_all(node_tree);
for (bNode *node : nodes) {
bke::nodeSetSelected(node, true);