]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/export_mesh.py
Standard vertex components for tangent and binormal vectors
[libs/gl.git] / blender / io_mspgl / export_mesh.py
index 135ed1098de2981c14899441485386f6cd6d0b63..3da09f9ab92d99cc918cf7375ed692e3f12aeb63 100644 (file)
@@ -294,7 +294,7 @@ class MeshExporter:
                                else:
                                        fmt.append("TEXCOORD2_%d"%u.unit)
                        if self.tbn_vecs:
-                               fmt += ["ATTRIB3_3", "ATTRIB3_4"]
+                               fmt += ["TANGENT3", "BINORMAL3"]
                if self.export_groups:
                        fmt.append("ATTRIB%d_5"%(self.max_groups*2))
                fmt.append("VERTEX3")
@@ -317,10 +317,10 @@ class MeshExporter:
                                        uvs[i] = v.uvs[i]
                        if self.tbn_vecs:
                                if v.tan!=tan:
-                                       out_file.write("attrib3", 3, *v.tan)
+                                       out_file.write("tangent3", *v.tan)
                                        tan = v.tan
                                if v.bino!=bino:
-                                       out_file.write("attrib3", 4, *v.bino)
+                                       out_file.write("binormal3", *v.bino)
                                        bino = v.bino
                        if self.export_groups:
                                group_attr = [(group_index_map[g.group], g.weight*v.group_weight_scale) for g in v.groups[:self.max_groups]]