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>2015-07-07 12:53:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-07 13:29:13 +0300
commit5af1daa2dc85adcabc057c1f28ca29163fae3d00 (patch)
treec2a65f9d52b9f54f2d0962b00f57727025676fed
parent23aa425cd9097e0279035c47f1d9071e57a7bde0 (diff)
Fix for recent error, ngons now flipped correctly
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index 7a0331b9c87..5ba72ccac82 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -2391,12 +2391,12 @@ int BKE_mesh_recalc_tessellation(
zero_v3(normal);
- /* calc normal */
+ /* calc normal, flipped: to get a positive 2d cross product */
ml = mloop + mp_loopstart;
co_prev = mvert[ml[mp_totloop - 1].v].co;
for (j = 0; j < mp_totloop; j++, ml++) {
co_curr = mvert[ml->v].co;
- add_newell_cross_v3_v3v3(normal, co_prev, co_curr);
+ add_newell_cross_v3_v3v3(normal, co_curr, co_prev);
co_prev = co_curr;
}
if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
@@ -2411,7 +2411,7 @@ int BKE_mesh_recalc_tessellation(
mul_v2_m3v3(projverts[j], axis_mat, mvert[ml->v].co);
}
- BLI_polyfill_calc_arena((const float (*)[2])projverts, mp_totloop, -1, tris, arena);
+ BLI_polyfill_calc_arena((const float (*)[2])projverts, mp_totloop, 1, tris, arena);
/* apply fill */
for (j = 0; j < totfilltri; j++) {