Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorArystanbek Dyussenov <arystan.d@gmail.com>2010-02-11 17:53:29 +0300
committerArystanbek Dyussenov <arystan.d@gmail.com>2010-02-11 17:53:29 +0300
commit4746fbd8ce9edf4c898fb690ffff0c664636d769 (patch)
tree6acd3d85fa54dc804e06ce9cedf9596c2b18c4e4 /source
parent3c5b476d1f2e52cabf93a3ce658cf42b269a3968 (diff)
COLLADA exporter (in trunk): write 1 normal per flat face instead of 3 or 4.
Diffstat (limited to 'source')
-rw-r--r--source/blender/collada/DocumentExporter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index 0643c681515..784a32ac3d0 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -650,7 +650,6 @@ public:
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 @@ public:
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 @@ public:
vv++;
}
else {
- nor.push_back(n);
*nn = nor.size() - 1;
}
nn++;