Merging trunk up to r38167.
authorJoerg Mueller <nexyon@gmail.com>
Wed, 6 Jul 2011 20:26:56 +0000 (20:26 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Wed, 6 Jul 2011 20:26:56 +0000 (20:26 +0000)
1  2 
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c

index e1efd5b4622835498627083945c9cc2f3ad1ae7e,594d2942e8faa5abd02bb316ee236a886c26fd73..1ed262c3e2310c9af9cae783f136c39d5900e935
@@@ -127,7 -127,6 +127,7 @@@ static void get_seq_color3ubv(Scene *cu
        case SEQ_GLOW:
        case SEQ_MULTICAM:
        case SEQ_ADJUSTMENT:
 +      case SEQ_TITLECARD:
                UI_GetThemeColor3ubv(TH_SEQ_EFFECT, col);
                
                /* slightly offset hue to distinguish different effects */
@@@ -644,10 -643,12 +644,12 @@@ static void draw_seq_strip(Scene *scene
        if (G.moving && (seq->flag & SELECT)) {
                if(seq->flag & SEQ_OVERLAP) {
                        col[0]= 255; col[1]= col[2]= 40;
-               } else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 120);
+               }
+               else
+                       UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 120+outline_tint);
        }
-       UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, outline_tint);
+       else
+               UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, outline_tint);
        
        glColor3ubv((GLubyte *)col);
        
@@@ -970,7 -971,7 +972,7 @@@ static void draw_seq_strips(const bCont
                /* loop through strips, checking for those that are visible */
                for (seq= ed->seqbasep->first; seq; seq= seq->next) {
                        /* boundbox and selection tests for NOT drawing the strip... */
-                       if ((seq->flag & SELECT) == sel) continue;
+                       if ((seq->flag & SELECT) != sel) continue;
                        else if (seq == last_seq) continue;
                        else if (MIN2(seq->startdisp, seq->start) > v2d->cur.xmax) continue;
                        else if (MAX2(seq->enddisp, seq->start+seq->len) < v2d->cur.xmin) continue;
index 46638007fb1d038f72d9c7a04c3f6c9158eeba8b,b7a7b6b5412e9c8b3bff5598acd9acbb0a5c137e..4252d051154871879bf479929e447fa6a85c22eb
@@@ -98,10 -98,9 +98,10 @@@ EnumPropertyItem sequencer_prop_effect_
        {SEQ_GLOW, "GLOW", 0, "Glow", "Glow effect strip type"},
        {SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"},
        {SEQ_COLOR, "COLOR", 0, "Color", "Color effect strip type"},
 -      {SEQ_SPEED, "SPEED", 0, "Speed", "Color effect strip type"},
 +      {SEQ_SPEED, "SPEED", 0, "Speed", ""},
        {SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
        {SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
 +      {SEQ_TITLECARD, "TITLE_CARD", 0, "Title Card", ""},
        {0, NULL, 0, NULL, NULL}
  };
  
@@@ -125,6 -124,7 +125,7 @@@ typedef struct TransSeq 
        int startstill, endstill;
        int startdisp, enddisp;
        int startofs, endofs;
+       int anim_startofs, anim_endofs;
        /* int final_left, final_right; */ /* UNUSED */
        int len;
  } TransSeq;
@@@ -409,7 -409,6 +410,7 @@@ int event_to_efftype(int event
        if(event==16) return SEQ_COLOR;
        if(event==17) return SEQ_SPEED;
        if(event==18) return SEQ_ADJUSTMENT;
 +      if(event==19) return SEQ_TITLECARD;
        return 0;
  }
  
@@@ -522,8 -521,7 +523,8 @@@ static void change_sequence(Scene *scen
                                "|Transform%x15"
                                "|Color Generator%x16"
                                "|Speed Control%x17"
 -                              "|Adjustment Layer%x18");
 +                              "|Adjustment Layer%x18"
 +                              "|Title Card%x19");
                if(event > 0) {
                        if(event==1) {
                                SWAP(Sequence *,last_seq->seq1,last_seq->seq2);
@@@ -732,8 -730,10 +733,10 @@@ static Sequence *cut_seq_hard(Scene *sc
        ts.endstill= seq->endstill;
        ts.startdisp= seq->startdisp;
        ts.enddisp= seq->enddisp;
-       ts.startofs= seq->anim_startofs;
-       ts.endofs= seq->anim_endofs;
+       ts.startofs= seq->startofs;
+       ts.endofs= seq->endofs;
+       ts.anim_startofs= seq->anim_startofs;
+       ts.anim_endofs= seq->anim_endofs;
        ts.len= seq->len;
        
        /* First Strip! */
                if ((seqn->startstill) && (cutframe == seqn->start + 1)) {
                        seqn->start = ts.start;
                        seqn->startstill= ts.start- cutframe;
-                       seqn->anim_endofs = ts.endofs;
+                       seqn->anim_endofs = ts.anim_endofs;
                        seqn->endstill = ts.endstill;
                }
                
                        seqn->start = cutframe;
                        seqn->startstill = 0;
                        seqn->startofs = 0;
+                       seqn->endofs = ts.endofs;
                        seqn->anim_startofs += cutframe - ts.start;
-                       seqn->anim_endofs = ts.endofs;
+                       seqn->anim_endofs = ts.anim_endofs;
                        seqn->endstill = ts.endstill;
                }                               
                
@@@ -828,6 -829,8 +832,8 @@@ static Sequence *cut_seq_soft(Scene *sc
        ts.enddisp= seq->enddisp;
        ts.startofs= seq->startofs;
        ts.endofs= seq->endofs;
+       ts.anim_startofs= seq->anim_startofs;
+       ts.anim_endofs= seq->anim_endofs;
        ts.len= seq->len;
        
        /* First Strip! */
@@@ -1781,19 -1784,21 +1787,21 @@@ static int sequencer_separate_images_ex
                                /* new seq */
                                se = give_stripelem(seq, cfra);
  
-                               seq_new= alloc_sequence(ed->seqbasep, start_ofs, seq->machine);
+                               seq_new= seq_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME);
+                               BLI_addtail(&ed->seqbase, seq_new);
+                               seq_new->start= start_ofs;
                                seq_new->type= SEQ_IMAGE;
                                seq_new->len = 1;
                                seq_new->endstill = step-1;
  
                                /* new strip */
-                               seq_new->strip= strip_new= MEM_callocN(sizeof(Strip)*1, "strip");
+                               strip_new= seq_new->strip;
                                strip_new->len= 1;
                                strip_new->us= 1;
-                               strncpy(strip_new->dir, seq->strip->dir, FILE_MAXDIR-1);
  
                                /* new stripdata */
-                               strip_new->stripdata= se_new= MEM_callocN(sizeof(StripElem)*1, "stripelem");
+                               se_new= strip_new->stripdata;
                                BLI_strncpy(se_new->name, se->name, sizeof(se_new->name));
                                calc_sequence(scene, seq_new);
  
                                }
  
                                /* XXX, COPY FCURVES */
-                               strncpy(seq_new->name+2, seq->name+2, sizeof(seq->name)-2);
-                               seqbase_unique_name_recursive(&scene->ed->seqbase, seq_new);
  
                                cfra++;
                                start_ofs += step;