]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/export_scene.py
Some fixes for the scene exporter
[libs/gl.git] / blender / io_mspgl / export_scene.py
index 03a02ed47903cd57d7c7e94a656b8f099664162f..fcd634fbf7330036c7880c4ef4ef2eca5f0fceb5 100644 (file)
@@ -1,7 +1,5 @@
 import math
 import os
-from .export_object import ObjectExporter
-from .outfile import OutFile
 
 class SceneExporter:
        def __init__(self):
@@ -10,7 +8,7 @@ class SceneExporter:
 
        def export(self, context, out_file):
                objs = context.selected_objects
-               objs = [o for o in objs if o.type=="MESH" and (not o.compound or o.parent not in objs)]
+               objs = [o for o in objs if o.type=="MESH" and (not o.compound or o.parent not in objs) and not o.lod_for_parent]
 
                from .outfile import open_output
                out_file = open_output(out_file)
@@ -18,6 +16,7 @@ class SceneExporter:
                path, base = os.path.split(out_file.filename)
                base, ext = os.path.splitext(base)
 
+               from .export_object import ObjectExporter
                object_export = ObjectExporter()
                object_export.compound = True
                object_export.external_tech = self.external_tech
@@ -60,4 +59,5 @@ class SceneExporter:
                                angle = q.angle
                                axis = q.axis
                        out_file.write("rotation", angle*180/math.pi, axis[0], axis[1], axis[2])
+                       out_file.write("scale", o.scale[0], o.scale[1], o.scale[2])
                        out_file.end();