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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user