From 1f4a214987a2c3a9d767af36620d632174fe861d Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Sun, 13 Mar 2016 23:55:18 -0400 Subject: [PATCH] Correct spot light size conversion in Blender exporter. The collada falloff angle is the angle from the center of the spot light projection, whereas Blender's point light size is the angle from one side to the opposite, meaning it's twice as much. --- tools/export/blender25/io_scene_dae/export_dae.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py index 7ee0e179b87..370dc359b5d 100644 --- a/tools/export/blender25/io_scene_dae/export_dae.py +++ b/tools/export/blender25/io_scene_dae/export_dae.py @@ -1087,7 +1087,7 @@ class DaeExporter: self.writel(S_LAMPS,5,''+strarr(light.color)+'') att_by_distance = 2.0 / light.distance # convert to linear attenuation self.writel(S_LAMPS,5,''+str(att_by_distance)+'') - self.writel(S_LAMPS,5,''+str(math.degrees(light.spot_size))+'') + self.writel(S_LAMPS,5,''+str(math.degrees(light.spot_size/2))+'') self.writel(S_LAMPS,4,'')