Merge with 2.5 -r 21756:22173.
[blender.git] / release / io / export_ply.py
index 8cbb2d5605a9765f19eb578c9fec584404116715..2f10875c9708f9cf4706cef86329694e04f20193 100644 (file)
@@ -130,12 +130,10 @@ def write(filename, scene, ob, \
                
                
                smooth = f.smooth
-               # XXX need face normals
-               """
                if not smooth:
-                       normal = tuple(f.no)
+                       normal = tuple(f.normal)
                        normal_key = rvec3d(normal)
-               """
+               
                if faceUV:
                        uv = active_uv_layer[i]
                        uv = uv.uv1, uv.uv2, uv.uv3, uv.uv4 # XXX - crufty :/
@@ -149,12 +147,10 @@ def write(filename, scene, ob, \
                pf= ply_faces[i]
                for j, vidx in enumerate(f_verts):
                        v = mesh_verts[vidx]
-                       """
+                       
                        if smooth:
-                               normal=         tuple(v.no)
+                               normal=         tuple(v.normal)
                                normal_key = rvec3d(normal)
-                       """
-                       normal_key = None # XXX
                        
                        if faceUV:
                                uvcoord=        uv[j][0], 1.0-uv[j][1]