From ed38d0c25da27c8fe6b3db76dbe024f33f82e338 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 13 Aug 2021 13:23:45 +1000 Subject: Cleanup: split BKE_mesh_calc_normals_poly function in two Remove the 'only_face_normals' argument. - BKE_mesh_calc_normals_poly for polygon normals. - BKE_mesh_calc_normals_poly_and_vertex for poly and vertex normals. Order arguments logically: - Pair array and length arguments. - Position normal array arguments (to be filled) last. --- source/blender/blenkernel/intern/data_transfer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/data_transfer.c') diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c index 605061570b8..b83621e8b79 100644 --- a/source/blender/blenkernel/intern/data_transfer.c +++ b/source/blender/blenkernel/intern/data_transfer.c @@ -301,14 +301,12 @@ static void data_transfer_dtdata_type_preprocess(Mesh *me_src, } if (dirty_nors_dst || do_poly_nors_dst) { BKE_mesh_calc_normals_poly(verts_dst, - NULL, num_verts_dst, loops_dst, - polys_dst, num_loops_dst, + polys_dst, num_polys_dst, - poly_nors_dst, - true); + poly_nors_dst); } /* Cache loop nors into a temp CDLayer. */ loop_nors_dst = CustomData_get_layer(ldata_dst, CD_NORMAL); -- cgit v1.2.3