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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-03-16 12:37:26 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-03-16 12:38:45 +0300
commit9542cf041af32b6db04b441daa7e7db290e5e7f1 (patch)
treeb1ac4f999508a4aa09df25d909176bf293276c49 /source
parent30527e3e55a1125574265607a8c53acaae1f526c (diff)
Fix an incorrect assert in lnor code.
There is one case where we do can have only two edges for two loops...
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index 40a09eba658..6c835a72a40 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -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 {