+ self.out_file.write("indices", l.verts[0].index, l.verts[1].index)
+ self.out_file.end()
+
+ if self.object:
+ self.out_file.end()
+ self.out_file.begin("technique")
+ self.out_file.begin("pass", '""')
+ if self.material_tex:
+ self.out_file.begin("material")
+ self.out_file.write("diffuse", 1.0, 1.0, 1.0, 1.0)
+ self.out_file.end()
+ self.out_file.begin("texunit", 0)
+ self.out_file.begin("texture2d")
+ self.out_file.write("min_filter", "NEAREST")
+ self.out_file.write("mag_filter", "NEAREST")
+ self.out_file.write("storage", "RGB", len(mesh.materials), 1)
+ texdata = '"'
+ for m in mesh.materials:
+ texdata += "\\x%02X\\x%02X\\x%02X"%(int(m.R*255), int(m.G*255), int(m.B*255))
+ texdata += '"'
+ self.out_file.write("raw_data", texdata)
+ self.out_file.end()
+ self.out_file.end()
+ elif mesh.materials:
+ m = mesh.materials[0]
+ self.out_file.begin("material")
+ self.out_file.write("diffuse", m.R, m.G, m.B, 1.0)
+ self.out_file.write("ambient", m.R*m.amb, m.G*m.amb, m.B*m.amb, 1.0)
+ self.out_file.write("specular", m.specR*m.spec, m.specG*m.spec, m.specB*m.spec, 1.0)
+ self.out_file.write("shininess", m.hard);
+ self.out_file.end()
+ self.out_file.end()
+ self.out_file.end()
+
+ Blender.Window.DrawProgressBar(1.0, "Done")