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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-02-21 12:30:50 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-02-21 12:30:50 +0300
commit78ceb4b51ed92ba2a1aca5bbca9dacea00b6b51a (patch)
tree96ee47fb85612cc3aed56559cf4123f9ef600b58 /source/blender/blenkernel/intern/mesh_evaluate.c
parent813204838a268fd8108e9f9bc96bb1b4680c7929 (diff)
parentb1946e7f7ad2c9a308060f4f1a06f82cdcb4c8a5 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_evaluate.c')
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index c7678be18c7..a3469ecd5cd 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -1264,7 +1264,7 @@ void BKE_mesh_normals_loop_split(
const MVert *mverts, const int UNUSED(numVerts), MEdge *medges, const int numEdges,
MLoop *mloops, float (*r_loopnors)[3], const int numLoops,
MPoly *mpolys, const float (*polynors)[3], const int numPolys,
- const bool use_split_normals, float split_angle,
+ const bool use_split_normals, const float split_angle,
MLoopNorSpaceArray *r_lnors_spacearr, short (*clnors_data)[2], int *r_loop_to_poly)
{
/* For now this is not supported. If we do not use split normals, we do not generate anything fancy! */
@@ -1325,9 +1325,7 @@ void BKE_mesh_normals_loop_split(
TIMEIT_START_AVERAGED(BKE_mesh_normals_loop_split);
#endif
- if (check_angle) {
- split_angle = cosf(split_angle);
- }
+ const float split_angle_cos = check_angle ? cosf(split_angle) : -1.0f;
if (!r_lnors_spacearr && clnors_data) {
/* We need to compute lnor spacearr if some custom lnor data are given to us! */
@@ -1371,7 +1369,7 @@ void BKE_mesh_normals_loop_split(
*/
if (!(mp->flag & ME_SMOOTH) || (medges[ml_curr->e].flag & ME_SHARP) ||
ml_curr->v == mloops[e2l[0]].v ||
- (check_angle && dot_v3v3(polynors[loop_to_poly[e2l[0]]], polynors[mp_index]) < split_angle))
+ (check_angle && dot_v3v3(polynors[loop_to_poly[e2l[0]]], polynors[mp_index]) < split_angle_cos))
{
/* Note: we are sure that loop != 0 here ;) */
e2l[1] = INDEX_INVALID;