]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/export_mesh.py
Remove the compound property from exporter
[libs/gl.git] / blender / io_mspgl / export_mesh.py
index 3873bf329e627f2d108085b73cc0ca76b1c2b8af..b695b40e1e09af236ee8d1d0cde3c0703a56f4a9 100644 (file)
@@ -41,7 +41,6 @@ class MeshExporter:
                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):
@@ -189,24 +188,20 @@ class MeshExporter:
 
                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")