]> git.tdb.fi Git - libs/gl.git/commitdiff
Some fixes for the scene exporter
authorMikko Rasa <tdb@tdb.fi>
Wed, 30 Nov 2016 22:39:34 +0000 (00:39 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 30 Nov 2016 22:39:34 +0000 (00:39 +0200)
blender/io_mspgl/export_mesh.py
blender/io_mspgl/export_scene.py

index 1652c1a494756eec3c772718b01897297046e444..140d745e071b77a885ca64c5f8b983d81ee017ad 100644 (file)
@@ -195,7 +195,7 @@ class MeshExporter:
 
        def export(self, context, out_file, objs=None, progress=None):
                if objs:
-                       objs = [(o, mathutils.Matrix()) for i in objs]
+                       objs = [(o, mathutils.Matrix()) for o in objs]
 
                if self.compound:
                        if objs is None:
index a76b635ae0d791096adca2230a99e397baf3c55a..fcd634fbf7330036c7880c4ef4ef2eca5f0fceb5 100644 (file)
@@ -8,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)
@@ -59,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();