X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=mesh_export.py;h=0158bdbf9189d3cff6e2bedae25b8e040601d02b;hp=d7531b36c0f5210d56b8085463c116db0d6e67fd;hb=926d77eb54f915a6620eb879a91c1c4bd0f06bbc;hpb=cea3c333797cadd9629aefaa5b82243173a02d16 diff --git a/mesh_export.py b/mesh_export.py index d7531b36..0158bdbf 100644 --- a/mesh_export.py +++ b/mesh_export.py @@ -83,13 +83,16 @@ class SmoothGroup: v=f.verts[i] if v.index not in vert_map: vt=Vertex(v) - if not f.smooth: - vt.no=f.no + vt.no=Blender.Mathutils.Vector(f.no) self.verts.append(vt) vert_map[v.index]=vt f.verts[i]=vt else: f.verts[i]=vert_map[v.index] + vert_map[v.index].no+=f.no + + for v in self.verts: + v.no.normalize() class Exporter: