[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43557] branches/bmesh/blender/source/ blender/blenkernel/intern/DerivedMesh.c: after all modifier are applied calculate normals, then tessfaces, this works so tesselating copies normals into the the newly creates tesselated faces .

Campbell Barton ideasman42 at gmail.com
Fri Jan 20 14:14:25 CET 2012


Revision: 43557
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43557
Author:   campbellbarton
Date:     2012-01-20 13:14:14 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------
after all modifier are applied calculate normals, then tessfaces, this works so tesselating copies normals into the the newly creates tesselated faces.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c	2012-01-20 12:34:00 UTC (rev 43556)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c	2012-01-20 13:14:14 UTC (rev 43557)
@@ -1539,18 +1539,16 @@
 	}
 #endif /* WITH_GAMEENGINE */
 
-
 	/* --------------------------------------------------------------------- */
+	/* First calculate the polygon and vertex normals, re-tesselation
+	 * copies these into the tessface's normal layer */
+	finaldm->calcNormals(finaldm);
 	/* Re-tesselation is necessary to push render data (uvs, textures, colors)
 	 * from loops and polys onto the tessfaces. This may be currently be
 	 * redundantin cases where the render mode doesn't use these inputs, but
 	 * ideally eventually tesselation would happen on-demand, and this is one
 	 * of the primary places it would be needed. */
 	finaldm->recalcTesselation(finaldm);
-	/* if we have no modifiers applied we'lll still want the tessface normals
-	 * to be calculated from the polygon noramals,
-	 * 'CDDM_calc_normals_mapping' checks for this case - campbell */
-	finaldm->calcNormals(finaldm);
 	/* Need to watch this, it can cause issues, see bug [#29338]             */
 	/* take care with this block, we really need testing frameworks          */
 	/* --------------------------------------------------------------------- */




More information about the Bf-blender-cvs mailing list