]> git.tdb.fi Git - libs/gl.git/commitdiff
An extra sanity check for TBN export
authorMikko Rasa <tdb@tdb.fi>
Thu, 9 Aug 2012 20:22:35 +0000 (23:22 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 9 Aug 2012 20:22:35 +0000 (23:22 +0300)
blender/io_mesh_mspgl/export_mspgl.py

index 124114e5fe60cb1111cf0385428bb149c749cd26..c776c54fea3fddec0051941e7230884abc60d695 100644 (file)
@@ -323,12 +323,13 @@ class Exporter:
                                        else:
                                                out_file.write("multitexcoord2", u.unit, *v.uvs[i])
                                        uvs[i] = v.uvs[i]
-                       if v.tan!=tan:
-                               out_file.write("attrib3", 3, *v.tan)
-                               tan = v.tan
-                       if v.bino!=bino:
-                               out_file.write("attrib3", 4, *v.bino)
-                               bino = v.bino
+                       if self.tbn_vecs:
+                               if v.tan!=tan:
+                                       out_file.write("attrib3", 3, *v.tan)
+                                       tan = v.tan
+                               if v.bino!=bino:
+                                       out_file.write("attrib3", 4, *v.bino)
+                                       bino = v.bino
                        out_file.write("vertex3", *v.co)
                out_file.end()
                for s in strips: