Geometry Nodes: Remove unnecessary position copying in delete node

In Edges and Edges & Faces modes, the node copied the positions once
with the other generic attributes and another time specifically just as
the positions. This is now unnecessary since positions are stored as
a generic attribute (1af62cb3bf46f0cd328a). In a simple test this saved
2ms out of a total 12 in these modes.
This commit is contained in:
Hans Goudey 2023-02-26 22:09:55 -05:00
parent ca2c0da79e
commit 79d64bfde3

@ -996,7 +996,6 @@ static void do_mesh_separation(GeometrySet &geometry_set,
selected_polys_num);
/* Copy the selected parts of the mesh over to the new mesh. */
mesh_out->vert_positions_for_write().copy_from(mesh_in.vert_positions());
copy_masked_edges_to_new_mesh(mesh_in, *mesh_out, edge_map);
copy_masked_polys_to_new_mesh(
mesh_in, *mesh_out, edge_map, selected_poly_indices, new_loop_starts);
@ -1057,7 +1056,6 @@ static void do_mesh_separation(GeometrySet &geometry_set,
&mesh_in, mesh_in.totvert, mesh_in.totedge, 0, selected_loops_num, selected_polys_num);
/* Copy the selected parts of the mesh over to the new mesh. */
mesh_out->vert_positions_for_write().copy_from(mesh_in.vert_positions());
mesh_out->edges_for_write().copy_from(mesh_in.edges());
copy_masked_polys_to_new_mesh(mesh_in, *mesh_out, selected_poly_indices, new_loop_starts);