new operator - OBJECT_OT_make_single_user
[blender.git] / source / blender / blenloader / intern / readfile.c
index 49dae2af168ad3ac4467aa1872847c9d0c58e450..448eb834818a5c01591e4ecaca8f2899b32dcbbc 100644 (file)
@@ -3918,7 +3918,7 @@ static void direct_link_object(FileData *fd, Object *ob)
        ob->flag &= ~OB_FROMGROUP;
        
        /* editmode doesn't get saved in files, so should get cleared when reloading... */
-       ob->mode &= ~OB_MODE_EDIT;
+       ob->mode &= ~(OB_MODE_EDIT|OB_MODE_PARTICLE_EDIT);
        
        ob->disp.first=ob->disp.last= NULL;
        
@@ -4096,7 +4096,7 @@ static void direct_link_object(FileData *fd, Object *ob)
                BLI_addhead(&ob->modifiers, hmd);
                BLI_remlink(&ob->hooks, hook);
                
-               modifier_unique_name(&ob->modifiers, hmd);
+               modifier_unique_name(&ob->modifiers, (ModifierData*)hmd);
 
                MEM_freeN(hook);
        }
@@ -4168,9 +4168,6 @@ static void lib_link_scene(FileData *fd, Main *main)
                                /* base->object= newlibadr_us(fd, sce->id.lib, base->object); */
                                base->object= newlibadr_us(fd, sce->id.lib, base->object);
                                
-                               /* when save during radiotool, needs cleared */
-                               base->flag &= ~OB_RADIO;
-                               
                                if(base->object==NULL) {
                                        printf("LIB ERROR: base removed\n");
                                        BLI_remlink(&sce->base, base);
@@ -6433,7 +6430,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                }
        }
        if(main->versionfile <= 140) {
-               /* r-g-b-fac in texure */
+               /* r-g-b-fac in texture */
                Tex *tex = main->tex.first;
                while (tex) {
                        if ((tex->rfac == 0.0) &&
@@ -7662,7 +7659,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                        
                                        BLI_addtail(&ob->modifiers, smd);
                                        
-                                       modifier_unique_name(&ob->modifiers, smd);
+                                       modifier_unique_name(&ob->modifiers, (ModifierData*)smd);
                                }
                        }
                        
@@ -9923,8 +9920,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
        }
 
        /* put 2.50 compatibility code here until next subversion bump */
-       {
+       if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 6)) {
                Object *ob;
+               Lamp *la;
                
                /* New variables for axis-angle rotations and/or quaternion rotations were added, and need proper initialisation */
                for (ob= main->object.first; ob; ob= ob->id.next) {
@@ -9942,6 +9940,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                }
                        }
                }
+
+               for(la = main->lamp.first; la; la=la->id.next)
+                       la->compressthresh= 0.05f;
        }
 
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */