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.
This commit is contained in:
2021-08-13 13:23:45 +10:00
parent 399b6ec76c
commit ed38d0c25d
13 changed files with 308 additions and 286 deletions

View File

@@ -615,8 +615,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
polynors = CustomData_add_layer(pdata, CD_NORMAL, CD_CALLOC, NULL, numPolys);
CustomData_set_layer_flag(pdata, CD_NORMAL, CD_FLAG_TEMPORARY);
}
BKE_mesh_calc_normals_poly(
mvert, NULL, numVerts, mloop, mpoly, numLoops, numPolys, polynors, false);
BKE_mesh_calc_normals_poly_and_vertex(
mvert, numVerts, mloop, numLoops, mpoly, numPolys, polynors, NULL);
const float split_angle = mesh->smoothresh;
short(*clnors)[2];