2.5/Multires:
authorNicholas Bishop <nicholasbishop@gmail.com>
Wed, 19 Aug 2009 16:49:21 +0000 (16:49 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Wed, 19 Aug 2009 16:49:21 +0000 (16:49 +0000)
* Fixed saving most recent sculpting on a multires object. Uses the same hack already in place for saving that info for undo.

source/blender/blenloader/intern/writefile.c

index 62ec1b71938b511d9f44b03fc66325a83120ecf7..ede7aacfea84acb95d2f9031d67d7a436e4148c8 100644 (file)
@@ -1100,7 +1100,7 @@ static void write_defgroups(WriteData *wd, ListBase *defbase)
                writestruct(wd, DATA, "bDeformGroup", 1, defgroup);
 }
 
-static void write_modifiers(WriteData *wd, ListBase *modbase, int write_undo)
+static void write_modifiers(WriteData *wd, ListBase *modbase)
 {
        ModifierData *md;
 
@@ -1166,13 +1166,13 @@ static void write_modifiers(WriteData *wd, ListBase *modbase, int write_undo)
                else if (md->type==eModifierType_Multires) {
                        MultiresModifierData *mmd = (MultiresModifierData*) md;
 
-                       if(mmd->undo_verts && write_undo)
+                       if(mmd->undo_verts)
                                writestruct(wd, DATA, "MVert", mmd->undo_verts_tot, mmd->undo_verts);
                }
        }
 }
 
-static void write_objects(WriteData *wd, ListBase *idbase, int write_undo)
+static void write_objects(WriteData *wd, ListBase *idbase)
 {
        Object *ob;
        
@@ -1206,7 +1206,7 @@ static void write_objects(WriteData *wd, ListBase *idbase, int write_undo)
                        writestruct(wd, DATA, "BulletSoftBody", 1, ob->bsoft);
                        
                        write_particlesystems(wd, &ob->particlesystem);
-                       write_modifiers(wd, &ob->modifiers, write_undo);
+                       write_modifiers(wd, &ob->modifiers);
                }
                ob= ob->id.next;
        }
@@ -2320,7 +2320,7 @@ static int write_file_handle(Main *mainvar, int handle, MemFile *compare, MemFil
        write_groups   (wd, &mainvar->group);
        write_armatures(wd, &mainvar->armature);
        write_actions  (wd, &mainvar->action);
-       write_objects  (wd, &mainvar->object, (current != NULL));
+       write_objects  (wd, &mainvar->object);
        write_materials(wd, &mainvar->mat);
        write_textures (wd, &mainvar->tex);
        write_meshs    (wd, &mainvar->mesh);