From 2153c663be809eca6b30fa042c88751692175dc7 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 16 Nov 2010 13:41:39 +0000 Subject: [PATCH] Bug #22585 Using texture nodes for displacement crashes, a conflict between using nodes in render and for displacement at same time. Code simply disables texture nodes for displacement for now, until we have better handling for it. (on our long todo) --- source/blender/render/intern/source/texture.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index b7ef64ba98e..843f05f3766 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -1348,9 +1348,16 @@ int multitex_mtex(ShadeInput *shi, MTex *mtex, float *texvec, float *dxt, float /* Warning, if the texres's values are not declared zero, check the return value to be sure * the color values are set before using the r/g/b values, otherwise you may use uninitialized values - Campbell */ +/* extern-tex doesn't support nodes (ntreeBeginExec() can't be called when rendering is going on) */ int multitex_ext(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexResult *texres) { - return multitex_nodes(tex, texvec, dxt, dyt, osatex, texres, 0, 0, NULL, NULL); + int use_nodes= tex->use_nodes, retval; + + tex->use_nodes= 0; + retval= multitex_nodes(tex, texvec, dxt, dyt, osatex, texres, 0, 0, NULL, NULL); + tex->use_nodes= use_nodes; + + return retval; } /* ------------------------------------------------------------------------- */