From 4eb1da277217552d56a75229b86b5e45fc6fd992 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 9 Apr 2016 17:44:07 -0700 Subject: [PATCH] Properly handle Directional lights --- DataSpec/DNACommon/BabeDead.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DataSpec/DNACommon/BabeDead.hpp b/DataSpec/DNACommon/BabeDead.hpp index 34d721cb4..b305d81d2 100644 --- a/DataSpec/DNACommon/BabeDead.hpp +++ b/DataSpec/DNACommon/BabeDead.hpp @@ -22,13 +22,13 @@ void ReadBabeDeadLightToBlender(hecl::BlenderConnection::PyOutStream& os, light.q / 8.0); return; case BabeDeadLight::LightType::Directional: - os.format("lamp = bpy.data.lamps.new('LAMP_%01u_%03u', 'SPOT')\n" + os.format("lamp = bpy.data.lamps.new('LAMP_%01u_%03u', 'SUN')\n" "lamp_obj = bpy.data.objects.new(lamp.name, lamp)\n" "lamp_obj.rotation_mode = 'QUATERNION'\n" "lamp_obj.rotation_quaternion = Vector((0,0,-1)).rotation_difference(Vector((%f,%f,%f)))\n" "\n", s, l, light.direction.vec[0], light.direction.vec[1], light.direction.vec[2]); - break; + return; case BabeDeadLight::LightType::Custom: os.format("lamp = bpy.data.lamps.new('LAMP_%01u_%03u', 'POINT')\n" "lamp_obj = bpy.data.objects.new(lamp.name, lamp)\n"