Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c34
1 files changed, 20 insertions, 14 deletions
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! */