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>2009-01-27 20:12:40 +0300
committerTon Roosendaal <ton@blender.org>2009-01-27 20:12:40 +0300
commitc0ee40ab1077de07741344b163ccd8de046db0fe (patch)
tree8469c10210578f650141ce0717212a4a608db806 /source/blender/editors/space_node/node_draw.c
parentb602fd8b1c7c3f492ba91ff7dc85a0aafd5c3ee7 (diff)
2.5
Compositor now uses threaded jobs. - updates happen per preview node! Check this file for fun: http://www.blender.org/bf/composite_image.blend (any compo node could get preview!) - had to ensure the composite data gets fully copied before it executes thread, so editing is not frustrated. - put back node buttons (missing init) - added WM_jobs api call to check for running job, illustrated with red light icon in 'use nodes' button. - added another callback to WM_jobs, to initialize. use this init to ensure you only do it when job really starts. - added an extra notifier option for WM_jobs, to signal finished job (like redraw image view) - fixed file read error, it copied the screen it read, instead of using it. - commented out annoying prints for missing ops in imagewin
Diffstat (limited to 'source/blender/editors/space_node/node_draw.c')
-rw-r--r--source/blender/editors/space_node/node_draw.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 11f760bb882..30b4bf86b68 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -612,11 +612,34 @@ static void do_node_internal_buttons(bContext *C, void *node_v, int event)
SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
if(event==B_NODE_EXEC) {
- if(snode->treetype==NTREE_SHADER)
+ if(snode->treetype==NTREE_SHADER) {
WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, snode->id);
+ }
+ else if(snode->treetype==NTREE_COMPOSIT) {
+ bNode *node= node_v;
+
+ NodeTagChanged(snode->edittree, node);
+ /* don't use NodeTagIDChanged, it gives far too many recomposites for image, scene layers, ... */
+
+ /* not the best implementation of the world... but we need it to work now :) */
+ if(node->type==CMP_NODE_R_LAYERS && node->custom2) {
+ /* add event for this window (after render curarea can be changed) */
+ //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC);
+
+ //composite_node_render(snode, node);
+ //snode_handle_recalc(snode);
+
+ /* add another event, a render can go fullscreen and open new window */
+ //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC);
+ }
+ else {
+ node= snode_get_editgroup(snode);
+ if(node)
+ NodeTagIDChanged(snode->nodetree, node->id);
+ }
+ WM_event_add_notifier(C, NC_SCENE|ND_NODES, CTX_data_scene(C));
+ }
- // else if(snode->treetype==NTREE_COMPOSIT)
- // composit_node_event(snode, val);
// else if(snode->treetype==NTREE_TEXTURE)
// texture_node_event(snode, val);
}