Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-08-13 06:23:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-13 06:33:03 +0300
commited38d0c25da27c8fe6b3db76dbe024f33f82e338 (patch)
tree12bda6b67f13ed9b82f1a64dc1331f18823ed703 /source/blender/modifiers/intern/MOD_normal_edit.c
parent399b6ec76c80a8f343747a0459bb3d3df514555f (diff)
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.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_normal_edit.c')
-rw-r--r--source/blender/modifiers/intern/MOD_normal_edit.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c
index e7750f0a0d1..1dbdcf87d63 100644
--- a/source/blender/modifiers/intern/MOD_normal_edit.c
+++ b/source/blender/modifiers/intern/MOD_normal_edit.c
@@ -556,15 +556,13 @@ static Mesh *normalEditModifier_do(NormalEditModifierData *enmd,
polynors = CustomData_add_layer(pdata, CD_NORMAL, CD_CALLOC, NULL, num_polys);
CustomData_set_layer_flag(pdata, CD_NORMAL, CD_FLAG_TEMPORARY);
}
- BKE_mesh_calc_normals_poly(mvert,
- NULL,
- num_verts,
- mloop,
- mpoly,
- num_loops,
- num_polys,
- polynors,
- (result->runtime.cd_dirty_vert & CD_MASK_NORMAL) ? false : true);
+ if (result->runtime.cd_dirty_vert & CD_MASK_NORMAL) {
+ BKE_mesh_calc_normals_poly_and_vertex(
+ mvert, num_verts, mloop, num_loops, mpoly, num_polys, polynors, NULL);
+ }
+ else {
+ BKE_mesh_calc_normals_poly(mvert, num_verts, mloop, num_loops, mpoly, num_polys, polynors);
+ }
result->runtime.cd_dirty_vert &= ~CD_MASK_NORMAL;