== Sequencer ==
[blender.git] / source / blender / src / editseq.c
index adfe3205f920423e2a75b05808b6923204d054ac..ec7d14c980bdb104d01fd1f3fbd30a0ffe975a93 100644 (file)
@@ -1046,6 +1046,7 @@ static int event_to_efftype(int event)
        if(event==14) return SEQ_GLOW;
        if(event==15) return SEQ_TRANSFORM;
        if(event==16) return SEQ_COLOR;
+       if(event==17) return SEQ_SPEED;
        return 0;
 }
 
@@ -1345,6 +1346,9 @@ void add_sequence(int type)
                case SEQ_COLOR:
                        event = 16;
                        break;
+               case SEQ_SPEED:
+                       event = 17;
+                       break;
                default:
                        event = 0;
                        break;
@@ -1374,7 +1378,8 @@ void add_sequence(int type)
                               "|Wipe%x13"
                               "|Glow%x14"
                               "|Transforms%x15"
-                              "|Color Generator%x16");
+                              "|Color Generator%x16"
+                              "|Speed Control%x17");
        }
 
        if(event<1) return;
@@ -1454,6 +1459,7 @@ void add_sequence(int type)
        case 14:
        case 15:
        case 16:
+       case 17:
                if(get_last_seq()==0 && 
                   get_sequence_effect_num_inputs( event_to_efftype(event))> 0)
                        error("Need at least one active sequence strip");
@@ -1499,7 +1505,8 @@ void change_sequence(void)
                                "|Wipe%x13"
                                "|Glow%x14"
                                "|Transform%x15"
-                               "|Color Generator%x16");
+                               "|Color Generator%x16"
+                               "|Speed Control%x17");
                if(event > 0) {
                        if(event==1) {
                                SWAP(Sequence *,last_seq->seq1,last_seq->seq2);
@@ -1982,7 +1989,7 @@ void make_meta(void)
        Sequence *seq, *seqm, *next;
        Editing *ed;
        int tot;
-
+       
        ed= G.scene->ed;
        if(ed==0) return;
 
@@ -2008,15 +2015,21 @@ void make_meta(void)
        while(seq) {
                if(seq->flag & SELECT) {
                        if(seq->type & SEQ_EFFECT) {
-                               if((seq->seq1->flag & SELECT)==0) tot= 0;
-                               if((seq->seq2->flag & SELECT)==0) tot= 0;
-                               if((seq->seq3->flag & SELECT)==0) tot= 0;
+                               if(seq->seq1 && 
+                                  (seq->seq1->flag & SELECT)==0) tot= 0;
+                               if(seq->seq2 &&
+                                  (seq->seq2->flag & SELECT)==0) tot= 0;
+                               if(seq->seq3 &&
+                                  (seq->seq3->flag & SELECT)==0) tot= 0;
                        }
                }
                else if(seq->type & SEQ_EFFECT) {
-                       if(seq->seq1->flag & SELECT) tot= 0;
-                       if(seq->seq2->flag & SELECT) tot= 0;
-                       if(seq->seq3->flag & SELECT) tot= 0;
+                       if(seq->seq1 &&
+                          (seq->seq1->flag & SELECT)) tot= 0;
+                       if(seq->seq2 &&
+                          (seq->seq2->flag & SELECT)) tot= 0;
+                       if(seq->seq3 &&
+                          (seq->seq3->flag & SELECT)) tot= 0;
                }
                if(tot==0) break;
                seq= seq->next;
@@ -2047,7 +2060,6 @@ void make_meta(void)
        seqm->strip->len= seqm->len;
        seqm->strip->us= 1;
        if(seqm->len) seqm->strip->stripdata= MEM_callocN(seqm->len*sizeof(StripElem), "metastripdata");
-
        set_meta_stripdata(seqm);
 
        BIF_undo_push("Make Meta Sequencer");