[Bf-blender-cvs] [edc4089] cycles-ptex-24: Hacky fix for saving texpaint ptex changes

Nicholas Bishop noreply at git.blender.org
Fri Jan 30 18:00:50 CET 2015


Commit: edc4089485d3a5a05afb503bc1cb0b34d05c4018
Author: Nicholas Bishop
Date:   Tue Jan 27 00:07:49 2015 +0100
Branches: cycles-ptex-24
https://developer.blender.org/rBedc4089485d3a5a05afb503bc1cb0b34d05c4018

Hacky fix for saving texpaint ptex changes

===================================================================

M	source/blender/editors/sculpt_paint/paint_image_proj.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index cc5cf9d..cca66c6 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -74,6 +74,7 @@
 #include "BKE_mesh_mapping.h"
 #include "BKE_node.h"
 #include "BKE_paint.h"
+#include "BKE_ptex.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
 #include "BKE_texture.h"
@@ -3815,6 +3816,12 @@ static void project_paint_end(ProjPaintState *ps)
 		MEM_freeN((void *)ps->tile_lock);
 	}
 	if (ps->dm_mtface_ptex) {
+		Mesh *me = ps->ob->data;
+		MLoopPtex *loop_ptex = CustomData_get_layer(&me->ldata, CD_LOOP_PTEX);
+
+		// TODO
+		BKE_ptex_update_from_image(loop_ptex, me->totloop);
+
 		MEM_freeN(ps->dm_mtface_ptex);
 		ps->dm_mtface_ptex = NULL;
 	}




More information about the Bf-blender-cvs mailing list