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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-10-18 13:48:51 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-10-18 13:48:51 +0400
commit3086300149464dae8f419cd2066afb5ffd34af56 (patch)
tree79bb206031ebee331115e2fad73eb9adc96dcd7a
parent812b17f306289e657c8df4daf303cc70e978be97 (diff)
Fix #32896: No compositor tree update with image input color space change
-rw-r--r--source/blender/blenkernel/intern/movieclip.c12
-rw-r--r--source/blender/editors/space_node/space_node.c9
-rw-r--r--source/blender/makesrna/intern/rna_color.c4
3 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 6f1c8d952de..4bd6676608e 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -1091,6 +1091,18 @@ void BKE_movieclip_reload(MovieClip *clip)
movieclip_load_get_szie(clip);
movieclip_calc_length(clip);
+
+ /* same as for image update -- don't use notifiers because they are not 100% sure to succeeded
+ * (node trees which are not currently visible wouldn't be refreshed)
+ */
+ {
+ Scene *scene;
+ for (scene = G.main->scene.first; scene; scene = scene->id.next) {
+ if (scene->nodetree) {
+ nodeUpdateID(scene->nodetree, &clip->id);
+ }
+ }
+ }
}
void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClipScopes *scopes)
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index b70d66f60b4..76d1357a83c 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -254,6 +254,15 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
}
}
break;
+
+ case NC_MOVIECLIP:
+ if (wmn->action == NA_EDITED) {
+ if (type == NTREE_COMPOSIT) {
+ if (nodeUpdateID(snode->nodetree, wmn->reference))
+ ED_area_tag_refresh(sa);
+ }
+ }
+ break;
}
}
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 7fb4a1d3839..1ba2fc1ee7e 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -475,13 +475,17 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain)
Image *ima = (Image *) id;
BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
+
WM_main_add_notifier(NC_IMAGE | ND_DISPLAY, &ima->id);
+ WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id);
}
else if (GS(id->name) == ID_MC) {
MovieClip *clip = (MovieClip *) id;
BKE_movieclip_reload(clip);
+
WM_main_add_notifier(NC_MOVIECLIP | ND_DISPLAY, &clip->id);
+ WM_main_add_notifier(NC_MOVIECLIP | NA_EDITED, &clip->id);
}
}