diff options
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index eab483642bc..b3e24a9d6ed 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -128,25 +128,30 @@ static void compo_tag_output_nodes(bNodeTree *nodetree, int recalc_flags) static int compo_get_recalc_flags(const bContext *C) { - bScreen *sc = CTX_wm_screen(C); - ScrArea *sa; + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *win; int recalc_flags = 0; - for (sa = sc->areabase.first; sa; sa = sa->next) { - if (sa->spacetype == SPACE_IMAGE) { - SpaceImage *sima = sa->spacedata.first; - if (sima->image) { - if (sima->image->type == IMA_TYPE_R_RESULT) - recalc_flags |= COM_RECALC_COMPOSITE; - else if (sima->image->type == IMA_TYPE_COMPOSITE) + for (win = wm->windows.first; win; win = win->next) { + bScreen *sc = win->screen; + ScrArea *sa; + + for (sa = sc->areabase.first; sa; sa = sa->next) { + if (sa->spacetype == SPACE_IMAGE) { + SpaceImage *sima = sa->spacedata.first; + if (sima->image) { + if (sima->image->type == IMA_TYPE_R_RESULT) + recalc_flags |= COM_RECALC_COMPOSITE; + else if (sima->image->type == IMA_TYPE_COMPOSITE) + recalc_flags |= COM_RECALC_VIEWER; + } + } + else if (sa->spacetype == SPACE_NODE) { + SpaceNode *snode = sa->spacedata.first; + if (snode->flag & SNODE_BACKDRAW) recalc_flags |= COM_RECALC_VIEWER; } } - else if (sa->spacetype == SPACE_NODE) { - SpaceNode *snode = sa->spacedata.first; - if (snode->flag & SNODE_BACKDRAW) - recalc_flags |= COM_RECALC_VIEWER; - } } return recalc_flags; |