mirror of https://github.com/AxioDL/metaforce.git
Properly handle Directional lights
This commit is contained in:
parent
ac0d2d8828
commit
4eb1da2772
|
@ -22,13 +22,13 @@ void ReadBabeDeadLightToBlender(hecl::BlenderConnection::PyOutStream& os,
|
||||||
light.q / 8.0);
|
light.q / 8.0);
|
||||||
return;
|
return;
|
||||||
case BabeDeadLight::LightType::Directional:
|
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 = bpy.data.objects.new(lamp.name, lamp)\n"
|
||||||
"lamp_obj.rotation_mode = 'QUATERNION'\n"
|
"lamp_obj.rotation_mode = 'QUATERNION'\n"
|
||||||
"lamp_obj.rotation_quaternion = Vector((0,0,-1)).rotation_difference(Vector((%f,%f,%f)))\n"
|
"lamp_obj.rotation_quaternion = Vector((0,0,-1)).rotation_difference(Vector((%f,%f,%f)))\n"
|
||||||
"\n", s, l,
|
"\n", s, l,
|
||||||
light.direction.vec[0], light.direction.vec[1], light.direction.vec[2]);
|
light.direction.vec[0], light.direction.vec[1], light.direction.vec[2]);
|
||||||
break;
|
return;
|
||||||
case BabeDeadLight::LightType::Custom:
|
case BabeDeadLight::LightType::Custom:
|
||||||
os.format("lamp = bpy.data.lamps.new('LAMP_%01u_%03u', 'POINT')\n"
|
os.format("lamp = bpy.data.lamps.new('LAMP_%01u_%03u', 'POINT')\n"
|
||||||
"lamp_obj = bpy.data.objects.new(lamp.name, lamp)\n"
|
"lamp_obj = bpy.data.objects.new(lamp.name, lamp)\n"
|
||||||
|
|
Loading…
Reference in New Issue