X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_light.py;h=4da2ba29a717c6b7bf6ac9417d4157b4ddc12302;hb=e03a752116ab28283bf89dddf1228804cc853a7b;hp=cfa4a19dadef5e2d859233dd1db477b054e46e61;hpb=7ae4af705535271ad84dbfe2b5a24bc9c546ae01;p=libs%2Fgl.git diff --git a/blender/io_mspgl/export_light.py b/blender/io_mspgl/export_light.py index cfa4a19d..4da2ba29 100644 --- a/blender/io_mspgl/export_light.py +++ b/blender/io_mspgl/export_light.py @@ -3,7 +3,7 @@ import mathutils class LightExporter: def export_light(self, obj): if obj.type!='LIGHT': - raise ValueError("Object is not a light") + raise ValueError("Object {} is not a light".format(obj.name)) light = obj.data from .datafile import Resource, Statement @@ -15,8 +15,7 @@ class LightExporter: pos = obj.matrix_world@mathutils.Vector((0.0, 0.0, 0.0, 1.0)) light_res.statements.append(Statement("position", *tuple(pos))) - c = light.color - e = light.energy - light_res.statements.append(Statement("color", c.r*e, c.g*e, c.b*e)) + c = light.color*light.energy + light_res.statements.append(Statement("color", *tuple(c))) return light_res