class MeshExporter:
def __init__(self):
self.use_strips = True
- self.use_degen_tris = True
+ self.use_degen_tris = False
self.max_strip_len = 1024
- self.optimize_cache = False
+ self.optimize_cache = True
self.cache_size = 64
- self.export_lines = True
+ self.export_lines = False
self.export_uv = "UNIT0"
self.tbn_vecs = False
self.tbn_uvtex = ""
return strips, loose
- def export(self, context, out_file):
+ def export(self, context, out_file, objs=None):
if self.compound:
- objs = context.selected_objects
+ if objs is None:
+ objs = context.selected_objects
check = objs
while check:
children = []
children.append(c)
objs += children
check = children
- else:
+ elif objs is None:
objs = [context.active_object]
if not objs:
out_file.end()
if self.export_lines and mesh.lines:
- out_file.write("batch", "LINES")
+ out_file.begin("batch", "LINES")
for l in mesh.lines:
out_file.write("indices", l.vertices[0].index, l.vertices[1].index)
out_file.end()