- def export(self, context, out_file):
- if self.compound:
- objs = context.selected_objects
- check = objs
- while check:
- children = []
- for o in check:
- for c in o.children:
- if c.compound:
- children.append(c)
- objs += children
- check = children
- else:
- objs = [context.active_object]
+ 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