[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43543] branches/bmesh/blender/source/ blender/blenkernel/intern/mesh.c: fix for error copying face normals from poly normals in mesh_recalcTesselation ()

Campbell Barton ideasman42 at gmail.com
Thu Jan 19 22:58:34 CET 2012


Revision: 43543
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43543
Author:   campbellbarton
Date:     2012-01-19 21:58:20 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
fix for error copying face normals from poly normals in mesh_recalcTesselation()

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

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/mesh.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/mesh.c	2012-01-19 21:25:14 UTC (rev 43542)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/mesh.c	2012-01-19 21:58:20 UTC (rev 43543)
@@ -2363,8 +2363,8 @@
 		if (CustomData_has_layer(pdata, CD_NORMAL)) {
 			float *pnors = CustomData_get_layer(pdata, CD_NORMAL);
 			float *fnors = CustomData_add_layer(fdata, CD_NORMAL, CD_CALLOC, NULL, totface);
-			for (i=0; i<totface; i++, fnors++) {
-				copy_v3_v3(fnors, &pnors[polyIndex[i]]);
+			for (i=0; i<totface; i++, fnors += 3) {
+				negate_v3_v3(fnors, pnors + (polyIndex[i] * 3));
 			}
 		}
 	}




More information about the Bf-blender-cvs mailing list