diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-06-24 19:14:13 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-06-24 19:14:13 +0400 |
commit | bae38624391680a755485da05abf7341bb3da13a (patch) | |
tree | 346f3826a33524a0c5996f61b78472d4de918f5b /source/blender/src/parametrizer.c | |
parent | 81a3aac88e6b319aeda06c9a52dedde9aa61d409 (diff) |
Fix for bug #4448:
- Degenerate triangle issue for LSCM with reported .blend.
Diffstat (limited to 'source/blender/src/parametrizer.c')
-rw-r--r-- | source/blender/src/parametrizer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/src/parametrizer.c b/source/blender/src/parametrizer.c index de854a3c43e..9548410b513 100644 --- a/source/blender/src/parametrizer.c +++ b/source/blender/src/parametrizer.c @@ -2898,7 +2898,7 @@ static PBool p_chart_lscm_solve(PChart *chart) } /* angle based lscm formulation */ - ratio = (sina3 == 0.0f)? 0.0f: sina2/sina3; + ratio = (sina3 == 0.0f)? 1.0f: sina2/sina3; cosine = cos(a1)*ratio; sine = sina1*ratio; @@ -2927,6 +2927,12 @@ static PBool p_chart_lscm_solve(PChart *chart) p_chart_lscm_load_solution(chart); return P_TRUE; } + else { + for (v=chart->verts; v; v=v->nextlink) { + v->uv[0] = 0.0f; + v->uv[1] = 0.0f; + } + } return P_FALSE; } |