Merged changes in the trunk up to revision 37799.
[blender.git] / source / blender / blenloader / intern / readfile.c
index 9c45d2b9d7b8018967715ac427d7190579bc18e5..b8ca814a547a403021813bf9a4ad820fd053b30f 100644 (file)
@@ -11744,9 +11744,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                        }
        }
 
-       /* put compatibility code here until next subversion bump */
-
-       {
+       if (main->versionfile < 258 || (main->versionfile == 258 && main->subversionfile < 1)){
                /* screen view2d settings were not properly initialized [#27164]
                 * v2d->scroll caused the bug but best reset other values too which are in old blend files only.
                 * need to make less ugly - possibly an iterator? */
@@ -11813,6 +11811,20 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                }
                        }
                }
+
+               {
+                       ParticleSettings *part;
+                       for(part = main->particle.first; part; part = part->id.next) {
+                               /* Initialize particle billboard scale */
+                               part->bb_size[0] = part->bb_size[1] = 1.0f;
+                       }
+               }
+       }
+       
+       /* put compatibility code here until next subversion bump */
+
+       {
+       
        }
        
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
@@ -11896,7 +11908,8 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
 
        // XXX
        user->uifonts.first= user->uifonts.last= NULL;
-       user->uistyles.first= user->uistyles.last= NULL;
+       
+       link_list(fd, &user->uistyles);
 
        /* free fd->datamap again */
        oldnewmap_free_unused(fd->datamap);