4 def export_light(self, obj):
6 raise ValueError("Object {} is not a light".format(obj.name))
9 from .datafile import Resource, Statement
10 light_res = Resource(light.name+".light", "light")
13 pos = obj.matrix_world@mathutils.Vector((0.0, 0.0, 1.0, 0.0))
15 pos = obj.matrix_world@mathutils.Vector((0.0, 0.0, 0.0, 1.0))
17 light_res.statements.append(Statement("position", *tuple(pos)))
18 c = light.color*light.energy
19 light_res.statements.append(Statement("color", *tuple(c)))