diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-06-15 12:59:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-06-15 12:59:54 +0400 |
commit | d4cbd78a793a7f724c5a8932b52a76a722fc8772 (patch) | |
tree | 6940f94f7120836190877f573b820c48b40cc3b4 /source | |
parent | 0794c2722df5869074412d1018dd810785229433 (diff) |
fix for recent changes in solidify, normals were OK but customdata for loops wasnt.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 8e2cecf6a48..8f124bf0181 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -310,24 +310,26 @@ static DerivedMesh *applyModifier( } for (i = 0, mp = orig_mpoly; i < numFaces; i++, mp++) { + MLoop *ml_prev; int j; ml = orig_mloop + mp->loopstart; + ml_prev = ml + (mp->totloop - 1); for (j = 0; j < mp->totloop; j++, ml++) { /* add edge user */ - eidx = ml->e; + eidx = ml_prev->e; if (edge_users[eidx] == INVALID_UNUSED) { - unsigned int ml_v_next = (j + 1 != mp->totloop) ? ml[1].v : ml[-j].v; ed = orig_medge + eidx; - BLI_assert(ELEM(ml->v, ed->v1, ed->v2) && - ELEM(ml_v_next, ed->v1, ed->v2)); - edge_users[eidx] = (ml->v > ml_v_next) == (ed->v1 < ed->v2) ? i : (i + numFaces); + BLI_assert(ELEM(ml_prev->v, ed->v1, ed->v2) && + ELEM(ml->v, ed->v1, ed->v2)); + edge_users[eidx] = (ml_prev->v > ml->v) == (ed->v1 < ed->v2) ? i : (i + numFaces); edge_order[eidx] = j; } else { edge_users[eidx] = INVALID_PAIR; } + ml_prev = ml; } } |