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:
authorTon Roosendaal <ton@blender.org>2010-11-16 16:41:39 +0300
committerTon Roosendaal <ton@blender.org>2010-11-16 16:41:39 +0300
commit2153c663be809eca6b30fa042c88751692175dc7 (patch)
tree9b4e362bc3229aa794d1bfdb4b66738906378b3e /source/blender
parent3ad21a8b4c1f94d0d4adf8d8619e8e6eaf207368 (diff)
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)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/render/intern/source/texture.c9
1 files changed, 8 insertions, 1 deletions
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;
}
/* ------------------------------------------------------------------------- */