Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2010-08-02 07:03:54 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2010-08-02 07:03:54 +0400
commitd4f91858f2c681cdae753876d7ddc81d9701beaf (patch)
tree2d21e5e11aeaebfee2ebdc5ff1189a0a2c01069f
parentddcfb4601a7f149db15ea812672ed5e44139a97b (diff)
== VPaint ==
Bugfix: force update multires vpaint before saving the file
-rw-r--r--source/blender/editors/include/ED_sculpt.h2
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c9
-rw-r--r--source/blender/windowmanager/intern/wm_files.c2
3 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index a36ccb1cf0e..3124c69f227 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -39,7 +39,6 @@ struct wmWindowManager;
/* 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 @@ void paint_layer_undo_set_remove(PaintLayerUndoNode *unode, char *name,
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
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 8b98e97dc1c..4e79ed28357 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -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);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 04f5175b1bf..b29455551af 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -613,7 +613,7 @@ int WM_write_file(bContext *C, char *target, int fileflags, ReportList *reports,
}
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);