[Bf-blender-cvs] [688257d] master: Fix T39435 paint overlay not always getting correctly refreshed.

Antony Riakiotakis noreply at git.blender.org
Thu Mar 27 11:17:16 CET 2014


Commit: 688257d1a28e980e058b702520aac4885668f0fd
Author: Antony Riakiotakis
Date:   Thu Mar 27 12:09:50 2014 +0200
https://developer.blender.org/rB688257d1a28e980e058b702520aac4885668f0fd

Fix T39435 paint overlay not always getting correctly refreshed.

Initialize the nodetree first, like paint stroke does.

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

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

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

diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 1a5ccc8..2c25900 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -45,6 +45,7 @@
 #include "BKE_brush.h"
 #include "BKE_context.h"
 #include "BKE_image.h"
+#include "BKE_node.h"
 #include "BKE_paint.h"
 #include "BKE_colortools.h"
 
@@ -197,6 +198,9 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
 
 		pool = BKE_image_pool_new();
 
+		if (mtex->tex && mtex->tex->nodetree)
+			ntreeTexBeginExecTree(mtex->tex->nodetree);  /* has internal flag to detect it only does it once */
+
 #pragma omp parallel for schedule(static)
 		for (j = 0; j < size; j++) {
 			int i;
@@ -272,6 +276,9 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
 			}
 		}
 
+		if (mtex->tex && mtex->tex->nodetree)
+			ntreeTexEndExecTree(mtex->tex->nodetree->execdata);
+
 		if (pool)
 			BKE_image_pool_free(pool);




More information about the Bf-blender-cvs mailing list