svn merge -r 12607:12653 https://svn.blender.org/svnroot/bf-blender/trunk/blender...
[blender.git] / source / blender / blenloader / intern / readfile.c
index 5861ba39da236c522c024352ab8af2bd81633955..6d16a326a0ba5c8a0751a9ef8a6ce5e82c7282d6 100644 (file)
@@ -3226,7 +3226,6 @@ static void direct_link_scene(FileData *fd, Scene *sce)
        Editing *ed;
        Sequence *seq;
        MetaStack *ms;
-       StripElem *se;
        int a;
 
        sce->theDag = NULL;
@@ -3262,8 +3261,6 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                        /* a patch: after introduction of effects with 3 input strips */
                        if(seq->seq3==0) seq->seq3= seq->seq2;
 
-                       seq->curelem= 0;
-
                        seq->plugin= newdataadr(fd, seq->plugin);
                        seq->effectdata= newdataadr(fd, seq->effectdata);
                        
@@ -3274,59 +3271,17 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                        seq->strip= newdataadr(fd, seq->strip);
                        if(seq->strip && seq->strip->done==0) {
                                seq->strip->done= 1;
-
-                               /* standard: strips from effects/metas are not written, but are mallocced */
-
-                               if(seq->type==SEQ_IMAGE) {
-                                       seq->strip->stripdata= newdataadr(fd, seq->strip->stripdata);
-                                       se= seq->strip->stripdata;
-                                       if(se) {
-                                               for(a=0; a<seq->strip->len; a++, se++) {
-                                                       se->ok= 1;
-                                                       se->ibuf= 0;
-                                               }
-                                       }
-                               }
-                               else if(seq->type==SEQ_MOVIE) {
-                                       /* only first stripelem is in file */
-                                       se= newdataadr(fd, seq->strip->stripdata);
-
-                                       if(se) {
-                                               seq->strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem");
-                                               *seq->strip->stripdata= *se;
-                                               MEM_freeN(se);
-
-                                               se= seq->strip->stripdata;
-
-                                               for(a=0; a<seq->strip->len; a++, se++) {
-                                                       se->ok= 1;
-                                                       se->ibuf= 0;
-                                                       se->nr= a + 1;
-                                               }
-                                       }
-                               }
-                               else if(seq->type==SEQ_RAM_SOUND
-                                       || seq->type == SEQ_HD_SOUND) {
-                                       /* only first stripelem is in file */
-                                       se= newdataadr(fd, seq->strip->stripdata);
-
-                                       if(se) {
-                                               seq->strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem");
-                                               *seq->strip->stripdata= *se;
-                                               MEM_freeN(se);
-
-                                               se= seq->strip->stripdata;
-
-                                               for(a=0; a<seq->strip->len; a++, se++) {
-                                                       se->ok= 2; /* why? */
-                                                       se->ibuf= 0;
-                                                       se->nr= a + 1;
-                                               }
-                                       }
+                               seq->strip->tstripdata = 0;
+
+                               if(seq->type == SEQ_IMAGE ||
+                                  seq->type == SEQ_MOVIE ||
+                                  seq->type == SEQ_RAM_SOUND ||
+                                  seq->type == SEQ_HD_SOUND) {
+                                       seq->strip->stripdata = newdataadr(
+                                               fd, seq->strip->stripdata);
+                               } else {
+                                       seq->strip->stripdata = 0;
                                }
-                               else if(seq->len>0)
-                                       seq->strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem");
-
                        }
                }
                END_SEQ