Fix T39472: Changing Sequencer color space repeatedly changes movie strip's display gamma

Issue was caused by the old color space settings being lurking around
seq->anim after the changes in color space settings.
This commit is contained in:
Sergey Sharybin 2014-03-28 13:58:39 +06:00
parent 93c896d53b
commit 6babbf59bc
Notes: blender-bot 2023-02-14 10:53:20 +01:00
Referenced by issue #39472, Changing Sequencer color space repeatedly changes movie strip's display gamma
1 changed files with 15 additions and 0 deletions

View File

@ -62,6 +62,7 @@
#include "ED_node.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
static int rna_CurveMapping_curves_length(PointerRNA *ptr)
{
@ -609,10 +610,24 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain)
}
if (seq_found) {
if (seq->anim) {
IMB_free_anim(seq->anim);
seq->anim = NULL;
}
BKE_sequence_invalidate_cache(scene, seq);
BKE_sequencer_preprocessed_cache_cleanup_sequence(seq);
}
else {
SEQ_BEGIN(scene->ed, seq);
{
if (seq->anim) {
IMB_free_anim(seq->anim);
seq->anim = NULL;
}
}
SEQ_END;
BKE_sequencer_cache_cleanup();
BKE_sequencer_preprocessed_cache_cleanup();
}