progress.push_task("", 0.0, 0.95)
resource = self.export_mesh(context, obj, progress)
- with open(out_fn, "w") as out_file:
- for s in resource.statements:
- s.write_to_file(out_file)
+ resource.write_to_file(out_fn)
def export_mesh(self, context, mesh_or_obj, progress):
from .mesh import Mesh, create_mesh_from_object
progress.pop_task()
from .datafile import Resource, Statement, Token
- resource = Resource(mesh.name+".mesh")
+ resource = Resource(mesh.name+".mesh", "mesh")
statements = resource.statements
st = Statement("vertices", Token("NORMAL3"))