[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29916] trunk/blender/source/blender: sequencer
Campbell Barton
ideasman42 at gmail.com
Sun Jul 4 10:49:54 CEST 2010
Revision: 29916
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29916
Author: campbellbarton
Date: 2010-07-04 10:49:54 +0200 (Sun, 04 Jul 2010)
Log Message:
-----------
sequencer
- effects strips now add directly above the strips they operate on (almost always what you want)
- blend mode for new image/movie/scene/color strips is now cross: without this adjusting alpha will fade to black rather then the strip below.
- SEQ_HAS_PATH macro didnt include sound-ram or sound-hd
- meta drawing code has misleading variable names (from own commit).
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/sequencer.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
trunk/blender/source/blender/makesdna/DNA_sequence_types.h
trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/sequencer.c 2010-07-04 08:27:23 UTC (rev 29915)
+++ trunk/blender/source/blender/blenkernel/intern/sequencer.c 2010-07-04 08:49:54 UTC (rev 29916)
@@ -3994,6 +3994,7 @@
seq = alloc_sequence(seqbasep, seq_load->start_frame, seq_load->channel);
seq->type= SEQ_IMAGE;
+ seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */
/* basic defaults */
seq->strip= strip= MEM_callocN(sizeof(Strip), "strip");
@@ -4085,8 +4086,9 @@
return NULL;
seq = alloc_sequence(seqbasep, seq_load->start_frame, seq_load->channel);
+ seq->type= SEQ_MOVIE;
+ seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */
- seq->type= SEQ_MOVIE;
seq->anim= an;
seq->anim_preseek = IMB_anim_get_preseek(an);
BLI_strncpy(seq->name+2, "Movie", SEQ_NAME_MAXSTR-2);
Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c 2010-07-04 08:27:23 UTC (rev 29915)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c 2010-07-04 08:49:54 UTC (rev 29916)
@@ -213,8 +213,9 @@
}
seq = alloc_sequence(ed->seqbasep, start_frame, channel);
-
seq->type= SEQ_SCENE;
+ seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */
+
seq->scene= sce_seq;
seq->sfra= sce_seq->r.sfra;
@@ -544,7 +545,7 @@
type= RNA_enum_get(op->ptr, "type");
- // XXX We need unique names and move to invoke
+ // XXX move to invoke
if(!seq_effect_find_selected(scene, NULL, type, &seq1, &seq2, &seq3, &error_msg)) {
BKE_report(op->reports, RPT_ERROR, error_msg);
return OPERATOR_CANCELLED;
@@ -603,8 +604,20 @@
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 */
+
}
+ // XXX, this conflicts with giving a channel with invoke, perhaps we should have an active channel
+ // but for now this is much more usable
+ if(seq->seq1 || seq->seq2 || seq->seq3) {
+ int chan= MAX3( seq->seq1 ? seq->seq1->machine : 0,
+ seq->seq2 ? seq->seq2->machine : 0,
+ seq->seq3 ? seq->seq3->machine : 0);
+ if(chan < MAXSEQ)
+ seq->machine= chan;
+ }
+
if(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
update_changed_seq_and_deps(scene, seq, 1, 1); /* runs calc_sequence */
Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c 2010-07-04 08:27:23 UTC (rev 29915)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c 2010-07-04 08:49:54 UTC (rev 29916)
@@ -246,31 +246,31 @@
for (seq= seqm->seqbase.first; seq; seq= seq->next) {
if((seq->startdisp > x2 || seq->enddisp < x1) == 0) {
- float ym= (seq->machine - chan_min) / (float)(chan_range) * draw_range;
+ float y_chan= (seq->machine - chan_min) / (float)(chan_range) * draw_range;
+ float x1_chan= seq->startdisp;
+ float x2_chan= seq->enddisp;
+ float y1_chan, y2_chan;
- float x1m= seq->startdisp;
- float x2m= seq->enddisp;
- float y1m, y2m;
-
if((seqm->flag & SEQ_MUTE) == 0 && (seq->flag & SEQ_MUTE))
drawmeta_stipple(1);
-
+
get_seq_color3ubv(scene, seq, col);
glColor4ubv((GLubyte *)col);
- if(x1m < x1) x1m= x1;
- if(x2m > x2) x2m= x2;
-
- y1m= y1 + ym + (draw_height * SEQ_STRIP_OFSBOTTOM);
- y2m= y1 + ym + (draw_height * SEQ_STRIP_OFSTOP);
+ /* clamp within parent sequence strip bounds */
+ if(x1_chan < x1) x1_chan= x1;
+ if(x2_chan > x2) x2_chan= x2;
- glRectf(x1m, y1m, x2m, y2m);
+ y1_chan= y1 + y_chan + (draw_height * SEQ_STRIP_OFSBOTTOM);
+ y2_chan= y1 + y_chan + (draw_height * SEQ_STRIP_OFSTOP);
+ glRectf(x1_chan, y1_chan, x2_chan, y2_chan);
+
UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -30);
glColor4ubv((GLubyte *)col);
- fdrawbox(x1m, y1m, x2m, y2m);
-
+ fdrawbox(x1_chan, y1_chan, x2_chan, y2_chan);
+
if((seqm->flag & SEQ_MUTE) == 0 && (seq->flag & SEQ_MUTE))
drawmeta_stipple(0);
}
Modified: trunk/blender/source/blender/makesdna/DNA_sequence_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_sequence_types.h 2010-07-04 08:27:23 UTC (rev 29915)
+++ trunk/blender/source/blender/makesdna/DNA_sequence_types.h 2010-07-04 08:49:54 UTC (rev 29916)
@@ -324,7 +324,8 @@
otherwise, you can't really blend, right :) !)
*/
-#define SEQ_HAS_PATH(_seq) ( (_seq)->type==SEQ_MOVIE || (_seq)->type==SEQ_IMAGE || (_seq)->type==SEQ_SOUND )
+#define SEQ_HAS_PATH(_seq) (ELEM5((_seq)->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_RAM_SOUND, SEQ_HD_SOUND))
+
#endif
Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c 2010-07-04 08:27:23 UTC (rev 29915)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer.c 2010-07-04 08:49:54 UTC (rev 29916)
@@ -308,8 +308,8 @@
case SEQ_MUL:
case SEQ_OVERDROP:
return &RNA_EffectSequence;
- case SEQ_MULTICAM:
- return &RNA_MulticamSequence;
+ case SEQ_MULTICAM:
+ return &RNA_MulticamSequence;
case SEQ_PLUGIN:
return &RNA_PluginSequence;
case SEQ_WIPE:
More information about the Bf-blender-cvs
mailing list