[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44464] trunk/blender/source/blender/ modifiers/intern/MOD_solidify.c: Fix [#30351] Solidify Modifier High Quality Normals fails.

Bastien Montagne montagne29 at wanadoo.fr
Sun Feb 26 16:38:29 CET 2012


Revision: 44464
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44464
Author:   mont29
Date:     2012-02-26 15:38:28 +0000 (Sun, 26 Feb 2012)
Log Message:
-----------
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).

Modified Paths:
--------------
    trunk/blender/source/blender/modifiers/intern/MOD_solidify.c

Modified: trunk/blender/source/blender/modifiers/intern/MOD_solidify.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_solidify.c	2012-02-26 14:57:41 UTC (rev 44463)
+++ trunk/blender/source/blender/modifiers/intern/MOD_solidify.c	2012-02-26 15:38:28 UTC (rev 44464)
@@ -455,7 +455,8 @@
 		}
 
 		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 @@
 		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);
 	}
 




More information about the Bf-blender-cvs mailing list