Fix an incorrect assert in lnor code.

There is one case where we do can have only two edges for two loops...
This commit is contained in:
Bastien Montagne 2015-03-16 10:37:26 +01:00
parent 30527e3e55
commit 9542cf041a
Notes: blender-bot 2023-02-14 09:22:36 +01:00
Referenced by issue #44004, Few bugs with Custom Normals modifiers.
1 changed files with 3 additions and 1 deletions

View File

@ -387,7 +387,9 @@ void BKE_lnor_space_define(MLoopNorSpace *lnor_space, const float lnor[3],
BLI_stack_discard(edge_vectors);
nbr++;
}
BLI_assert(nbr > 2); /* This piece of code shall only be called for more than one loop... */
/* Note: In theory, this could be 'nbr > 2', but there is one case where we only have two edges for
* two loops: a smooth vertex with only two edges and two faces (our Monkey's nose has that, e.g.). */
BLI_assert(nbr >= 2); /* This piece of code shall only be called for more than one loop... */
lnor_space->ref_alpha = alpha / (float)nbr;
}
else {