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-11-05 18:44:29 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-11-05 18:44:29 +0400
commit39da85800161d91b6c0d6408a7c6e34c297d624a (patch)
tree7273d64e3079c391e51db317c7ff45a1715099ec /source/blender/makesrna/intern
parent964f29797b1e5ea938319da14a3cc8f22595fcb0 (diff)
Sequencer: input color space support for image and movie strips
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_color.c33
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c12
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c2
3 files changed, 47 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)
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 054d0cc82c6..c2fa64698e4 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1688,6 +1688,16 @@ static void rna_def_effect_inputs(StructRNA *srna, int count)
#endif
}
+static void rna_def_color_management(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "strip->colorspace_settings");
+ RNA_def_property_struct_type(prop, "ColorManagedColorspaceSettings");
+ RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
+}
+
static void rna_def_image(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1714,6 +1724,7 @@ static void rna_def_image(BlenderRNA *brna)
rna_def_filter_video(srna);
rna_def_proxy(srna);
rna_def_input(srna);
+ rna_def_color_management(srna);
}
static void rna_def_meta(BlenderRNA *brna)
@@ -1799,6 +1810,7 @@ static void rna_def_movie(BlenderRNA *brna)
rna_def_filter_video(srna);
rna_def_proxy(srna);
rna_def_input(srna);
+ rna_def_color_management(srna);
}
static void rna_def_movieclip(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 8ddb9d0a7e7..7602ec99c2b 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -89,6 +89,8 @@ static Sequence *alloc_generic_sequence(Editing *ed, const char *name, int start
if (file) {
strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem");
BLI_split_dirfile(file, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name));
+
+ BKE_sequence_init_colorspace(seq);
}
else {
strip->stripdata = NULL;