Revision: 17464
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17464
Author:   unclezeiv
Date:     2008-11-14 21:54:50 +0100 (Fri, 14 Nov 2008)

Log Message:
-----------
forgot to update do_versions: files saved with blender 2.48 (or trunk) would 
not have lightcuts related values correctly initialized

Modified Paths:
--------------
    branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c

Modified: 
branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c     
2008-11-14 19:39:12 UTC (rev 17463)
+++ branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c     
2008-11-14 20:54:50 UTC (rev 17464)
@@ -7821,40 +7821,6 @@
                                ob->pd->f_noise = 0.0;
                }
        }
-       
-       /* lightcuts stuff */
-       if(main->versionfile <= 247) {
-               Scene *sce= main->scene.first;
-               RenderData *r;
-               
-               while(sce) {
-                       r= &sce->r;
-                       if(r) {
-                               if(r->lightcuts_max_error<=0.0)
-                                       r->lightcuts_max_error= 0.02;
-                               if(r->lightcuts_max_cut<=0)
-                                       r->lightcuts_max_cut= 1000;
-                               if(r->lightcuts_indir_fac<=0.0f)
-                                       r->lightcuts_indir_fac= 100.0f;
-                               if(r->lightcuts_env_map<=0.0f)
-                                       r->lightcuts_env_map= 4096.0f;
-                               if(r->lightcuts_area_lights<=0)
-                                       r->lightcuts_area_lights= 4000;
-                               if(r->lightcuts_indir_dist<=0.0f)
-                                       r->lightcuts_indir_dist= 5.0f;
-                               if(r->lightcuts_color_weight==0)
-                                       r->lightcuts_color_weight= 1;
-                               if(r->lightcuts_env_map_fac==0.0f)
-                                       r->lightcuts_env_map_fac= 1.0f;
-                               if(r->lightcuts_indir_bounces==0)
-                                       r->lightcuts_indir_bounces= 1;
-                               if(r->lightcuts_meshlights==0)
-                                       r->lightcuts_meshlights= 4000;
-                       }
-                       
-                       sce= sce->id.next;
-               }
-       }
 
        if (main->versionfile < 247 || (main->versionfile == 247 && 
main->subversionfile < 2)){
                Object *ob;
@@ -7987,6 +7953,40 @@
                }
        }
        
+       /* lightcuts stuff */
+       if(main->versionfile <= 248) {
+               Scene *sce= main->scene.first;
+               RenderData *r;
+
+               while(sce) {
+                       r= &sce->r;
+                       if(r) {
+                               if(r->lightcuts_max_error<=0.0)
+                                       r->lightcuts_max_error= 0.02;
+                               if(r->lightcuts_max_cut<=0)
+                                       r->lightcuts_max_cut= 1000;
+                               if(r->lightcuts_indir_fac<=0.0f)
+                                       r->lightcuts_indir_fac= 100.0f;
+                               if(r->lightcuts_env_map<=0.0f)
+                                       r->lightcuts_env_map= 4096.0f;
+                               if(r->lightcuts_area_lights<=0)
+                                       r->lightcuts_area_lights= 4000;
+                               if(r->lightcuts_indir_dist<=0.0f)
+                                       r->lightcuts_indir_dist= 5.0f;
+                               if(r->lightcuts_color_weight==0)
+                                       r->lightcuts_color_weight= 1;
+                               if(r->lightcuts_env_map_fac==0.0f)
+                                       r->lightcuts_env_map_fac= 1.0f;
+                               if(r->lightcuts_indir_bounces==0)
+                                       r->lightcuts_indir_bounces= 1;
+                               if(r->lightcuts_meshlights==0)
+                                       r->lightcuts_meshlights= 4000;
+                       }
+
+                       sce= sce->id.next;
+               }
+       }
+       
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! 
*/
        /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
 


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to