diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-02-26 19:38:28 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-02-26 19:38:28 +0400 |
commit | 5970adaccfe4bd1faf24dd88fdba3e0801af792a (patch) | |
tree | 47519ff6b800c3348d6deb619edcabb19c65c9d2 /source/blender/modifiers | |
parent | 62f9959a8e4269293ee80c3bfe3f55e8b12f7ccd (diff) |
Fix [#30351] Solidify Modifier High Quality Normals fails.
Don't really know why, but appears we need to recalc normals when this option is ON.
Also small perf improvement (avoid to compute twice each face normals).
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index fd6d0f602a9..defc2b9de5e 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -455,7 +455,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } for (i=0, mp=mpoly; i<numFaces; i++, mp++) { - mesh_calc_poly_normal(mp, &mloop[mp->loopstart], mvert, face_nors[i]); + if (face_nors_calc) + mesh_calc_poly_normal(mp, &mloop[mp->loopstart], mvert, face_nors[i]); /* just added, calc the normal */ BLI_array_empty(face_angles); @@ -701,7 +702,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, MEM_freeN(old_vert_arr); /* must recalculate normals with vgroups since they can displace unevenly [#26888] */ - if(dvert) { + /* Also needed in case of HQ normals [#30351] (don't really undestand why, though... --mont29). */ + if (dvert || smd->flag & MOD_SOLIDIFY_NORMAL_CALC) { CDDM_calc_normals(result); } |