Commit: dea19ef48f4d868aab36d70426dbf177043b0750 Author: Hans Goudey Date: Wed Jul 20 12:57:52 2022 -0500 Branches: refactor-mesh-remove-pointers https://developer.blender.org/rBdea19ef48f4d868aab36d70426dbf177043b0750
Merge branch 'master' into refactor-mesh-remove-pointers =================================================================== =================================================================== diff --cc source/blender/geometry/intern/add_curves_on_mesh.cc index bc23dfe346c,e54e2bdd3b0..bb8e1e7fd0b --- a/source/blender/geometry/intern/add_curves_on_mesh.cc +++ b/source/blender/geometry/intern/add_curves_on_mesh.cc @@@ -144,20 -145,18 +145,20 @@@ static void interpolate_position_with_i { MutableSpan<float3> positions_cu = curves.positions_for_write(); const int added_curves_num = root_positions_cu.size(); + const Span<MVert> surface_vertices = bke::mesh_vertices(surface); + const Span<MLoop> surface_loops = bke::mesh_loops(surface); threading::parallel_for(IndexRange(added_curves_num), 256, [&](const IndexRange range) { - for (const int i : range) { - const NeighborCurves &neighbors = neighbors_per_curve[i]; - const int curve_i = old_curves_num + i; + for (const int added_curve_i : range) { + const NeighborCurves &neighbors = neighbors_per_curve[added_curve_i]; + const int curve_i = old_curves_num + added_curve_i; const IndexRange points = curves.points_for_curve(curve_i); - const float length_cu = new_lengths_cu[i]; - const float3 &normal_su = new_normals_su[i]; + const float length_cu = new_lengths_cu[added_curve_i]; + const float3 &normal_su = new_normals_su[added_curve_i]; const float3 normal_cu = math::normalize(surface_to_curves_normal_mat * normal_su); - const float3 &root_cu = root_positions_cu[i]; + const float3 &root_cu = root_positions_cu[added_curve_i]; if (neighbors.is_empty()) { /* If there are no neighbors, just make a straight line. */ diff --cc source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc index e748029c2c4,b74b4e45199..612a2af209c --- a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc @@@ -987,10 -965,9 +988,9 @@@ static void do_mesh_separation(Geometry 0, selected_loops_num, selected_polys_num); - out_component.replace(mesh_out, GeometryOwnershipType::Editable); /* Copy the selected parts of the mesh over to the new mesh. */ - memcpy(mesh_out->mvert, mesh_in.mvert, mesh_in.totvert * sizeof(MVert)); + bke::mesh_vertices_for_write(*mesh_out).copy_from(bke::mesh_vertices(mesh_in)); 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); @@@ -1045,11 -1028,10 +1051,10 @@@ } mesh_out = BKE_mesh_new_nomain_from_template( &mesh_in, mesh_in.totvert, mesh_in.totedge, 0, selected_loops_num, selected_polys_num); - out_component.replace(mesh_out, GeometryOwnershipType::Editable); /* Copy the selected parts of the mesh over to the new mesh. */ - memcpy(mesh_out->mvert, mesh_in.mvert, mesh_in.totvert * sizeof(MVert)); - memcpy(mesh_out->medge, mesh_in.medge, mesh_in.totedge * sizeof(MEdge)); + bke::mesh_vertices_for_write(*mesh_out).copy_from(bke::mesh_vertices(mesh_in)); + bke::mesh_edges_for_write(*mesh_out).copy_from(bke::mesh_edges(mesh_in)); copy_masked_polys_to_new_mesh(mesh_in, *mesh_out, selected_poly_indices, new_loop_starts); /* Copy attributes. */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs