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:
authorPeter Schlaile <peter@schlaile.de>2011-05-16 21:14:47 +0400
committerPeter Schlaile <peter@schlaile.de>2011-05-16 21:14:47 +0400
commit70b832589a2bb90fbed2106f30d34d77f49d2010 (patch)
tree847e9fb95d4a8c153963de73c34ef3889a5ac014 /source/blender/editors/space_sequencer
parentb434e7f93337f65909c003ce865cc34f167c3973 (diff)
[PATCH] == Sequencer ==
This patch adds adjustment layer tracks to the sequencer and does some cleaning up of the code. What's an adjustment layer? Think of it as an effect track, which takes no explicit input, but alters the output of everything down the layer stack. So: you can add several stages of color correction with it. And: you can even use it with metastrips to group several adjustments together.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c5
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c5
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c16
3 files changed, 11 insertions, 15 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 77901f7fd29..ad0d0048388 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -633,12 +633,13 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
BKE_reportf(op->reports, RPT_ERROR, "Sequencer plugin \"%s\" could not load.", path);
return OPERATOR_CANCELLED;
}
- }
- else if (seq->type==SEQ_COLOR) {
+ } else if (seq->type == SEQ_COLOR) {
SolidColorVars *colvars= (SolidColorVars *)seq->effectdata;
RNA_float_get_array(op->ptr, "color", colvars->col);
seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */
+ } else if (seq->type == SEQ_ADJUSTMENT) {
+ seq->blend_mode= SEQ_CROSS;
}
// XXX, this conflicts with giving a channel with invoke, perhaps we should have an active channel
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 2f95e8fa64c..f351d52db07 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -126,6 +126,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
case SEQ_OVERDROP:
case SEQ_GLOW:
case SEQ_MULTICAM:
+ case SEQ_ADJUSTMENT:
UI_GetThemeColor3ubv(TH_SEQ_EFFECT, col);
/* slightly offset hue to distinguish different effects */
@@ -137,6 +138,8 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
if (seq->type == SEQ_OVERDROP) rgb_byte_set_hue_float_offset(col,0.24);
if (seq->type == SEQ_GLOW) rgb_byte_set_hue_float_offset(col,0.28);
if (seq->type == SEQ_TRANSFORM) rgb_byte_set_hue_float_offset(col,0.36);
+ if (seq->type == SEQ_MULTICAM) rgb_byte_set_hue_float_offset(col,0.32);
+ if (seq->type == SEQ_ADJUSTMENT) rgb_byte_set_hue_float_offset(col,0.40);
break;
case SEQ_COLOR:
@@ -476,7 +479,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
if(name[0]=='\0')
name= give_seqname(seq);
- if(seq->type == SEQ_META) {
+ if(seq->type == SEQ_META || seq->type == SEQ_ADJUSTMENT) {
sprintf(str, "%d | %s", seq->len, name);
}
else if(seq->type == SEQ_SCENE) {
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 6d74ba07005..880f285c3e3 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -100,6 +100,7 @@ EnumPropertyItem sequencer_prop_effect_types[] = {
{SEQ_COLOR, "COLOR", 0, "Color", "Color effect strip type"},
{SEQ_SPEED, "SPEED", 0, "Speed", "Color effect strip type"},
{SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
+ {SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -406,6 +407,7 @@ int event_to_efftype(int event)
if(event==15) return SEQ_TRANSFORM;
if(event==16) return SEQ_COLOR;
if(event==17) return SEQ_SPEED;
+ if(event==18) return SEQ_ADJUSTMENT;
return 0;
}
@@ -517,7 +519,8 @@ static void change_sequence(Scene *scene)
"|Glow%x14"
"|Transform%x15"
"|Color Generator%x16"
- "|Speed Control%x17");
+ "|Speed Control%x17"
+ "|Adjustment Layer%x18");
if(event > 0) {
if(event==1) {
SWAP(Sequence *,last_seq->seq1,last_seq->seq2);
@@ -703,15 +706,9 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de
while(seq) {
seqn= seq->next;
if((seq->flag & flag) || deleteall) {
- if(seq->type==SEQ_SOUND && seq->sound) {
- ((ID *)seq->sound)->us--; /* TODO, could be moved into seq_free_sequence() */
- }
-
BLI_remlink(lb, seq);
if(seq==last_seq) seq_active_set(scene, NULL);
if(seq->type==SEQ_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1);
- /* if(seq->ipo) seq->ipo->id.us--; */
- /* XXX, remove fcurve */
seq_free_sequence(scene, seq);
}
seq= seqn;
@@ -1706,11 +1703,6 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op))
if (nothingSelected)
return OPERATOR_FINISHED;
- /* free imbufs of all dependent strips */
- for(seq=ed->seqbasep->first; seq; seq=seq->next)
- if(seq->flag & SELECT)
- update_changed_seq_and_deps(scene, seq, 1, 0);
-
/* for effects, try to find a replacement input */
for(seq=ed->seqbasep->first; seq; seq=seq->next)
if((seq->type & SEQ_EFFECT) && !(seq->flag & SELECT))