diff options
author | Martin Poirier <theeth@yahoo.com> | 2008-10-20 04:48:10 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2008-10-20 04:48:10 +0400 |
commit | a806c1eb7f53cca7c65775b7ce849d31c12902f9 (patch) | |
tree | f4554b9212dc021b6f932dd1093a66da30cbef26 /source/blender/blenloader/intern | |
parent | d16a8649ff6c2b65492a78eab80bcdbefa9dbe9d (diff) | |
parent | 90721f3f835fca7fed7dce99a2b7b447eba50e26 (diff) |
merge 16951:17122
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index bc9b6465516..ec26683444e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7785,23 +7785,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) { @@ -7956,7 +7942,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) bMessageActuator *msgAct = (bMessageActuator *) act->data; if (strlen(msgAct->toPropName) > 2) { /* strip first 2 chars, would have only worked if these were OB anyway */ - strncpy(msgAct->toPropName, msgAct->toPropName+2, sizeof(msgAct->toPropName)); + memmove( msgAct->toPropName, msgAct->toPropName+2, sizeof(msgAct->toPropName)-2 ); } else { msgAct->toPropName[0] = '\0'; } @@ -7964,6 +7950,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! */ |