[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26805] trunk/blender/source/blender/ collada/DocumentExporter.cpp: COLLADA exporter (in trunk): write 1 normal per flat face instead of 3 or 4.

Arystanbek Dyussenov arystan.d at gmail.com
Thu Feb 11 15:53:30 CET 2010


Revision: 26805
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26805
Author:   kazanbas
Date:     2010-02-11 15:53:29 +0100 (Thu, 11 Feb 2010)

Log Message:
-----------
COLLADA exporter (in trunk): write 1 normal per flat face instead of 3 or 4.

Modified Paths:
--------------
    trunk/blender/source/blender/collada/DocumentExporter.cpp

Modified: trunk/blender/source/blender/collada/DocumentExporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/DocumentExporter.cpp	2010-02-11 14:24:45 UTC (rev 26804)
+++ trunk/blender/source/blender/collada/DocumentExporter.cpp	2010-02-11 14:53:29 UTC (rev 26805)
@@ -650,7 +650,6 @@
 		for (i = 0; i < me->totface; i++) {
 			MFace *fa = &me->mface[i];
 			Face f;
-			Normal n;
 			unsigned int *nn = &f.v1;
 			unsigned int *vv = &fa->v1;
 
@@ -658,10 +657,12 @@
 			v = fa->v4 == 0 ? 3 : 4;
 
 			if (!(fa->flag & ME_SMOOTH)) {
+				Normal n;
 				if (v == 4)
 					normal_quad_v3(&n.x, vert[fa->v1].co, vert[fa->v2].co, vert[fa->v3].co, vert[fa->v4].co);
 				else
 					normal_tri_v3(&n.x, vert[fa->v1].co, vert[fa->v2].co, vert[fa->v3].co);
+				nor.push_back(n);
 			}
 
 			for (j = 0; j < v; j++) {
@@ -681,7 +682,6 @@
 					vv++;
 				}
 				else {
-					nor.push_back(n);
 					*nn = nor.size() - 1;
 				}
 				nn++;





More information about the Bf-blender-cvs mailing list