+import os
+
def linear_to_srgb(l):
if l<0.0031308:
return 12.92*l
self.material_tex = False
self.srgb_colors = True
self.textures = "REF"
+ self.separate_mesh = False
def export(self, context, out_file):
from .outfile import open_output
for k, v in self.__dict__.items():
setattr(mesh_export, k, v)
- out_file.begin("mesh")
- mesh = mesh_export.export(context, out_file)
- out_file.end()
+ 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)
+ out_file.write("mesh", "\""+base+".mesh\"")
+ else:
+ out_file.begin("mesh")
+ mesh = mesh_export.export(context, out_file)
+ out_file.end()
out_file.begin("technique")
out_file.begin("pass", '""')