]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/export_light.py
Add attenuation calculations and related export code for point lights
[libs/gl.git] / blender / io_mspgl / export_light.py
index 2fc8c8dd02bd3dbccec4b0204dd75ed0930c378e..7ccb966354faa2c2fd739316aa324379938ec240 100644 (file)
@@ -16,6 +16,7 @@ class LightExporter:
                        light_res.statements.append(Statement("type", Token("point")))
                        pos = obj.matrix_world@mathutils.Vector((0.0, 0.0, 0.0, 1.0))
                        light_res.statements.append(Statement("position", *obj.matrix_world.col[3][0:3]))
+                       light_res.statements.append(Statement("attenuation", 1.0, 0.0, 1.0))
                else:
                        raise Exception("Can't export light {} of unknown type {}".format(light.name, light.type))