- def export(self, context, out_file, objs=None, progress=None):
- if objs:
- objs = [(o, mathutils.Matrix()) for i 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