diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-05 18:44:29 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-05 18:44:29 +0400 |
commit | 39da85800161d91b6c0d6408a7c6e34c297d624a (patch) | |
tree | 7273d64e3079c391e51db317c7ff45a1715099ec /source/blender/makesrna/intern/rna_color.c | |
parent | 964f29797b1e5ea938319da14a3cc8f22595fcb0 (diff) |
Sequencer: input color space support for image and movie strips
Diffstat (limited to 'source/blender/makesrna/intern/rna_color.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index c93d2ef15cf..f534864e65a 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -45,6 +45,7 @@ #include "DNA_material_types.h" #include "DNA_movieclip_types.h" #include "DNA_node_types.h" +#include "DNA_sequence_types.h" #include "MEM_guardedalloc.h" @@ -53,6 +54,7 @@ #include "BKE_image.h" #include "BKE_movieclip.h" #include "BKE_node.h" +#include "BKE_sequencer.h" #include "BKE_texture.h" #include "ED_node.h" @@ -504,6 +506,37 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain) WM_main_add_notifier(NC_MOVIECLIP | ND_DISPLAY, &clip->id); WM_main_add_notifier(NC_MOVIECLIP | NA_EDITED, &clip->id); } + else if (GS(id->name) == ID_SCE) { + Scene *scene = (Scene *) id; + + if (scene->ed) { + ColorManagedColorspaceSettings *colorspace_settings = (ColorManagedColorspaceSettings *) ptr->data; + Sequence *seq; + int seq_found = FALSE; + + if (&scene->sequencer_colorspace_settings != colorspace_settings) { + SEQ_BEGIN(scene->ed, seq); + { + if (seq->strip && &seq->strip->colorspace_settings == colorspace_settings) { + seq_found = TRUE; + break; + } + } + SEQ_END; + } + + if (seq_found) { + BKE_sequence_invalidate_cache(scene, seq); + BKE_sequencer_preprocessed_cache_cleanup_sequence(seq); + } + else { + BKE_sequencer_cache_cleanup(); + BKE_sequencer_preprocessed_cache_cleanup(); + } + + WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); + } + } } static void rna_ColorManagement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) |