X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_mesh.py;h=3da09f9ab92d99cc918cf7375ed692e3f12aeb63;hb=a64e2e362cd7bce6f103f8878d69fcca4261bac9;hp=0d2e66ab442206b9f2454baa0ffe2e37f7557cb3;hpb=b61c103559c83d6fe7309f2ca4489f09e701c4cf;p=libs%2Fgl.git diff --git a/blender/io_mspgl/export_mesh.py b/blender/io_mspgl/export_mesh.py index 0d2e66ab..3da09f9a 100644 --- a/blender/io_mspgl/export_mesh.py +++ b/blender/io_mspgl/export_mesh.py @@ -286,19 +286,19 @@ class MeshExporter: if self.object: out_file.begin("mesh") - fmt = "NORMAL3" + fmt = ["NORMAL3"] if texunits: for i, u in texunits: if u.unit==0: - fmt += "_TEXCOORD2" + fmt.append("TEXCOORD2") else: - fmt += "_TEXCOORD2%d"%u.unit + fmt.append("TEXCOORD2_%d"%u.unit) if self.tbn_vecs: - fmt += "_ATTRIB33_ATTRIB34" + fmt += ["TANGENT3", "BINORMAL3"] if self.export_groups: - fmt += "_ATTRIB%d5"%(self.max_groups*2) - fmt += "_VERTEX3" - out_file.begin("vertices", fmt) + fmt.append("ATTRIB%d_5"%(self.max_groups*2)) + fmt.append("VERTEX3") + out_file.begin("vertices", *fmt) normal = None uvs = [None]*len(texunits) tan = None @@ -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]]