From 7422f2ea7a286bd90d4b892f493fa4477276925d Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 8 Oct 2025 19:14:37 +0200 Subject: [PATCH] Fix #147559: performance regression due to unnecessary geometry copy The geometry was copied later on when it was modified because there was still a reference to it in the modifier. Since this uses implicit sharing, if there is more than one reference, the data has to be copied before it can be modified. Pull Request: https://projects.blender.org/blender/blender/pulls/147644 --- source/blender/nodes/intern/geometry_nodes_execute.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/intern/geometry_nodes_execute.cc b/source/blender/nodes/intern/geometry_nodes_execute.cc index 5a78b8a0538..b1f07a194f4 100644 --- a/source/blender/nodes/intern/geometry_nodes_execute.cc +++ b/source/blender/nodes/intern/geometry_nodes_execute.cc @@ -875,7 +875,7 @@ bke::GeometrySet execute_geometry_nodes_on_geometry(const bNodeTree &btree, const eNodeSocketDatatype socket_type = typeinfo ? typeinfo->type : SOCK_CUSTOM; if (socket_type == SOCK_GEOMETRY && i == 0) { bke::SocketValueVariant &value = scope.construct(); - value.set(input_geometry); + value.set(std::move(input_geometry)); param_inputs[function.inputs.main[0]] = &value; continue; }