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:
authorCampbell Barton <ideasman42@gmail.com>2010-09-13 10:08:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-13 10:08:26 +0400
commitbd5a62cfcb7ddf4a6c111eede3d4a496902138ee (patch)
treed6c98f9c7f580a4d09aecb417147a76b6930e3c8 /source/blender/editors/space_node/space_node.c
parent18702a9eef23e2c9ba8436194aa5536cf424bd9f (diff)
bugfix [#23068] Image editor: Update Automatically not updating the compositor.
[#23637] Replacing an image used in the compositor crashes [#23343] changes in images doesn't update compositor image nodes
Diffstat (limited to 'source/blender/editors/space_node/space_node.c')
-rw-r--r--source/blender/editors/space_node/space_node.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index d9a4dda9d6e..c94fcb52e38 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -42,6 +42,7 @@
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "BKE_node.h"
#include "ED_render.h"
#include "ED_screen.h"
@@ -158,7 +159,10 @@ static void node_init(struct wmWindowManager *wm, ScrArea *sa)
static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
{
-
+ /* note, ED_area_tag_refresh will re-execute compositor */
+ /* XXX, should edit some to check for the nodeTree type, especially NC_NODE|NA_EDITED which refreshes all types */
+ SpaceNode *snode= sa->spacedata.first;
+
/* preview renders */
switch(wmn->category) {
case NC_SCENE:
@@ -200,6 +204,20 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
if (wmn->action == NA_EDITED)
ED_area_tag_refresh(sa);
break;
+
+ case NC_IMAGE:
+ if (wmn->action == NA_EDITED) {
+ if(snode->treetype==NTREE_COMPOSIT) {
+ Scene *scene= wmn->window->screen->scene;
+
+ /* note that NodeTagIDChanged is alredy called by BKE_image_signal() on all
+ * scenes so really this is just to know if the images is used in the compo else
+ * painting on images could become very slow when the compositor is open. */
+ if(NodeTagIDChanged(scene->nodetree, wmn->reference))
+ ED_area_tag_refresh(sa);
+ }
+ }
+ break;
}
}