From 9e2081a5fc078bf8bb040f0befe62156b9592436 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Mar 2007 14:58:29 +0000 Subject: made alloc_sequence accept a linkedList so it can be used from Python. the start/end points for new strips were not set properly. --- source/blender/src/editseq.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'source/blender/src/editseq.c') diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c index b80709d3099..9ed75e5b12f 100644 --- a/source/blender/src/editseq.c +++ b/source/blender/src/editseq.c @@ -493,15 +493,15 @@ void mouse_select_seq(void) std_rmouse_transform(transform_seq); } -static Sequence *alloc_sequence(int cfra, int machine) + +Sequence *alloc_sequence(ListBase *lb, int cfra, int machine) { - Editing *ed; Sequence *seq; - ed= G.scene->ed; + /*ed= G.scene->ed;*/ seq= MEM_callocN( sizeof(Sequence), "addseq"); - BLI_addtail(ed->seqbasep, seq); + BLI_addtail(lb, seq); set_last_seq(seq); @@ -542,7 +542,7 @@ static Sequence *sfile_to_sequence(SpaceFile *sfile, int cfra, int machine, int if(totsel==0) return 0; /* make seq */ - seq= alloc_sequence(cfra, machine); + seq= alloc_sequence(((Editing *)G.scene->ed)->seqbasep, cfra, machine); seq->len= totsel; if(totsel==1) { @@ -610,11 +610,11 @@ static void sfile_to_mv_sequence(SpaceFile *sfile, int cfra, int machine) "FFMPEG-support not compiled in!"); return; } - + totframe= IMB_anim_get_duration(anim); /* make seq */ - seq= alloc_sequence(cfra, machine); + seq= alloc_sequence(((Editing *)G.scene->ed)->seqbasep, cfra, machine); seq->len= totframe; seq->type= SEQ_MOVIE; seq->anim= anim; @@ -682,7 +682,7 @@ static Sequence *sfile_to_ramsnd_sequence(SpaceFile *sfile, totframe= (int) ( ((float)(sound->streamlen-1)/( (float)G.scene->audio.mixrate*4.0 ))* (float)G.scene->r.frs_sec); /* make seq */ - seq= alloc_sequence(cfra, machine); + seq= alloc_sequence(((Editing *)G.scene->ed)->seqbasep, cfra, machine); seq->len= totframe; seq->type= SEQ_RAM_SOUND; seq->sound = sound; @@ -745,7 +745,7 @@ static void sfile_to_hdsnd_sequence(SpaceFile *sfile, int cfra, int machine) totframe= sound_hdaudio_get_duration(hdaudio, G.scene->r.frs_sec); /* make seq */ - seq= alloc_sequence(cfra, machine); + seq= alloc_sequence(((Editing *)G.scene->ed)->seqbasep, cfra, machine); seq->len= totframe; seq->type= SEQ_HD_SOUND; seq->hdaudio= hdaudio; @@ -1158,7 +1158,7 @@ static int add_seq_effect(int type, char *str) machine= (int)(y+0.5); /* allocate and initialize */ - newseq= alloc_sequence(cfra, machine); + newseq= alloc_sequence(((Editing *)G.scene->ed)->seqbasep, cfra, machine); newseq->type= event_to_efftype(type); sh = get_sequence_effect(newseq); @@ -1373,7 +1373,7 @@ void add_sequence(int type) cfra= (int)(x+0.5); machine= (int)(y+0.5); - seq= alloc_sequence(cfra, machine); + seq= alloc_sequence(((Editing *)G.scene->ed)->seqbasep, cfra, machine); seq->type= SEQ_SCENE; seq->scene= sce; seq->sfra= sce->r.sfra; @@ -1990,7 +1990,7 @@ void make_meta(void) /* remove all selected from main list, and put in meta */ - seqm= alloc_sequence(1, 1); + seqm= alloc_sequence(((Editing *)G.scene->ed)->seqbasep, 1, 1); seqm->type= SEQ_META; seqm->flag= SELECT; -- cgit v1.2.3