+ if self.separate_mesh:
+ path, base = os.path.split(out_file.filename)
+ base, ext = os.path.splitext(base)
+ mesh_out = open_output(os.path.join(path, base+".mesh"))
+ mesh = mesh_export.export(context, mesh_out, objs, progress)
+ out_file.write("mesh", '"{}.mesh"'.format(base))
+ else:
+ out_file.begin("mesh")
+ mesh = mesh_export.export(context, out_file, objs, progress)
+ out_file.end()
+
+ if self.external_tech and obj.technique:
+ out_file.write("technique", '"{}"'.format(obj.technique))
+ elif self.separate_tech:
+ path, base = os.path.split(out_file.filename)
+ if self.shared_tech and mesh.materials:
+ tech_name = mesh.materials[0].name+".tech"
+ else:
+ base, ext = os.path.splitext(base)
+ tech_name = base+".tech"
+ tech_out = open_output(os.path.join(path, tech_name))
+ self.export_technique(mesh, tech_out)
+ out_file.write("technique", '"{}"'.format(tech_name))
+ else:
+ out_file.begin("technique")
+ self.export_technique(mesh, out_file)
+ out_file.end()