diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-08 15:15:40 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-08 15:15:40 +0400 |
commit | 1bf893e9c886361bddda23bad7233385a262c098 (patch) | |
tree | a6ec807681bb2c174806ef65c00ec94582a5c323 /source/blender/editors | |
parent | 03a3e4f16586a659f465fa754827c9a9fccbb894 (diff) |
Code cleanup: BKE_ prefix for public sequencer functions
Diffstat (limited to 'source/blender/editors')
9 files changed, 176 insertions, 174 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 50bdbd6673c..3cc39238713 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -202,7 +202,7 @@ static void animchan_sync_fcurve(bAnimContext *UNUSED(ac), bAnimListElem *ale) /* get strip name, and check if this strip is selected */ seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all["); - seq = get_seq_by_name(ed->seqbasep, seq_name, FALSE); + seq = BKE_sequwnce_get_by_name(ed->seqbasep, seq_name, FALSE); if (seq_name) MEM_freeN(seq_name); /* can only add this F-Curve if it is selected */ diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 07e773b1e9a..b1497712aed 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -917,7 +917,7 @@ static short skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_i /* get strip name, and check if this strip is selected */ seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all["); - seq = get_seq_by_name(ed->seqbasep, seq_name, FALSE); + seq = BKE_sequwnce_get_by_name(ed->seqbasep, seq_name, FALSE); if (seq_name) MEM_freeN(seq_name); /* can only add this F-Curve if it is selected */ diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index b1776894959..0421439aa00 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -224,7 +224,7 @@ static int screen_render_exec(bContext *C, wmOperator *op) * otherwise, invalidated cache entries can make their way into * the output rendering. We can't put that into RE_BlenderFrame, * since sequence rendering can call that recursively... (peter) */ - seq_stripelem_cache_cleanup(); + BKE_sequencer_stripelem_cache_cleanup(); RE_SetReports(re, op->reports); @@ -526,7 +526,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) * otherwise, invalidated cache entries can make their way into * the output rendering. We can't put that into RE_BlenderFrame, * since sequence rendering can call that recursively... (peter) */ - seq_stripelem_cache_cleanup(); + BKE_sequencer_stripelem_cache_cleanup(); /* get editmode results */ ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */ diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 12f1e09f5be..d705799b1d8 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -138,9 +138,9 @@ static void screen_opengl_render_apply(OGLRender *oglrender) SeqRenderData context; int chanshown = oglrender->sseq ? oglrender->sseq->chanshown : 0; - context = seq_new_render_data(oglrender->bmain, scene, oglrender->sizex, oglrender->sizey, 100.0f); + context = BKE_sequencer_new_render_data(oglrender->bmain, scene, oglrender->sizex, oglrender->sizey, 100.0f); - ibuf = give_ibuf_seq(context, CFRA, chanshown); + ibuf = BKE_sequencer_give_ibuf(context, CFRA, chanshown); if (ibuf) { BLI_assert((oglrender->sizex == ibuf->x) && (oglrender->sizey == ibuf->y)); diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index c52f4ca629a..7b7170d99e0 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -230,7 +230,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - seq = alloc_sequence(ed->seqbasep, start_frame, channel); + seq = BKE_sequence_alloc(ed->seqbasep, start_frame, channel); seq->type = SEQ_TYPE_SCENE; seq->blend_mode = SEQ_TYPE_CROSS; /* so alpha adjustment fade to the strip below */ @@ -242,11 +242,11 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) strip->us = 1; BLI_strncpy(seq->name + 2, sce_seq->id.name + 2, sizeof(seq->name) - 2); - seqbase_unique_name_recursive(&ed->seqbase, seq); + BKE_seqence_base_unique_name_recursive(&ed->seqbase, seq); seq->scene_sound = sound_scene_add_scene_sound(scene, seq, start_frame, start_frame + seq->len, 0); - calc_sequence_disp(scene, seq); + BKE_sequence_calc_disp(scene, seq); BKE_sequencer_sort(scene); if (RNA_boolean_get(op->ptr, "replace_sel")) { @@ -256,7 +256,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) } if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { - if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -329,7 +329,7 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - seq = alloc_sequence(ed->seqbasep, start_frame, channel); + seq = BKE_sequence_alloc(ed->seqbasep, start_frame, channel); seq->type = SEQ_TYPE_MOVIECLIP; seq->blend_mode = SEQ_TYPE_CROSS; seq->clip = clip; @@ -343,9 +343,9 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) strip->us = 1; BLI_strncpy(seq->name + 2, clip->id.name + 2, sizeof(seq->name) - 2); - seqbase_unique_name_recursive(&ed->seqbase, seq); + BKE_seqence_base_unique_name_recursive(&ed->seqbase, seq); - calc_sequence_disp(scene, seq); + BKE_sequence_calc_disp(scene, seq); BKE_sequencer_sort(scene); if (RNA_boolean_get(op->ptr, "replace_sel")) { @@ -355,7 +355,7 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) } if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { - if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -425,7 +425,7 @@ static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - seq = alloc_sequence(ed->seqbasep, start_frame, channel); + seq = BKE_sequence_alloc(ed->seqbasep, start_frame, channel); seq->type = SEQ_TYPE_MASK; seq->blend_mode = SEQ_TYPE_CROSS; seq->mask = mask; @@ -439,9 +439,9 @@ static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op) strip->us = 1; BLI_strncpy(seq->name + 2, mask->id.name + 2, sizeof(seq->name) - 2); - seqbase_unique_name_recursive(&ed->seqbase, seq); + BKE_seqence_base_unique_name_recursive(&ed->seqbase, seq); - calc_sequence_disp(scene, seq); + BKE_sequence_calc_disp(scene, seq); BKE_sequencer_sort(scene); if (RNA_boolean_get(op->ptr, "replace_sel")) { @@ -451,7 +451,7 @@ static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op) } if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { - if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -535,7 +535,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad seq = seq_load_func(C, ed->seqbasep, &seq_load); if (seq) { if (overlap == FALSE) { - if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } } } @@ -546,7 +546,8 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad seq = seq_load_func(C, ed->seqbasep, &seq_load); if (seq) { if (overlap == FALSE) { - if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) + BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } } } @@ -557,7 +558,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad } BKE_sequencer_sort(scene); - seq_update_muting(ed); + BKE_sequencer_update_muting(ed); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -567,7 +568,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad /* add movie operator */ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) { - return sequencer_add_generic_strip_exec(C, op, sequencer_add_movie_strip); + return sequencer_add_generic_strip_exec(C, op, BKE_sequencer_add_movie_strip); } @@ -623,7 +624,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) static int sequencer_add_sound_strip_exec(bContext *C, wmOperator *op) { - return sequencer_add_generic_strip_exec(C, op, sequencer_add_sound_strip); + return sequencer_add_generic_strip_exec(C, op, BKE_sequencer_add_sound_strip); } static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -700,7 +701,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) /* main adding function */ - seq = sequencer_add_image_strip(C, ed->seqbasep, &seq_load); + seq = BKE_sequencer_add_image_strip(C, ed->seqbasep, &seq_load); strip = seq->strip; se = strip->stripdata; @@ -719,7 +720,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) } } - calc_sequence_disp(scene, seq); + BKE_sequence_calc_disp(scene, seq); BKE_sequencer_sort(scene); @@ -727,7 +728,8 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) strncpy(ed->act_imagedir, strip->dir, FILE_MAXDIR - 1); if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { - if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) + BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -814,13 +816,13 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - seq = alloc_sequence(ed->seqbasep, start_frame, channel); + seq = BKE_sequence_alloc(ed->seqbasep, start_frame, channel); seq->type = type; - BLI_strncpy(seq->name + 2, give_seqname(seq), sizeof(seq->name) - 2); - seqbase_unique_name_recursive(&ed->seqbase, seq); + BLI_strncpy(seq->name + 2, BKE_sequence_give_name(seq), sizeof(seq->name) - 2); + BKE_seqence_base_unique_name_recursive(&ed->seqbase, seq); - sh = get_sequence_effect(seq); + sh = BKE_sequence_get_effect(seq); seq->seq1 = seq1; seq->seq2 = seq2; @@ -830,12 +832,12 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) if (!seq1) { /* effect has no deps */ seq->len = 1; - seq_tx_set_final_right(seq, end_frame); + BKE_sequence_tx_set_final_right(seq, end_frame); } seq->flag |= SEQ_USE_EFFECT_DEFAULT_FADE; - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); /* basic defaults */ seq->strip = strip = MEM_callocN(sizeof(Strip), "strip"); @@ -864,10 +866,10 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) } if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { - if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } - update_changed_seq_and_deps(scene, seq, 1, 1); /* runs calc_sequence */ + BKE_sequencer_update_changed_seq_and_deps(scene, seq, 1, 1); /* runs calc_sequence */ /* not sure if this is needed with update_changed_seq_and_deps. @@ -905,7 +907,7 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven * skip initializing the channel from the mouse. * Instead leave the property unset so exec() initializes it to be * above the strips its applied to. */ - if (get_sequence_effect_num_inputs(type) != 0) { + if (BKE_sequence_effect_get_num_inputs(type) != 0) { prop_flag |= SEQPROP_NOCHAN; } } diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 9cbb9006187..dc19dfc419d 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -374,7 +374,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, const float handsize_cla /* draw! */ if (seq->type < SEQ_TYPE_EFFECT || - get_sequence_effect_num_inputs(seq->type) == 0) + BKE_sequence_effect_get_num_inputs(seq->type) == 0) { glEnable(GL_BLEND); @@ -530,7 +530,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float /* note, all strings should include 'name' */ if (name[0] == '\0') - name = give_seqname(seq); + name = BKE_sequence_give_name(seq); if (seq->type == SEQ_TYPE_META || seq->type == SEQ_TYPE_ADJUSTMENT) { BLI_snprintf(str, sizeof(str), "%s | %d", name, seq->len); @@ -685,7 +685,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline const float handsize_clamped = draw_seq_handle_size_get_clamped(seq, pixelx); /* we need to know if this is a single image/color or not for drawing */ - is_single_image = (char)seq_single_check(seq); + is_single_image = (char)BKE_sequence_single_check(seq); /* body */ x1 = (seq->startstill) ? seq->start : seq->startdisp; @@ -700,7 +700,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline /* draw the main strip body */ if (is_single_image) { /* single image */ - draw_shadedstrip(seq, background_col, seq_tx_get_final_left(seq, 0), y1, seq_tx_get_final_right(seq, 0), y2); + draw_shadedstrip(seq, background_col, BKE_sequence_tx_get_final_left(seq, 0), y1, BKE_sequence_tx_get_final_right(seq, 0), y2); } else { /* normal operation */ draw_shadedstrip(seq, background_col, x1, y1, x2, y2); @@ -852,14 +852,14 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq if (G.rendering) return; - context = seq_new_render_data(bmain, scene, rectx, recty, proxy_size); + context = BKE_sequencer_new_render_data(bmain, scene, rectx, recty, proxy_size); if (special_seq_update) - ibuf = give_ibuf_seq_direct(context, cfra + frame_ofs, special_seq_update); + ibuf = BKE_sequencer_give_ibuf_direct(context, cfra + frame_ofs, special_seq_update); else if (!U.prefetchframes) // XXX || (G.f & G_PLAYANIM) == 0) { - ibuf = give_ibuf_seq(context, cfra + frame_ofs, sseq->chanshown); + ibuf = BKE_sequencer_give_ibuf(context, cfra + frame_ofs, sseq->chanshown); else - ibuf = give_ibuf_seq_threaded(context, cfra + frame_ofs, sseq->chanshown); + ibuf = BKE_sequencer_give_ibuf_threaded(context, cfra + frame_ofs, sseq->chanshown); if (ibuf == NULL) return; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 16a83cbcc9e..758edcf2b2e 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -151,7 +151,7 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog for (link = pj->queue.first; link; link = link->next) { struct SeqIndexBuildContext *context = link->data; - seq_proxy_rebuild(context, stop, do_update, progress); + BKE_sequencer_proxy_rebuild(context, stop, do_update, progress); } if (*stop) { @@ -167,10 +167,10 @@ static void proxy_endjob(void *pjv) LinkData *link; for (link = pj->queue.first; link; link = link->next) { - seq_proxy_rebuild_finish(link->data, pj->stop); + BKE_sequencer_proxy_rebuild_finish(link->data, pj->stop); } - free_imbuf_seq(pj->scene, &ed->seqbase, FALSE, FALSE); + BKE_sequencer_free_imbuf(pj->scene, &ed->seqbase, FALSE, FALSE); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, pj->scene); } @@ -204,7 +204,7 @@ static void seq_proxy_build_job(const bContext *C) SEQP_BEGIN (ed, seq) { if ((seq->flag & SELECT)) { - context = seq_proxy_rebuild_context(pj->main, pj->scene, seq); + context = BKE_sequencer_proxy_rebuild_context(pj->main, pj->scene, seq); link = BLI_genericNodeN(context); BLI_addtail(&pj->queue, link); } @@ -383,7 +383,7 @@ Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[ if ( ((seq->startdisp < seq->enddisp) && (seq->startdisp <= x && seq->enddisp >= x)) || ((seq->startdisp > seq->enddisp) && (seq->startdisp >= x && seq->enddisp <= x)) ) { - if (seq_tx_test(seq)) { + if (BKE_sequence_tx_test(seq)) { /* clamp handles to defined size in pixel space */ @@ -505,7 +505,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { - if (seq->type == SEQ_TYPE_SOUND_RAM && get_sequence_effect_num_inputs(type) != 0) { + if (seq->type == SEQ_TYPE_SOUND_RAM && BKE_sequence_effect_get_num_inputs(type) != 0) { *error_str = "Can't apply effects to audio sequence strips"; return 0; } @@ -530,7 +530,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen } - switch (get_sequence_effect_num_inputs(type)) { + switch (BKE_sequence_effect_get_num_inputs(type)) { case 0: *selseq1 = *selseq2 = *selseq3 = NULL; return 1; /* succsess */ @@ -584,7 +584,7 @@ static Sequence *del_seq_find_replace_recurs(Scene *scene, Sequence *seq) seq->seq2 = (seq2) ? seq2 : (seq1) ? seq1 : seq3; seq->seq3 = (seq3) ? seq3 : (seq1) ? seq1 : seq2; - update_changed_seq_and_deps(scene, seq, 1, 1); + BKE_sequencer_update_changed_seq_and_deps(scene, seq, 1, 1); } else seq->flag |= SELECT; /* mark for delete */ @@ -612,7 +612,7 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de BLI_remlink(lb, seq); if (seq == last_seq) BKE_sequencer_active_set(scene, NULL); if (seq->type == SEQ_TYPE_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1); - seq_free_sequence(scene, seq); + BKE_sequence_free(scene, seq); } seq = seqn; } @@ -669,12 +669,12 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe) } } - reload_sequence_new_file(scene, seq, FALSE); - calc_sequence(scene, seq); + BKE_sequence_reload_new_file(scene, seq, FALSE); + BKE_sequence_calc(scene, seq); if (!skip_dup) { /* Duplicate AFTER the first change */ - seqn = seq_dupli_recursive(scene, NULL, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); + seqn = BKE_sequence_dupli_recursive(scene, NULL, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); } if (seqn) { @@ -709,8 +709,8 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe) seqn->startstill = 0; } - reload_sequence_new_file(scene, seqn, FALSE); - calc_sequence(scene, seqn); + BKE_sequence_reload_new_file(scene, seqn, FALSE); + BKE_sequence_calc(scene, seqn); } return seqn; } @@ -763,11 +763,11 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe) } } - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); if (!skip_dup) { /* Duplicate AFTER the first change */ - seqn = seq_dupli_recursive(scene, NULL, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); + seqn = BKE_sequence_dupli_recursive(scene, NULL, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); } if (seqn) { @@ -798,7 +798,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe) seqn->startstill = 0; } - calc_sequence(scene, seqn); + BKE_sequence_calc(scene, seqn); } return seqn; } @@ -856,7 +856,7 @@ static int insert_gap(Scene *scene, int gap, int cfra) { if (seq->startdisp >= cfra) { seq->start += gap; - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); done = TRUE; } } @@ -974,11 +974,11 @@ static void UNUSED_FUNCTION(no_gaps) (Scene * scene) for (cfra = CFRA; cfra <= EFRA; cfra++) { if (first == 0) { - if (evaluate_seq_frame(scene, cfra) ) first = 1; + if (BKE_sequencer_evaluate_frame(scene, cfra) ) first = 1; } else { done = TRUE; - while (evaluate_seq_frame(scene, cfra) == 0) { + while (BKE_sequencer_evaluate_frame(scene, cfra) == 0) { done = insert_gap(scene, -1, cfra); if (done == 0) break; } @@ -1049,24 +1049,24 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op) /* also check metas */ for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT && !(seq->depth == 0 && seq->flag & SEQ_LOCK) && - seq_tx_test(seq)) + BKE_sequence_tx_test(seq)) { if ((seq->flag & (SEQ_LEFTSEL + SEQ_RIGHTSEL)) == 0) { /* simple but no anim update */ /* seq->start= snap_frame-seq->startofs+seq->startstill; */ - seq_translate(scene, seq, (snap_frame - seq->startofs + seq->startstill) - seq->start); + BKE_sequence_translate(scene, seq, (snap_frame - seq->startofs + seq->startstill) - seq->start); } else { if (seq->flag & SEQ_LEFTSEL) { - seq_tx_set_final_left(seq, snap_frame); + BKE_sequence_tx_set_final_left(seq, snap_frame); } else { /* SEQ_RIGHTSEL */ - seq_tx_set_final_right(seq, snap_frame); + BKE_sequence_tx_set_final_right(seq, snap_frame); } - seq_tx_handle_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL); + BKE_sequence_tx_handle_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL); } - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); } } @@ -1075,17 +1075,17 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op) for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT && !(seq->depth == 0 && seq->flag & SEQ_LOCK)) { seq->flag &= ~SEQ_OVERLAP; - if (seq_test_overlap(ed->seqbasep, seq) ) { - shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq) ) { + BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } } else if (seq->type & SEQ_TYPE_EFFECT) { if (seq->seq1 && (seq->seq1->flag & SELECT)) - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); else if (seq->seq2 && (seq->seq2->flag & SELECT)) - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); else if (seq->seq3 && (seq->seq3->flag & SELECT)) - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); } } @@ -1150,7 +1150,7 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op) } } - seq_update_muting(ed); + BKE_sequencer_update_muting(ed); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -1197,7 +1197,7 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op) } } - seq_update_muting(ed); + BKE_sequencer_update_muting(ed); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -1297,12 +1297,12 @@ static int sequencer_reload_exec(bContext *C, wmOperator *op) for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { - update_changed_seq_and_deps(scene, seq, 0, 1); - reload_sequence_new_file(scene, seq, !adjust_length); + BKE_sequencer_update_changed_seq_and_deps(scene, seq, 0, 1); + BKE_sequence_reload_new_file(scene, seq, !adjust_length); if (adjust_length) { - if (seq_test_overlap(ed->seqbasep, seq)) - shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) + BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } } } @@ -1339,7 +1339,7 @@ static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op)) Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, FALSE); - free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); + BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE, FALSE); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -1381,7 +1381,7 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) last_seq->seq2 = seq2; last_seq->seq3 = seq3; - update_changed_seq_and_deps(scene, last_seq, 1, 1); + BKE_sequencer_update_changed_seq_and_deps(scene, last_seq, 1, 1); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -1433,7 +1433,7 @@ static int sequencer_swap_inputs_exec(bContext *C, wmOperator *op) last_seq->seq1 = last_seq->seq2; last_seq->seq2 = seq; - update_changed_seq_and_deps(scene, last_seq, 1, 1); + BKE_sequencer_update_changed_seq_and_deps(scene, last_seq, 1, 1); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -1564,8 +1564,8 @@ static int apply_unique_name_cb(Sequence *seq, void *arg_pt) char name[sizeof(seq->name) - 2]; strcpy(name, seq->name + 2); - seqbase_unique_name_recursive(&scene->ed->seqbase, seq); - seq_dupe_animdata(scene, name, seq->name + 2); + BKE_seqence_base_unique_name_recursive(&scene->ed->seqbase, seq); + BKE_sequencer_dupe_animdata(scene, name, seq->name + 2); return 1; } @@ -1580,7 +1580,7 @@ static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) if (ed == NULL) return OPERATOR_CANCELLED; - seqbase_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_CONTEXT); + BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_CONTEXT); if (nseqbase.first) { Sequence *seq = nseqbase.first; @@ -1588,7 +1588,7 @@ static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) BLI_movelisttolist(ed->seqbasep, &nseqbase); for (; seq; seq = seq->next) - seq_recursive_apply(seq, apply_unique_name_cb, scene); + BKE_sequencer_recursive_apply(seq, apply_unique_name_cb, scene); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -1651,14 +1651,14 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) /* updates lengths etc */ seq = ed->seqbasep->first; while (seq) { - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); seq = seq->next; } /* free parent metas */ ms = ed->metastack.last; while (ms) { - calc_sequence(scene, ms->parseq); + BKE_sequence_calc(scene, ms->parseq); ms = ms->prev; } @@ -1703,14 +1703,14 @@ static int sequencer_offset_clear_exec(bContext *C, wmOperator *UNUSED(op)) /* updates lengths etc */ seq = ed->seqbasep->first; while (seq) { - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); seq = seq->next; } for (seq = ed->seqbasep->first; seq; seq = seq->next) { if ((seq->type & SEQ_TYPE_EFFECT) == 0 && (seq->flag & SELECT)) { - if (seq_test_overlap(ed->seqbasep, seq)) { - shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) { + BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } } } @@ -1760,14 +1760,14 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) /* if (seq->ipo) seq->ipo->id.us--; */ /* XXX, remove fcurve and assign to split image strips */ - start_ofs = cfra = seq_tx_get_final_left(seq, 0); - frame_end = seq_tx_get_final_right(seq, 0); + start_ofs = cfra = BKE_sequence_tx_get_final_left(seq, 0); + frame_end = BKE_sequence_tx_get_final_right(seq, 0); while (cfra < frame_end) { /* new seq */ - se = give_stripelem(seq, cfra); + se = BKE_sequencer_give_stripelem(seq, cfra); - seq_new = seq_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME); + seq_new = BKE_sequence_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME); BLI_addtail(ed->seqbasep, seq_new); seq_new->start = start_ofs; @@ -1782,12 +1782,12 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) /* new stripdata */ se_new = strip_new->stripdata; BLI_strncpy(se_new->name, se->name, sizeof(se_new->name)); - calc_sequence(scene, seq_new); + BKE_sequence_calc(scene, seq_new); if (step > 1) { seq_new->flag &= ~SEQ_OVERLAP; - if (seq_test_overlap(ed->seqbasep, seq_new)) { - shuffle_seq(ed->seqbasep, seq_new, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq_new)) { + BKE_sequence_base_shuffle(ed->seqbasep, seq_new, scene); } } @@ -1797,7 +1797,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) start_ofs += step; } - seq_free_sequence(scene, seq); + BKE_sequence_free(scene, seq); seq = seq->next; } else { @@ -1869,7 +1869,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) /* recalc all: the meta can have effects connected to it */ for (seq = ed->seqbasep->first; seq; seq = seq->next) - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); BKE_sequencer_active_set(scene, ms->parseq); @@ -1880,7 +1880,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) } - seq_update_muting(ed); + BKE_sequencer_update_muting(ed); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -1911,14 +1911,14 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op) Sequence *seq, *seqm, *next, *last_seq = BKE_sequencer_active_get(scene); int channel_max = 1; - if (seqbase_isolated_sel_check(ed->seqbasep) == FALSE) { + if (BKE_sequence_base_isolated_sel_check(ed->seqbasep) == FALSE) { BKE_report(op->reports, RPT_ERROR, "Please select all related strips"); return OPERATOR_CANCELLED; } /* remove all selected from main list, and put in meta */ - seqm = alloc_sequence(ed->seqbasep, 1, 1); /* channel number set later */ + seqm = BKE_sequence_alloc(ed->seqbasep, 1, 1); /* channel number set later */ strcpy(seqm->name + 2, "MetaStrip"); seqm->type = SEQ_TYPE_META; seqm->flag = SELECT; @@ -1934,18 +1934,18 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op) seq = next; } seqm->machine = last_seq ? last_seq->machine : channel_max; - calc_sequence(scene, seqm); + BKE_sequence_calc(scene, seqm); seqm->strip = MEM_callocN(sizeof(Strip), "metastrip"); seqm->strip->us = 1; BKE_sequencer_active_set(scene, seqm); - if (seq_test_overlap(ed->seqbasep, seqm) ) shuffle_seq(ed->seqbasep, seqm, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seqm) ) BKE_sequence_base_shuffle(ed->seqbasep, seqm, scene); - seq_update_muting(ed); + BKE_sequencer_update_muting(ed); - seqbase_unique_name_recursive(&scene->ed->seqbase, seqm); + BKE_seqence_base_unique_name_recursive(&scene->ed->seqbase, seqm); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -1995,7 +1995,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) last_seq->seqbase.last = NULL; BLI_remlink(ed->seqbasep, last_seq); - seq_free_sequence(scene, last_seq); + BKE_sequence_free(scene, last_seq); /* emtpy meta strip, delete all effects depending on it */ for (seq = ed->seqbasep->first; seq; seq = seq->next) @@ -2009,14 +2009,14 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { seq->flag &= ~SEQ_OVERLAP; - if (seq_test_overlap(ed->seqbasep, seq)) { - shuffle_seq(ed->seqbasep, seq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, seq)) { + BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } } } BKE_sequencer_sort(scene); - seq_update_muting(ed); + BKE_sequencer_update_muting(ed); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -2414,9 +2414,9 @@ static void swap_sequence(Scene *scene, Sequence *seqa, Sequence *seqb) { int gap = seqb->startdisp - seqa->enddisp; seqb->start = (seqb->start - seqb->startdisp) + seqa->startdisp; - calc_sequence(scene, seqb); + BKE_sequence_calc(scene, seqb); seqa->start = (seqa->start - seqa->startdisp) + seqb->enddisp + gap; - calc_sequence(scene, seqa); + BKE_sequence_calc(scene, seqa); } #if 0 @@ -2454,9 +2454,9 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op) if (seq) { /* disallow effect strips */ - if (get_sequence_effect_num_inputs(seq->type) >= 1 && (seq->effectdata || seq->seq1 || seq->seq2 || seq->seq3)) + if (BKE_sequence_effect_get_num_inputs(seq->type) >= 1 && (seq->effectdata || seq->seq1 || seq->seq2 || seq->seq3)) return OPERATOR_CANCELLED; - if ((get_sequence_effect_num_inputs(active_seq->type) >= 1) && (active_seq->effectdata || active_seq->seq1 || active_seq->seq2 || active_seq->seq3)) + if ((BKE_sequence_effect_get_num_inputs(active_seq->type) >= 1) && (active_seq->effectdata || active_seq->seq1 || active_seq->seq2 || active_seq->seq3)) return OPERATOR_CANCELLED; switch (side) { @@ -2471,7 +2471,7 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op) // XXX - should be a generic function for (iseq = scene->ed->seqbasep->first; iseq; iseq = iseq->next) { if ((iseq->type & SEQ_TYPE_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) { - calc_sequence(scene, iseq); + BKE_sequence_calc(scene, iseq); } } @@ -2479,8 +2479,8 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op) for (iseq = scene->ed->seqbasep->first; iseq; iseq = iseq->next) { if ((iseq->type & SEQ_TYPE_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) { /* this may now overlap */ - if (seq_test_overlap(ed->seqbasep, iseq) ) { - shuffle_seq(ed->seqbasep, iseq, scene); + if (BKE_sequence_test_overlap(ed->seqbasep, iseq) ) { + BKE_sequence_base_shuffle(ed->seqbasep, iseq, scene); } } } @@ -2529,7 +2529,7 @@ static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op)) if (active_seq->strip) { switch (active_seq->type) { case SEQ_TYPE_IMAGE: - se = give_stripelem(active_seq, scene->r.cfra); + se = BKE_sequencer_give_stripelem(active_seq, scene->r.cfra); break; case SEQ_TYPE_MOVIE: se = active_seq->strip->stripdata; @@ -2596,14 +2596,14 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op) ListBase nseqbase = {NULL, NULL}; - seq_free_clipboard(); + BKE_sequencer_free_clipboard(); - if (seqbase_isolated_sel_check(ed->seqbasep) == FALSE) { + if (BKE_sequence_base_isolated_sel_check(ed->seqbasep) == FALSE) { BKE_report(op->reports, RPT_ERROR, "Please select all related strips"); return OPERATOR_CANCELLED; } - seqbase_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_UNIQUE_NAME); + BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_UNIQUE_NAME); /* To make sure the copied strips have unique names between each other add * them temporarily to the end of the original seqbase. (bug 25932) @@ -2613,7 +2613,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op) BLI_movelisttolist(ed->seqbasep, &nseqbase); for (seq = first_seq; seq; seq = seq->next) - seq_recursive_apply(seq, apply_unique_name_cb, scene); + BKE_sequencer_recursive_apply(seq, apply_unique_name_cb, scene); seqbase_clipboard.first = first_seq; seqbase_clipboard.last = ed->seqbasep->last; @@ -2663,13 +2663,13 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op)) ED_sequencer_deselect_all(scene); ofs = scene->r.cfra - seqbase_clipboard_frame; - seqbase_dupli_recursive(scene, NULL, &nseqbase, &seqbase_clipboard, SEQ_DUPE_UNIQUE_NAME); + BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, &seqbase_clipboard, SEQ_DUPE_UNIQUE_NAME); /* transform pasted strips before adding */ if (ofs) { for (iseq = nseqbase.first; iseq; iseq = iseq->next) { - seq_translate(scene, iseq, ofs); - seq_sound_init(scene, iseq); + BKE_sequence_translate(scene, iseq, ofs); + BKE_sequence_sound_init(scene, iseq); } } @@ -2679,7 +2679,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op)) /* make sure the pasted strips have unique names between them */ for (; iseq; iseq = iseq->next) { - seq_recursive_apply(iseq, apply_unique_name_cb, scene); + BKE_sequencer_recursive_apply(iseq, apply_unique_name_cb, scene); } WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -2716,7 +2716,7 @@ static int sequencer_swap_data_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - if (seq_swap(seq_act, seq_other, &error_msg) == 0) { + if (BKE_sequence_swap(seq_act, seq_other, &error_msg) == 0) { BKE_report(op->reports, RPT_ERROR, error_msg); return OPERATOR_CANCELLED; } @@ -2730,8 +2730,8 @@ static int sequencer_swap_data_exec(bContext *C, wmOperator *op) seq_act->scene_sound = NULL; seq_other->scene_sound = NULL; - calc_sequence(scene, seq_act); - calc_sequence(scene, seq_other); + BKE_sequence_calc(scene, seq_act); + BKE_sequence_calc(scene, seq_other); if (seq_act->sound) sound_add_scene_sound_defaults(scene, seq_act); if (seq_other->sound) sound_add_scene_sound_defaults(scene, seq_other); @@ -2882,10 +2882,10 @@ static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op) SWAP(Sequence *, *seq_1, *seq_2); } - update_changed_seq_and_deps(scene, seq, 0, 1); + BKE_sequencer_update_changed_seq_and_deps(scene, seq, 0, 1); /* important else we don't get the imbuf cache flushed */ - free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); + BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE, FALSE); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -2925,27 +2925,27 @@ static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op) /* can someone explain the logic behind only allowing to increase this, * copied from 2.4x - campbell */ - if (get_sequence_effect_num_inputs(seq->type) < - get_sequence_effect_num_inputs(new_type)) + if (BKE_sequence_effect_get_num_inputs(seq->type) < + BKE_sequence_effect_get_num_inputs(new_type)) { BKE_report(op->reports, RPT_ERROR, "New effect needs more input strips"); return OPERATOR_CANCELLED; } else { - sh = get_sequence_effect(seq); + sh = BKE_sequence_get_effect(seq); sh.free(seq); seq->type = new_type; - sh = get_sequence_effect(seq); + sh = BKE_sequence_get_effect(seq); sh.init(seq); } /* update */ - update_changed_seq_and_deps(scene, seq, 0, 1); + BKE_sequencer_update_changed_seq_and_deps(scene, seq, 0, 1); /* important else we don't get the imbuf cache flushed */ - free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); + BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE, FALSE); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -3013,12 +3013,12 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op) /* correct start/end frames so we don't move * important not to set seq->len= len; allow the function to handle it */ - reload_sequence_new_file(scene, seq, TRUE); + BKE_sequence_reload_new_file(scene, seq, TRUE); - calc_sequence(scene, seq); + BKE_sequence_calc(scene, seq); /* important else we don't get the imbuf cache flushed */ - free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); + BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE, FALSE); } else { /* lame, set rna filepath */ diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 7849f84e777..8aba1cb1bc7 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -1112,7 +1112,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq) actseq->tmp = SET_INT_IN_POINTER(TRUE); - for (seq_begin(ed, &iter, TRUE); iter.valid; seq_next(&iter)) { + for (BKE_seqence_iterator_begin(ed, &iter, TRUE); iter.valid; BKE_seqence_iterator_next(&iter)) { seq = iter.seq; /* Ignore all seqs already selected! */ @@ -1140,8 +1140,8 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq) changed = TRUE; /* Unfortunately, we must restart checks from the beginning. */ - seq_end(&iter); - seq_begin(ed, &iter, TRUE); + BKE_seqence_iterator_end(&iter); + BKE_seqence_iterator_begin(ed, &iter, TRUE); } /* Video strips bellow active one, or any strip for audio (order do no matters here!). */ @@ -1150,7 +1150,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq) changed = TRUE; } } - seq_end(&iter); + BKE_seqence_iterator_end(&iter); return changed; } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 6db3ba7c493..c22a645eb53 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2237,7 +2237,7 @@ void flushTransSeq(TransInfo *t) switch (tdsq->sel_flag) { case SELECT: #ifdef SEQ_TX_NESTED_METAS - if ((seq->depth != 0 || seq_tx_test(seq))) /* for meta's, their children move */ + if ((seq->depth != 0 || BKE_sequence_tx_test(seq))) /* for meta's, their children move */ seq->start = new_frame - tdsq->start_offset; #else if (seq->type != SEQ_TYPE_META && (seq->depth != 0 || seq_tx_test(seq))) /* for meta's, their children move */ @@ -2249,14 +2249,14 @@ void flushTransSeq(TransInfo *t) } break; case SEQ_LEFTSEL: /* no vertical transform */ - seq_tx_set_final_left(seq, new_frame); - seq_tx_handle_xlimits(seq, tdsq->flag & SEQ_LEFTSEL, tdsq->flag & SEQ_RIGHTSEL); - seq_single_fix(seq); /* todo - move this into aftertrans update? - old seq tx needed it anyway */ + BKE_sequence_tx_set_final_left(seq, new_frame); + BKE_sequence_tx_handle_xlimits(seq, tdsq->flag & SEQ_LEFTSEL, tdsq->flag & SEQ_RIGHTSEL); + BKE_sequence_single_fix(seq); /* todo - move this into aftertrans update? - old seq tx needed it anyway */ break; case SEQ_RIGHTSEL: /* no vertical transform */ - seq_tx_set_final_right(seq, new_frame); - seq_tx_handle_xlimits(seq, tdsq->flag & SEQ_LEFTSEL, tdsq->flag & SEQ_RIGHTSEL); - seq_single_fix(seq); /* todo - move this into aftertrans update? - old seq tx needed it anyway */ + BKE_sequence_tx_set_final_right(seq, new_frame); + BKE_sequence_tx_handle_xlimits(seq, tdsq->flag & SEQ_LEFTSEL, tdsq->flag & SEQ_RIGHTSEL); + BKE_sequence_single_fix(seq); /* todo - move this into aftertrans update? - old seq tx needed it anyway */ break; } @@ -2265,14 +2265,14 @@ void flushTransSeq(TransInfo *t) /* Calculate this strip and all nested strips * children are ALWAYS transformed first * so we don't need to do this in another loop. */ - calc_sequence(t->scene, seq); + BKE_sequence_calc(t->scene, seq); } else { - calc_sequence_disp(t->scene, seq); + BKE_sequence_calc_disp(t->scene, seq); } if (tdsq->sel_flag == SELECT) - seq_offset_animdata(t->scene, seq, seq->start - old_start); + BKE_sequencer_offset_animdata(t->scene, seq, seq->start - old_start); } seq_prev = seq; } @@ -2284,12 +2284,12 @@ void flushTransSeq(TransInfo *t) /* calc all meta's then effects [#27953] */ for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->type == SEQ_TYPE_META && seq->flag & SELECT) { - calc_sequence(t->scene, seq); + BKE_sequence_calc(t->scene, seq); } } for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->seq1 || seq->seq2 || seq->seq3) { - calc_sequence(t->scene, seq); + BKE_sequence_calc(t->scene, seq); } } } @@ -2306,7 +2306,7 @@ void flushTransSeq(TransInfo *t) if (seq->depth == 0) { /* test overlap, displayes red outline */ seq->flag &= ~SEQ_OVERLAP; - if (seq_test_overlap(seqbasep, seq)) { + if (BKE_sequence_test_overlap(seqbasep, seq)) { seq->flag |= SEQ_OVERLAP; } } @@ -3955,8 +3955,8 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count Scene *scene = t->scene; int cfra = CFRA; - int left = seq_tx_get_final_left(seq, 1); - int right = seq_tx_get_final_right(seq, 1); + int left = BKE_sequence_tx_get_final_left(seq, 1); + int right = BKE_sequence_tx_get_final_right(seq, 1); if (seq->depth == 0 && ((seq->flag & SELECT) == 0 || (seq->flag & SEQ_LOCK))) { *recursive = FALSE; @@ -4091,16 +4091,16 @@ static TransData *SeqToTransData(TransData *td, TransData2D *td2d, TransDataSeq /* Use seq_tx_get_final_left() and an offset here * so transform has the left hand location of the strip. * tdsq->start_offset is used when flushing the tx data back */ - start_left = seq_tx_get_final_left(seq, 0); + start_left = BKE_sequence_tx_get_final_left(seq, 0); td2d->loc[0] = start_left; tdsq->start_offset = start_left - seq->start; /* use to apply the original location */ break; case SEQ_LEFTSEL: - start_left = seq_tx_get_final_left(seq, 0); + start_left = BKE_sequence_tx_get_final_left(seq, 0); td2d->loc[0] = start_left; break; case SEQ_RIGHTSEL: - td2d->loc[0] = seq_tx_get_final_right(seq, 0); + td2d->loc[0] = BKE_sequence_tx_get_final_right(seq, 0); break; } @@ -4271,7 +4271,7 @@ static void freeSeqData(TransInfo *t) } } - shuffle_seq_time(seqbasep, t->scene); + BKE_sequence_base_shuffle_time(seqbasep, t->scene); for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->machine >= MAXSEQ * 2) { @@ -4283,10 +4283,10 @@ static void freeSeqData(TransInfo *t) } } - shuffle_seq_time(seqbasep, t->scene); + BKE_sequence_base_shuffle_time(seqbasep, t->scene); } else { - shuffle_seq_time(seqbasep, t->scene); + BKE_sequence_base_shuffle_time(seqbasep, t->scene); } #else shuffle_seq_time(seqbasep, t->scene); @@ -4300,7 +4300,7 @@ static void freeSeqData(TransInfo *t) seq = ((TransDataSeq *)td->extra)->seq; if ((seq != seq_prev)) { if ((seq->type & SEQ_TYPE_EFFECT) && seq->seq1) { - calc_sequence(t->scene, seq); + BKE_sequence_calc(t->scene, seq); } } } @@ -4312,8 +4312,8 @@ static void freeSeqData(TransInfo *t) seq = ((TransDataSeq *)td->extra)->seq; if ((seq != seq_prev)) { if ((seq->type & SEQ_TYPE_EFFECT) && seq->seq1) { - if (seq_test_overlap(seqbasep, seq)) { - shuffle_seq(seqbasep, seq, t->scene); + if (BKE_sequence_test_overlap(seqbasep, seq)) { + BKE_sequence_base_shuffle(seqbasep, seq, t->scene); } } } @@ -4327,9 +4327,9 @@ static void freeSeqData(TransInfo *t) for (seq = seqbasep->first; seq; seq = seq->next) { /* We might want to build a list of effects that need to be updated during transform */ if (seq->type & SEQ_TYPE_EFFECT) { - if (seq->seq1 && seq->seq1->flag & SELECT) calc_sequence(t->scene, seq); - else if (seq->seq2 && seq->seq2->flag & SELECT) calc_sequence(t->scene, seq); - else if (seq->seq3 && seq->seq3->flag & SELECT) calc_sequence(t->scene, seq); + if (seq->seq1 && seq->seq1->flag & SELECT) BKE_sequence_calc(t->scene, seq); + else if (seq->seq2 && seq->seq2->flag & SELECT) BKE_sequence_calc(t->scene, seq); + else if (seq->seq3 && seq->seq3->flag & SELECT) BKE_sequence_calc(t->scene, seq); } } @@ -4340,7 +4340,7 @@ static void freeSeqData(TransInfo *t) for (a = 0; a < t->total; a++, td++) { seq = ((TransDataSeq *)td->extra)->seq; if ((seq != seq_prev) && (seq->depth == 0)) { - calc_sequence_disp(t->scene, seq); + BKE_sequence_calc_disp(t->scene, seq); } seq_prev = seq; } |