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-08-19 19:41:56 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-08-19 19:41:56 +0400
commit995a19a983b2c44ec9afec049395d7c1b4320137 (patch)
tree8333563ae983641434179839755aab67ecdc2aad /source/blender/blenloader/intern/readfile.c
parent994d75b6ae78fee99afd949292e48c4f32292995 (diff)
Sequencer: per-sequence modifier stack for color grading
This implements basic color grading modifiers in sequencer, supporting color balance, RGB curves and HUE corrections. Implementation is close to object modifiers, some details are there: http://wiki.blender.org/index.php/User:Nazg-gul/SequencerModifiers Modifiers supports multi-threaded calculation, masks and instant parameter changes. Also added cache for pre-processed image buffers for current frame, so changing sequence properties does not require rendering of original sequence (like rendering scene, loading file from disk and so)
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e7722e07442..eb22b9a2e2e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4785,6 +4785,16 @@ static void link_paint(FileData *fd, Scene *sce, Paint *p)
}
}
+static void lib_link_sequence_modifiers(FileData *fd, Scene *scene, ListBase *lb)
+{
+ SequenceModifierData *smd;
+
+ for (smd = lb->first; smd; smd = smd->next) {
+ if (smd->mask_id)
+ smd->mask_id = newlibadr_us(fd, scene->id.lib, smd->mask_id);
+ }
+}
+
static void lib_link_scene(FileData *fd, Main *main)
{
Scene *sce;
@@ -4869,6 +4879,8 @@ static void lib_link_scene(FileData *fd, Main *main)
}
}
seq->anim = NULL;
+
+ lib_link_sequence_modifiers(fd, sce, &seq->modifiers);
}
SEQ_END
@@ -4925,6 +4937,29 @@ static void direct_link_paint(FileData *fd, Paint **paint)
(*paint)->num_input_samples = 1;
}
+static void direct_link_sequence_modifiers(FileData *fd, ListBase *lb)
+{
+ SequenceModifierData *smd;
+
+ link_list(fd, lb);
+
+ for (smd = lb->first; smd; smd = smd->next) {
+ if (smd->mask_sequence)
+ smd->mask_sequence = newdataadr(fd, smd->mask_sequence);
+
+ if (smd->type == seqModifierType_Curves) {
+ CurvesModifierData *cmd = (CurvesModifierData *) smd;
+
+ direct_link_curvemapping(fd, &cmd->curve_mapping);
+ }
+ else if (smd->type == seqModifierType_HueCorrect) {
+ HueCorrectModifierData *hcmd = (HueCorrectModifierData *) smd;
+
+ direct_link_curvemapping(fd, &hcmd->curve_mapping);
+ }
+ }
+}
+
static void direct_link_scene(FileData *fd, Scene *sce)
{
Editing *ed;
@@ -5037,6 +5072,8 @@ static void direct_link_scene(FileData *fd, Scene *sce)
// seq->strip->color_balance->gui = 0; // XXX - peter, is this relevant in 2.5?
}
}
+
+ direct_link_sequence_modifiers(fd, &seq->modifiers);
}
SEQ_END