Revision: 30963
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30963
Author:   nicholasbishop
Date:     2010-08-02 05:03:54 +0200 (Mon, 02 Aug 2010)

Log Message:
-----------
== VPaint ==

Bugfix: force update multires vpaint before saving the file

Modified Paths:
--------------
    branches/soc-2010-nicolasbishop/source/blender/editors/include/ED_sculpt.h
    
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_utils.c
    
branches/soc-2010-nicolasbishop/source/blender/windowmanager/intern/wm_files.c

Modified: 
branches/soc-2010-nicolasbishop/source/blender/editors/include/ED_sculpt.h
===================================================================
--- branches/soc-2010-nicolasbishop/source/blender/editors/include/ED_sculpt.h  
2010-08-02 03:01:37 UTC (rev 30962)
+++ branches/soc-2010-nicolasbishop/source/blender/editors/include/ED_sculpt.h  
2010-08-02 03:03:54 UTC (rev 30963)
@@ -39,7 +39,6 @@
 
 /* sculpt.c */
 void ED_operatortypes_sculpt(void);
-void ED_sculpt_force_update(struct bContext *C);
 
 /* paint_ops.c */
 void ED_operatortypes_paint(void);
@@ -63,6 +62,7 @@
 struct MultiresModifierData *ED_paint_multires_active(struct Scene *scene, 
struct Object *ob);
 void paint_get_redraw_planes(float planes[4][4], struct ARegion *ar,
                             struct RegionView3D *rv3d, struct Object *ob);
+void ED_paint_force_update(struct bContext *C);
 
 
 #endif

Modified: 
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_utils.c
===================================================================
--- 
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_utils.c
   2010-08-02 03:01:37 UTC (rev 30962)
+++ 
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_utils.c
   2010-08-02 03:03:54 UTC (rev 30963)
@@ -20,6 +20,7 @@
 #include "BKE_DerivedMesh.h"
 #include "BKE_global.h"
 #include "BKE_modifier.h"
+#include "BKE_multires.h"
 #include "BKE_paint.h"
 
 #include "BKE_utildefines.h"
@@ -43,6 +44,14 @@
 
 /* 3D Paint */
 
+void ED_paint_force_update(bContext *C)
+{
+       Object *ob= CTX_data_active_object(C);
+
+       if(ob && (ob->mode & (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT)))
+               multires_force_update(ob);
+}
+
 static void imapaint_project(Object *ob, float *model, float *proj, float *co, 
float *pco)
 {
        VECCOPY(pco, co);

Modified: 
branches/soc-2010-nicolasbishop/source/blender/windowmanager/intern/wm_files.c
===================================================================
--- 
branches/soc-2010-nicolasbishop/source/blender/windowmanager/intern/wm_files.c  
    2010-08-02 03:01:37 UTC (rev 30962)
+++ 
branches/soc-2010-nicolasbishop/source/blender/windowmanager/intern/wm_files.c  
    2010-08-02 03:03:54 UTC (rev 30963)
@@ -613,7 +613,7 @@
        }
        
        ED_object_exit_editmode(C, EM_DO_UNDO);
-       ED_sculpt_force_update(C);
+       ED_paint_force_update(C);
 
        /* blend file thumbnail */
        ibuf_thumb= blend_file_thumb(di, CTX_data_scene(C), &thumb);


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

Reply via email to