Revision: 15317
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15317
Author:   nicholasbishop
Date:     2008-06-22 23:06:00 +0200 (Sun, 22 Jun 2008)

Log Message:
-----------
Fixed going into editmode with unsaved disps.

Modified Paths:
--------------
    branches/soc-2008-nicholasbishop/source/blender/blenkernel/BKE_multires.h
    branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c
    branches/soc-2008-nicholasbishop/source/blender/src/editmesh.c

Modified: 
branches/soc-2008-nicholasbishop/source/blender/blenkernel/BKE_multires.h
===================================================================
--- branches/soc-2008-nicholasbishop/source/blender/blenkernel/BKE_multires.h   
2008-06-22 20:59:29 UTC (rev 15316)
+++ branches/soc-2008-nicholasbishop/source/blender/blenkernel/BKE_multires.h   
2008-06-22 21:06:00 UTC (rev 15317)
@@ -115,6 +115,8 @@
        int x, y, ax, ay;
 } MultiresDisplacer;
 
+void multires_force_update(struct Object *ob);
+
 struct DerivedMesh *multires_dm_create_from_derived(struct 
MultiresModifierData*, struct DerivedMesh*, int, int);
 
 void multiresModifier_subdivide(struct MultiresModifierData *mmd, struct Mesh 
*me);

Modified: 
branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c
===================================================================
--- 
branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c    
    2008-06-22 20:59:29 UTC (rev 15316)
+++ 
branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c    
    2008-06-22 21:06:00 UTC (rev 15317)
@@ -1702,6 +1702,15 @@
        }
 }
 
+void multires_force_update(Object *ob)
+{
+       if(ob->derivedFinal) {
+               ob->derivedFinal->needsFree =1;
+               ob->derivedFinal->release(G.obedit->derivedFinal);
+               ob->derivedFinal = NULL;
+       }
+}
+
 struct DerivedMesh *multires_dm_create_from_derived(MultiresModifierData *mmd, 
DerivedMesh *dm, int useRenderParams,
                                                    int isFinalCalc)
 {

Modified: branches/soc-2008-nicholasbishop/source/blender/src/editmesh.c
===================================================================
--- branches/soc-2008-nicholasbishop/source/blender/src/editmesh.c      
2008-06-22 20:59:29 UTC (rev 15316)
+++ branches/soc-2008-nicholasbishop/source/blender/src/editmesh.c      
2008-06-22 21:06:00 UTC (rev 15317)
@@ -892,6 +892,9 @@
        }
 #endif
 
+       /* Needed if multires mesh has been changed but updates haven't been 
stored yet */
+       multires_force_update(G.obedit);
+
        /* because of reload */
        free_editMesh(em);
        


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to