forked from bartvdbraak/blender
Fix T39435 paint overlay not always getting correctly refreshed.
Initialize the nodetree first, like paint stroke does.
This commit is contained in:
parent
eca6264ab0
commit
688257d1a2
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user