self.max_strip_len = 1024
self.optimize_cache = True
self.cache_size = 64
- self.compound = False
self.material_tex = False
def stripify(self, mesh, progress=None):
return strips, loose
- def export(self, context, out_file, objs=None, progress=None):
- if objs:
- objs = [(o, mathutils.Matrix()) for o in objs]
-
- if self.compound:
- if objs is None:
- objs = [(o, mathutils.Matrix()) for o in context.selected_objects]
- check = objs
- while check:
- children = []
- for o, m in check:
- for c in o.children:
- if c.compound:
- children.append((c, m*c.matrix_local))
- objs += children
- check = children
- elif objs is None:
- objs = [(context.active_object, mathutils.Matrix())]
+ def export(self, context, out_file, obj=None, progress=None):
+ if obj is None:
+ obj = context.active_object
+
+ objs = [(obj, mathutils.Matrix())]
+ check = objs
+ while check:
+ children = []
+ for o, m in check:
+ for c in o.children:
+ if c.compound:
+ children.append((c, m*c.matrix_local))
+ objs += children
+ check = children
if not objs:
raise Exception("Nothing to export")