Merged 15170:15635 from trunk (no conflicts or even merges)
[blender.git] / source / blender / src / sequence.c
index bf519dd6e9cceb6824db6eacfe49897e76c5c358..9426548dc38c952be12b74fdb1506facb9cb7deb 100644 (file)
@@ -445,7 +445,10 @@ void reload_sequence_new_file(Sequence * seq)
                seq->strip->len = seq->len;
        } else if (seq->type == SEQ_MOVIE) {
                if(seq->anim) IMB_free_anim(seq->anim);
-               seq->anim = openanim(str, IB_rect);
+               seq->anim = openanim(
+                       str, IB_rect | 
+                       ((seq->flag & SEQ_FILTERY) 
+                        ? IB_animdeinterlace : 0));
 
                if (!seq->anim) {
                        return;
@@ -1445,7 +1448,7 @@ static void input_preprocess(Sequence * seq, TStripElem* se, int cfra)
        seq->strip->orx= se->ibuf->x;
        seq->strip->ory= se->ibuf->y;
 
-       if(seq->flag & SEQ_FILTERY) {
+       if((seq->flag & SEQ_FILTERY) && seq->type != SEQ_MOVIE) {
                IMB_filtery(se->ibuf);
        }
 
@@ -1772,8 +1775,11 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
                                        BLI_join_dirfile(name, seq->strip->dir, seq->strip->stripdata->name);
                                        BLI_convertstringcode(name, G.sce);
                                        BLI_convertstringframe(name, G.scene->r.cfra);
-                               
-                                       seq->anim = openanim(name, IB_rect);
+                                       
+                                       seq->anim = openanim(
+                                               name, IB_rect | 
+                                               ((seq->flag & SEQ_FILTERY) 
+                                                ? IB_animdeinterlace : 0));
                                }
                                if(seq->anim) {
                                        IMB_anim_set_preseek(seq->anim, seq->anim_preseek);
@@ -2374,6 +2380,16 @@ ImBuf *give_ibuf_seq(int rectx, int recty, int cfra, int chanshown)
        return i;
 }
 
+/* check used when we need to change seq->blend_mode but not to effect or audio strips */
+int seq_can_blend(Sequence *seq)
+{
+       if (ELEM4(seq->type, SEQ_IMAGE, SEQ_META, SEQ_SCENE, SEQ_MOVIE)) {
+               return 1;
+       } else {
+               return 0;
+       }
+}
+
 /* threading api */
 
 static ListBase running_threads;