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
This commit is contained in:
Jacques Lucke
2025-10-08 19:14:37 +02:00
parent 8c425ccd4d
commit 7422f2ea7a

View File

@@ -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<bke::SocketValueVariant>();
value.set(input_geometry);
value.set(std::move(input_geometry));
param_inputs[function.inputs.main[0]] = &value;
continue;
}