[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43544] branches/bmesh/blender/source/ blender/blenkernel/intern/mesh.c: error in last fix, used negate to check it was working.

Campbell Barton ideasman42 at gmail.com
Thu Jan 19 23:04:14 CET 2012


Revision: 43544
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43544
Author:   campbellbarton
Date:     2012-01-19 22:04:13 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
error in last fix, used negate to check it was working.

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:58:20 UTC (rev 43543)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/mesh.c	2012-01-19 22:04:13 UTC (rev 43544)
@@ -2361,10 +2361,10 @@
 		/* If polys have a normals layer, copying that to faces can help
 		 * avoid the need to recalculate normals later */
 		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 += 3) {
-				negate_v3_v3(fnors, pnors + (polyIndex[i] * 3));
+			float (*pnors)[3] = CustomData_get_layer(pdata, CD_NORMAL);
+			float (*fnors)[3] = CustomData_add_layer(fdata, CD_NORMAL, CD_CALLOC, NULL, totface);
+			for (i=0; i<totface; i++) {
+				copy_v3_v3(fnors[i], pnors[polyIndex[i]]);
 			}
 		}
 	}



More information about the Bf-blender-cvs mailing list