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-12-08 16:19:27 +0300
committerTon Roosendaal <ton@blender.org>2010-12-08 16:19:27 +0300
commite5a9dd928a943e818a73ef20f8bf952967b70514 (patch)
tree4ecb413fc1b254b8d472cd9626da1572aa6aa868 /source/blender/nodes/intern/CMP_nodes/CMP_texture.c
parent02f4003184b071121079cf4d8ab76ebd7c2894ef (diff)
Bugfix #25086
The texture node is procedural; like RGB node it has no real buffers, but allows per-pixel reading. The compositor uses nodes that directly access buffers too, which conflicts with it... needs more design here. Restored old functionality that just passes on preview size buffers for nodes to prevent crashes. Giving it a render-size buffer is not nice; the resolution-independence of texture nodes is interesting to keep. Solution could be: - visually tag input/output sockets for this case (sockets with buffers, vs sockets with values), so users know what to expect.
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_texture.c')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_texture.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
index 7ddd8b96ae2..77c71ad7e3a 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
@@ -106,11 +106,10 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
VECCOPY(prevbuf->procedural_size, in[1]->vec);
prevbuf->procedural_type= CB_RGBA;
composit1_pixel_processor(node, prevbuf, prevbuf, out[0]->vec, do_copy_rgba, CB_RGBA);
- generate_preview(data, node, prevbuf);
- free_compbuf(prevbuf);
+ /* texture is procedural node, like RGBA node, we give it fake buffer for nodes that don't check it */
if(out[0]->hasoutput) {
- CompBuf *stackbuf= alloc_compbuf(sizex, sizey, CB_VAL, 0); /* no buffer alloc */
+ CompBuf *stackbuf= dupalloc_compbuf(prevbuf); /* buffer alloc */
stackbuf->rect_procedural= texture_procedural;
stackbuf->node= node;
@@ -121,7 +120,7 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
out[0]->data= stackbuf;
}
if(out[1]->hasoutput) {
- CompBuf *stackbuf= alloc_compbuf(sizex, sizey, CB_RGBA, 0); /* no buffer alloc */
+ CompBuf *stackbuf= dupalloc_compbuf(prevbuf); /* buffer alloc */
stackbuf->rect_procedural= texture_procedural;
stackbuf->node= node;
@@ -131,6 +130,9 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
out[1]->data= stackbuf;
}
+
+ generate_preview(data, node, prevbuf);
+ free_compbuf(prevbuf);
}
}