From 96e9debe1fbfcd114abf2c78b00a3a690ad205b6 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 12 Oct 2008 13:32:28 +0000 Subject: - Fix for bug #17825: baking SSS is not supported, but it didn't give proper results, should bake as if SSS was disabled. - Fix for GLSL to handle failing shadow buffer creation better. - Fix for sky/atmosphere version patch, was not doing files from 2.46 and newer. --- source/blender/blenloader/intern/readfile.c | 34 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'source/blender/blenloader/intern/readfile.c') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 25f9e179ca9..0193acb9f98 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7767,23 +7767,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* sun/sky */ if(main->versionfile < 246) { - Lamp *la; Object *ob; bActuator *act; - for(la=main->lamp.first; la; la= la->id.next) { - la->sun_effect_type = 0; - la->horizon_brightness = 1.0; - la->spread = 1.0; - la->sun_brightness = 1.0; - la->sun_size = 1.0; - la->backscattered_light = 1.0; - la->atm_turbidity = 2.0; - la->atm_inscattering_factor = 1.0; - la->atm_extinction_factor = 1.0; - la->atm_distance_factor = 1.0; - la->sun_intensity = 1.0; - } /* dRot actuator change direction in 2.46 */ for(ob = main->object.first; ob; ob= ob->id.next) { for(act= ob->actuators.first; act; act= act->next) { @@ -7946,6 +7932,26 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } + + if (main->versionfile < 248) { + Lamp *la; + + for(la=main->lamp.first; la; la= la->id.next) { + if(la->atm_turbidity == 0.0) { + la->sun_effect_type = 0; + la->horizon_brightness = 1.0; + la->spread = 1.0; + la->sun_brightness = 1.0; + la->sun_size = 1.0; + la->backscattered_light = 1.0; + la->atm_turbidity = 2.0; + la->atm_inscattering_factor = 1.0; + la->atm_extinction_factor = 1.0; + la->atm_distance_factor = 1.0; + la->sun_intensity = 1.0; + } + } + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */ -- cgit v1.2.3