diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-12-19 07:57:27 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2020-12-19 08:29:15 +0300 |
commit | 046ca0749a9389ec52da90b29c8b2032f3225c51 (patch) | |
tree | 27ffdc0dc4d986296f3933370c1071ea5c505b94 /source/blender/sequencer/intern | |
parent | 6942dd9f49003ead61f9a0e52b398ebc74a5e3cb (diff) |
Cleanup: Rename BKE_sequencer functions
API functions get SEQ_ prefix.
Intern functions get seq_ prefix
Functions also have appropriate category included in name.
Diffstat (limited to 'source/blender/sequencer/intern')
21 files changed, 470 insertions, 488 deletions
diff --git a/source/blender/sequencer/intern/clipboard.c b/source/blender/sequencer/intern/clipboard.c index 7d37dab93dd..7a9a06a744a 100644 --- a/source/blender/sequencer/intern/clipboard.c +++ b/source/blender/sequencer/intern/clipboard.c @@ -56,13 +56,13 @@ ListBase seqbase_clipboard; int seqbase_clipboard_frame; -void BKE_sequencer_base_clipboard_pointers_free(struct ListBase *seqbase); +void seq_clipboard_pointers_free(struct ListBase *seqbase); -void BKE_sequencer_free_clipboard(void) +void SEQ_clipboard_free(void) { Sequence *seq, *nseq; - BKE_sequencer_base_clipboard_pointers_free(&seqbase_clipboard); + seq_clipboard_pointers_free(&seqbase_clipboard); for (seq = seqbase_clipboard.first; seq; seq = nseq) { nseq = seq->next; @@ -153,27 +153,27 @@ static void sequence_clipboard_pointers(Main *bmain, } /* recursive versions of functions above */ -void BKE_sequencer_base_clipboard_pointers_free(ListBase *seqbase) +void seq_clipboard_pointers_free(ListBase *seqbase) { Sequence *seq; for (seq = seqbase->first; seq; seq = seq->next) { sequence_clipboard_pointers(NULL, seq, seqclipboard_ptr_free); - BKE_sequencer_base_clipboard_pointers_free(&seq->seqbase); + seq_clipboard_pointers_free(&seq->seqbase); } } -void BKE_sequencer_base_clipboard_pointers_store(Main *bmain, ListBase *seqbase) +void SEQ_clipboard_pointers_store(Main *bmain, ListBase *seqbase) { Sequence *seq; for (seq = seqbase->first; seq; seq = seq->next) { sequence_clipboard_pointers(bmain, seq, seqclipboard_ptr_store); - BKE_sequencer_base_clipboard_pointers_store(bmain, &seq->seqbase); + SEQ_clipboard_pointers_store(bmain, &seq->seqbase); } } -void BKE_sequencer_base_clipboard_pointers_restore(ListBase *seqbase, Main *bmain) +void SEQ_clipboard_pointers_restore(ListBase *seqbase, Main *bmain) { Sequence *seq; for (seq = seqbase->first; seq; seq = seq->next) { sequence_clipboard_pointers(bmain, seq, seqclipboard_ptr_restore); - BKE_sequencer_base_clipboard_pointers_restore(&seq->seqbase, bmain); + SEQ_clipboard_pointers_restore(&seq->seqbase, bmain); } } diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index 8ffbc453517..58dd6d6e048 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -2988,7 +2988,7 @@ static ImBuf *do_multicam(const SeqRenderData *context, if (!ed) { return NULL; } - seqbasep = BKE_sequence_seqbase(&ed->seqbase, seq); + seqbasep = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); if (!seqbasep) { return NULL; } @@ -3019,7 +3019,7 @@ static ImBuf *do_adjustment_impl(const SeqRenderData *context, Sequence *seq, fl ed = context->scene->ed; - seqbasep = BKE_sequence_seqbase(&ed->seqbase, seq); + seqbasep = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); if (seq->machine > 1) { i = seq_render_give_ibuf_seqbase(context, timeline_frame, seq->machine - 1, seqbasep); @@ -3033,7 +3033,7 @@ static ImBuf *do_adjustment_impl(const SeqRenderData *context, Sequence *seq, fl if (!i) { Sequence *meta; - meta = BKE_sequence_metastrip(&ed->seqbase, NULL, seq); + meta = seq_find_metastrip_by_sequence(&ed->seqbase, NULL, seq); if (meta) { i = do_adjustment_impl(context, meta, timeline_frame); @@ -3129,7 +3129,7 @@ static void store_icu_yrange_speed(Sequence *seq, short UNUSED(adrcode), float * SpeedControlVars *v = (SpeedControlVars *)seq->effectdata; /* if not already done, load / initialize data */ - BKE_sequence_get_effect(seq); + SEQ_effect_handle_get(seq); if ((v->flags & SEQ_SPEED_INTEGRATE) != 0) { *ymin = -100.0; @@ -3147,7 +3147,7 @@ static void store_icu_yrange_speed(Sequence *seq, short UNUSED(adrcode), float * } } -void BKE_sequence_effect_speed_rebuild_map(Scene *scene, Sequence *seq, bool force) +void seq_effect_speed_rebuild_map(Scene *scene, Sequence *seq, bool force) { int timeline_frame; float fallback_fac = 1.0f; @@ -3156,7 +3156,7 @@ void BKE_sequence_effect_speed_rebuild_map(Scene *scene, Sequence *seq, bool for int flags = v->flags; /* if not already done, load / initialize data */ - BKE_sequence_get_effect(seq); + SEQ_effect_handle_get(seq); if ((force == false) && (seq->len == v->length) && (v->frameMap != NULL)) { return; @@ -3252,14 +3252,14 @@ void BKE_sequence_effect_speed_rebuild_map(Scene *scene, Sequence *seq, bool for } /* Override timeline_frame when rendering speed effect input. */ -float BKE_sequencer_speed_effect_target_frame_get(const SeqRenderData *context, - Sequence *seq, - float timeline_frame, - int input) +float seq_speed_effect_target_frame_get(const SeqRenderData *context, + Sequence *seq, + float timeline_frame, + int input) { int frame_index = seq_give_frame_index(seq, timeline_frame); SpeedControlVars *s = (SpeedControlVars *)seq->effectdata; - BKE_sequence_effect_speed_rebuild_map(context->scene, seq, false); + seq_effect_speed_rebuild_map(context->scene, seq, false); /* No interpolation. */ if ((s->flags & SEQ_SPEED_USE_INTERPOLATION) == 0) { @@ -3804,7 +3804,7 @@ static void init_text_effect(Sequence *seq) data->align_y = SEQ_TEXT_ALIGN_Y_BOTTOM; } -void BKE_sequencer_text_font_unload(TextVars *data, const bool do_id_user) +void SEQ_effect_text_font_unload(TextVars *data, const bool do_id_user) { if (data) { /* Unlink the VFont */ @@ -3820,7 +3820,7 @@ void BKE_sequencer_text_font_unload(TextVars *data, const bool do_id_user) } } -void BKE_sequencer_text_font_load(TextVars *data, const bool do_id_user) +void SEQ_effect_text_font_load(TextVars *data, const bool do_id_user) { if (data->text_font != NULL) { if (do_id_user) { @@ -3839,7 +3839,7 @@ void BKE_sequencer_text_font_load(TextVars *data, const bool do_id_user) static void free_text_effect(Sequence *seq, const bool do_id_user) { TextVars *data = seq->effectdata; - BKE_sequencer_text_font_unload(data, do_id_user); + SEQ_effect_text_font_unload(data, do_id_user); if (data) { MEM_freeN(data); @@ -3850,7 +3850,7 @@ static void free_text_effect(Sequence *seq, const bool do_id_user) static void load_text_effect(Sequence *seq) { TextVars *data = seq->effectdata; - BKE_sequencer_text_font_load(data, false); + SEQ_effect_text_font_load(data, false); } static void copy_text_effect(Sequence *dst, Sequence *src, const int flag) @@ -3859,7 +3859,7 @@ static void copy_text_effect(Sequence *dst, Sequence *src, const int flag) TextVars *data = dst->effectdata; data->text_blf_id = -1; - BKE_sequencer_text_font_load(data, (flag & LIB_ID_CREATE_NO_USER_REFCOUNT) == 0); + SEQ_effect_text_font_load(data, (flag & LIB_ID_CREATE_NO_USER_REFCOUNT) == 0); } static int num_inputs_text(void) @@ -4275,7 +4275,7 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type) return rval; } -struct SeqEffectHandle BKE_sequence_get_effect(Sequence *seq) +struct SeqEffectHandle SEQ_effect_handle_get(Sequence *seq) { struct SeqEffectHandle rval = {false, false, NULL}; @@ -4290,7 +4290,7 @@ struct SeqEffectHandle BKE_sequence_get_effect(Sequence *seq) return rval; } -struct SeqEffectHandle BKE_sequence_get_blend(Sequence *seq) +struct SeqEffectHandle seq_effect_get_sequence_blend(Sequence *seq) { struct SeqEffectHandle rval = {false, false, NULL}; @@ -4312,7 +4312,7 @@ struct SeqEffectHandle BKE_sequence_get_blend(Sequence *seq) return rval; } -int BKE_sequence_effect_get_num_inputs(int seq_type) +int SEQ_effect_get_num_inputs(int seq_type) { struct SeqEffectHandle rval = get_sequence_effect_impl(seq_type); diff --git a/source/blender/sequencer/intern/effects.h b/source/blender/sequencer/intern/effects.h index 6a94c0ea9d9..1bce4f324c3 100644 --- a/source/blender/sequencer/intern/effects.h +++ b/source/blender/sequencer/intern/effects.h @@ -38,12 +38,12 @@ struct Sequence; * ********************************************************************** */ -struct SeqEffectHandle BKE_sequence_get_blend(struct Sequence *seq); -void BKE_sequence_effect_speed_rebuild_map(struct Scene *scene, struct Sequence *seq, bool force); -float BKE_sequencer_speed_effect_target_frame_get(const struct SeqRenderData *context, - struct Sequence *seq, - float timeline_frame, - int input); +struct SeqEffectHandle seq_effect_get_sequence_blend(struct Sequence *seq); +void seq_effect_speed_rebuild_map(struct Scene *scene, struct Sequence *seq, bool force); +float seq_speed_effect_target_frame_get(const struct SeqRenderData *context, + struct Sequence *seq, + float timeline_frame, + int input); #ifdef __cplusplus } diff --git a/source/blender/sequencer/intern/image_cache.c b/source/blender/sequencer/intern/image_cache.c index d515a13cdee..6eb12df7186 100644 --- a/source/blender/sequencer/intern/image_cache.c +++ b/source/blender/sequencer/intern/image_cache.c @@ -803,7 +803,7 @@ static void seq_cache_valfree(void *val) BLI_mempool_free(item->cache_owner->items_pool, item); } -static void seq_cache_put(SeqCache *cache, SeqCacheKey *key, ImBuf *ibuf) +static void seq_cache_put_ex(SeqCache *cache, SeqCacheKey *key, ImBuf *ibuf) { SeqCacheItem *item; item = BLI_mempool_alloc(cache->items_pool); @@ -817,7 +817,7 @@ static void seq_cache_put(SeqCache *cache, SeqCacheKey *key, ImBuf *ibuf) } } -static ImBuf *seq_cache_get(SeqCache *cache, SeqCacheKey *key) +static ImBuf *seq_cache_get_ex(SeqCache *cache, SeqCacheKey *key) { SeqCacheItem *item = BLI_ghash_lookup(cache->hash, key); @@ -856,10 +856,9 @@ static SeqCacheKey *seq_cache_choose_key(Scene *scene, SeqCacheKey *lkey, SeqCac * We could use temp cache as a shield and later make it a non-temporary entry, * but it is not worth of increasing system complexity. */ - if (scene->ed->cache_flag & SEQ_CACHE_PREFETCH_ENABLE && - BKE_sequencer_prefetch_job_is_running(scene)) { + if (scene->ed->cache_flag & SEQ_CACHE_PREFETCH_ENABLE && seq_prefetch_job_is_running(scene)) { int pfjob_start, pfjob_end; - BKE_sequencer_prefetch_get_time_range(scene, &pfjob_start, &pfjob_end); + seq_prefetch_get_time_range(scene, &pfjob_start, &pfjob_end); if (lkey) { if (lkey->timeline_frame < pfjob_start || lkey->timeline_frame > pfjob_end) { @@ -990,7 +989,7 @@ static SeqCacheKey *seq_cache_get_item_for_removal(Scene *scene) /* Find only "base" keys. * Sources(other types) for a frame must be freed all at once. */ -bool BKE_sequencer_cache_recycle_item(Scene *scene) +bool seq_cache_recycle_item(Scene *scene) { size_t memory_total = seq_cache_get_mem_total(); SeqCache *cache = seq_cache_get_from_scene(scene); @@ -1083,7 +1082,7 @@ static void seq_cache_create(Main *bmain, Scene *scene) /* ***************************** API ****************************** */ -void BKE_sequencer_cache_free_temp_cache(Scene *scene, short id, int timeline_frame) +void seq_cache_free_temp_cache(Scene *scene, short id, int timeline_frame) { SeqCache *cache = seq_cache_get_from_scene(scene); if (!cache) { @@ -1111,7 +1110,7 @@ void BKE_sequencer_cache_free_temp_cache(Scene *scene, short id, int timeline_fr seq_cache_unlock(scene); } -void BKE_sequencer_cache_destruct(Scene *scene) +void seq_cache_destruct(Scene *scene) { SeqCache *cache = seq_cache_get_from_scene(scene); if (!cache) { @@ -1133,15 +1132,15 @@ void BKE_sequencer_cache_destruct(Scene *scene) scene->ed->cache = NULL; } -void BKE_sequencer_cache_cleanup_all(Main *bmain) +void seq_cache_cleanup_all(Main *bmain) { for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) { - BKE_sequencer_cache_cleanup(scene); + SEQ_cache_cleanup(scene); } } -void BKE_sequencer_cache_cleanup(Scene *scene) +void SEQ_cache_cleanup(Scene *scene) { - BKE_sequencer_prefetch_stop(scene); + SEQ_prefetch_stop(scene); SeqCache *cache = seq_cache_get_from_scene(scene); if (!cache) { @@ -1162,11 +1161,11 @@ void BKE_sequencer_cache_cleanup(Scene *scene) seq_cache_unlock(scene); } -void BKE_sequencer_cache_cleanup_sequence(Scene *scene, - Sequence *seq, - Sequence *seq_changed, - int invalidate_types, - bool force_seq_changed_range) +void seq_cache_cleanup_sequence(Scene *scene, + Sequence *seq, + Sequence *seq_changed, + int invalidate_types, + bool force_seq_changed_range) { SeqCache *cache = seq_cache_get_from_scene(scene); if (!cache) { @@ -1226,11 +1225,11 @@ void BKE_sequencer_cache_cleanup_sequence(Scene *scene, seq_cache_unlock(scene); } -struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context, - Sequence *seq, - float timeline_frame, - int type, - bool skip_disk_cache) +struct ImBuf *seq_cache_get(const SeqRenderData *context, + Sequence *seq, + float timeline_frame, + int type, + bool skip_disk_cache) { if (context->skip_cache || context->is_proxy_render || !seq) { @@ -1240,9 +1239,9 @@ struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context, Scene *scene = context->scene; if (context->is_prefetch_render) { - context = BKE_sequencer_prefetch_get_original_context(context); + context = seq_prefetch_get_original_context(context); scene = context->scene; - seq = BKE_sequencer_prefetch_get_original_sequence(seq, scene); + seq = seq_prefetch_get_original_sequence(seq, scene); } if (!seq) { @@ -1265,7 +1264,7 @@ struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context, key.frame_index = seq_cache_timeline_frame_to_frame_index(seq, timeline_frame, type); key.type = type; - ibuf = seq_cache_get(cache, &key); + ibuf = seq_cache_get_ex(cache, &key); } seq_cache_unlock(scene); @@ -1284,10 +1283,10 @@ struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context, BLI_mutex_unlock(&cache->disk_cache->read_write_mutex); if (ibuf) { if (key.type == SEQ_CACHE_STORE_FINAL_OUT) { - BKE_sequencer_cache_put_if_possible(context, seq, timeline_frame, type, ibuf, 0.0f, true); + seq_cache_put_if_possible(context, seq, timeline_frame, type, ibuf, 0.0f, true); } else { - BKE_sequencer_cache_put(context, seq, timeline_frame, type, ibuf, 0.0f, true); + seq_cache_put(context, seq, timeline_frame, type, ibuf, 0.0f, true); } } } @@ -1295,28 +1294,28 @@ struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context, return ibuf; } -bool BKE_sequencer_cache_put_if_possible(const SeqRenderData *context, - Sequence *seq, - float timeline_frame, - int type, - ImBuf *ibuf, - float cost, - bool skip_disk_cache) +bool seq_cache_put_if_possible(const SeqRenderData *context, + Sequence *seq, + float timeline_frame, + int type, + ImBuf *ibuf, + float cost, + bool skip_disk_cache) { Scene *scene = context->scene; if (context->is_prefetch_render) { - context = BKE_sequencer_prefetch_get_original_context(context); + context = seq_prefetch_get_original_context(context); scene = context->scene; - seq = BKE_sequencer_prefetch_get_original_sequence(seq, scene); + seq = seq_prefetch_get_original_sequence(seq, scene); } if (!seq) { return false; } - if (BKE_sequencer_cache_recycle_item(scene)) { - BKE_sequencer_cache_put(context, seq, timeline_frame, type, ibuf, cost, skip_disk_cache); + if (seq_cache_recycle_item(scene)) { + seq_cache_put(context, seq, timeline_frame, type, ibuf, cost, skip_disk_cache); return true; } @@ -1325,13 +1324,13 @@ bool BKE_sequencer_cache_put_if_possible(const SeqRenderData *context, return false; } -void BKE_sequencer_cache_put(const SeqRenderData *context, - Sequence *seq, - float timeline_frame, - int type, - ImBuf *i, - float cost, - bool skip_disk_cache) +void seq_cache_put(const SeqRenderData *context, + Sequence *seq, + float timeline_frame, + int type, + ImBuf *i, + float cost, + bool skip_disk_cache) { if (i == NULL || context->skip_cache || context->is_proxy_render || !seq) { return; @@ -1340,14 +1339,14 @@ void BKE_sequencer_cache_put(const SeqRenderData *context, Scene *scene = context->scene; if (context->is_prefetch_render) { - context = BKE_sequencer_prefetch_get_original_context(context); + context = seq_prefetch_get_original_context(context); scene = context->scene; - seq = BKE_sequencer_prefetch_get_original_sequence(seq, scene); + seq = seq_prefetch_get_original_sequence(seq, scene); BLI_assert(seq != NULL); } /* Prevent reinserting, it breaks cache key linking. */ - ImBuf *test = BKE_sequencer_cache_get(context, seq, timeline_frame, type, true); + ImBuf *test = seq_cache_get(context, seq, timeline_frame, type, true); if (test) { IMB_freeImBuf(test); return; @@ -1398,7 +1397,7 @@ void BKE_sequencer_cache_put(const SeqRenderData *context, } SeqCacheKey *temp_last_key = cache->last_key; - seq_cache_put(cache, key, i); + seq_cache_put_ex(cache, key, i); /* Restore pointer to previous item as this one will be freed when stack is rendered. */ if (key->is_temp_cache) { @@ -1433,14 +1432,14 @@ void BKE_sequencer_cache_put(const SeqRenderData *context, } } -void BKE_sequencer_cache_iterate(struct Scene *scene, - void *userdata, - bool callback_init(void *userdata, size_t item_count), - bool callback_iter(void *userdata, - struct Sequence *seq, - int timeline_frame, - int cache_type, - float cost)) +void SEQ_cache_iterate(struct Scene *scene, + void *userdata, + bool callback_init(void *userdata, size_t item_count), + bool callback_iter(void *userdata, + struct Sequence *seq, + int timeline_frame, + int cache_type, + float cost)) { SeqCache *cache = seq_cache_get_from_scene(scene); if (!cache) { @@ -1464,7 +1463,7 @@ void BKE_sequencer_cache_iterate(struct Scene *scene, seq_cache_unlock(scene); } -bool BKE_sequencer_cache_is_full(Scene *scene) +bool seq_cache_is_full(Scene *scene) { size_t memory_total = seq_cache_get_mem_total(); SeqCache *cache = seq_cache_get_from_scene(scene); diff --git a/source/blender/sequencer/intern/image_cache.h b/source/blender/sequencer/intern/image_cache.h index 2cb35670a2c..ed2d5dee910 100644 --- a/source/blender/sequencer/intern/image_cache.h +++ b/source/blender/sequencer/intern/image_cache.h @@ -37,35 +37,35 @@ struct Sequence; } #endif -struct ImBuf *BKE_sequencer_cache_get(const struct SeqRenderData *context, - struct Sequence *seq, - float timeline_frame, - int type, - bool skip_disk_cache); -void BKE_sequencer_cache_put(const struct SeqRenderData *context, - struct Sequence *seq, - float timeline_frame, - int type, - struct ImBuf *i, - float cost, - bool skip_disk_cache); -bool BKE_sequencer_cache_put_if_possible(const struct SeqRenderData *context, - struct Sequence *seq, - float timeline_frame, - int type, - struct ImBuf *nval, - float cost, - bool skip_disk_cache); -bool BKE_sequencer_cache_recycle_item(struct Scene *scene); -void BKE_sequencer_cache_free_temp_cache(struct Scene *scene, short id, int timeline_frame); -void BKE_sequencer_cache_destruct(struct Scene *scene); -void BKE_sequencer_cache_cleanup_all(struct Main *bmain); -void BKE_sequencer_cache_cleanup_sequence(struct Scene *scene, - struct Sequence *seq, - struct Sequence *seq_changed, - int invalidate_types, - bool force_seq_changed_range); -bool BKE_sequencer_cache_is_full(struct Scene *scene); +struct ImBuf *seq_cache_get(const struct SeqRenderData *context, + struct Sequence *seq, + float timeline_frame, + int type, + bool skip_disk_cache); +void seq_cache_put(const struct SeqRenderData *context, + struct Sequence *seq, + float timeline_frame, + int type, + struct ImBuf *i, + float cost, + bool skip_disk_cache); +bool seq_cache_put_if_possible(const struct SeqRenderData *context, + struct Sequence *seq, + float timeline_frame, + int type, + struct ImBuf *nval, + float cost, + bool skip_disk_cache); +bool seq_cache_recycle_item(struct Scene *scene); +void seq_cache_free_temp_cache(struct Scene *scene, short id, int timeline_frame); +void seq_cache_destruct(struct Scene *scene); +void seq_cache_cleanup_all(struct Main *bmain); +void seq_cache_cleanup_sequence(struct Scene *scene, + struct Sequence *seq, + struct Sequence *seq_changed, + int invalidate_types, + bool force_seq_changed_range); +bool seq_cache_is_full(struct Scene *scene); #ifdef __cplusplus } diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c index fe6f4184ab1..7d54795b150 100644 --- a/source/blender/sequencer/intern/iterator.c +++ b/source/blender/sequencer/intern/iterator.c @@ -108,7 +108,7 @@ static void seq_array(Editing *ed, } } -void BKE_sequence_iterator_begin(Editing *ed, SeqIterator *iter, const bool use_current_sequences) +void SEQ_iterator_begin(Editing *ed, SeqIterator *iter, const bool use_current_sequences) { memset(iter, 0, sizeof(*iter)); seq_array(ed, &iter->array, &iter->tot, use_current_sequences); @@ -120,7 +120,7 @@ void BKE_sequence_iterator_begin(Editing *ed, SeqIterator *iter, const bool use_ } } -void BKE_sequence_iterator_next(SeqIterator *iter) +void SEQ_iterator_next(SeqIterator *iter) { if (++iter->cur < iter->tot) { iter->seq = iter->array[iter->cur]; @@ -130,7 +130,7 @@ void BKE_sequence_iterator_next(SeqIterator *iter) } } -void BKE_sequence_iterator_end(SeqIterator *iter) +void SEQ_iterator_end(SeqIterator *iter) { if (iter->array) { MEM_freeN(iter->array); @@ -139,20 +139,20 @@ void BKE_sequence_iterator_end(SeqIterator *iter) iter->valid = 0; } -int BKE_sequencer_base_recursive_apply(ListBase *seqbase, - int (*apply_fn)(Sequence *seq, void *), - void *arg) +int SEQ_iterator_seqbase_recursive_apply(ListBase *seqbase, + int (*apply_fn)(Sequence *seq, void *), + void *arg) { Sequence *iseq; for (iseq = seqbase->first; iseq; iseq = iseq->next) { - if (BKE_sequencer_recursive_apply(iseq, apply_fn, arg) == -1) { + if (SEQ_iterator_recursive_apply(iseq, apply_fn, arg) == -1) { return -1; /* bail out */ } } return 1; } -int BKE_sequencer_recursive_apply(Sequence *seq, int (*apply_fn)(Sequence *, void *), void *arg) +int SEQ_iterator_recursive_apply(Sequence *seq, int (*apply_fn)(Sequence *, void *), void *arg) { int ret = apply_fn(seq, arg); @@ -161,7 +161,7 @@ int BKE_sequencer_recursive_apply(Sequence *seq, int (*apply_fn)(Sequence *, voi } if (ret && seq->seqbase.first) { - ret = BKE_sequencer_base_recursive_apply(&seq->seqbase, apply_fn, arg); + ret = SEQ_iterator_seqbase_recursive_apply(&seq->seqbase, apply_fn, arg); } return ret; diff --git a/source/blender/sequencer/intern/modifier.c b/source/blender/sequencer/intern/modifier.c index 2c37ecf1910..99fa228e7a5 100644 --- a/source/blender/sequencer/intern/modifier.c +++ b/source/blender/sequencer/intern/modifier.c @@ -1316,7 +1316,7 @@ static void sequence_modifier_type_info_init(void) #undef INIT_TYPE } -const SequenceModifierTypeInfo *BKE_sequence_modifier_type_info_get(int type) +const SequenceModifierTypeInfo *SEQ_modifier_type_info_get(int type) { if (!modifierTypesInit) { sequence_modifier_type_info_init(); @@ -1326,10 +1326,10 @@ const SequenceModifierTypeInfo *BKE_sequence_modifier_type_info_get(int type) return modifiersTypes[type]; } -SequenceModifierData *BKE_sequence_modifier_new(Sequence *seq, const char *name, int type) +SequenceModifierData *SEQ_modifier_new(Sequence *seq, const char *name, int type) { SequenceModifierData *smd; - const SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(type); + const SequenceModifierTypeInfo *smti = SEQ_modifier_type_info_get(type); smd = MEM_callocN(smti->struct_size, "sequence modifier"); @@ -1345,7 +1345,7 @@ SequenceModifierData *BKE_sequence_modifier_new(Sequence *seq, const char *name, BLI_addtail(&seq->modifiers, smd); - BKE_sequence_modifier_unique_name(seq, smd); + SEQ_modifier_unique_name(seq, smd); if (smti->init_data) { smti->init_data(smd); @@ -1354,33 +1354,33 @@ SequenceModifierData *BKE_sequence_modifier_new(Sequence *seq, const char *name, return smd; } -bool BKE_sequence_modifier_remove(Sequence *seq, SequenceModifierData *smd) +bool SEQ_modifier_remove(Sequence *seq, SequenceModifierData *smd) { if (BLI_findindex(&seq->modifiers, smd) == -1) { return false; } BLI_remlink(&seq->modifiers, smd); - BKE_sequence_modifier_free(smd); + SEQ_modifier_free(smd); return true; } -void BKE_sequence_modifier_clear(Sequence *seq) +void SEQ_modifier_clear(Sequence *seq) { SequenceModifierData *smd, *smd_next; for (smd = seq->modifiers.first; smd; smd = smd_next) { smd_next = smd->next; - BKE_sequence_modifier_free(smd); + SEQ_modifier_free(smd); } BLI_listbase_clear(&seq->modifiers); } -void BKE_sequence_modifier_free(SequenceModifierData *smd) +void SEQ_modifier_free(SequenceModifierData *smd) { - const SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(smd->type); + const SequenceModifierTypeInfo *smti = SEQ_modifier_type_info_get(smd->type); if (smti && smti->free_data) { smti->free_data(smd); @@ -1389,9 +1389,9 @@ void BKE_sequence_modifier_free(SequenceModifierData *smd) MEM_freeN(smd); } -void BKE_sequence_modifier_unique_name(Sequence *seq, SequenceModifierData *smd) +void SEQ_modifier_unique_name(Sequence *seq, SequenceModifierData *smd) { - const SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(smd->type); + const SequenceModifierTypeInfo *smti = SEQ_modifier_type_info_get(smd->type); BLI_uniquename(&seq->modifiers, smd, @@ -1401,15 +1401,15 @@ void BKE_sequence_modifier_unique_name(Sequence *seq, SequenceModifierData *smd) sizeof(smd->name)); } -SequenceModifierData *BKE_sequence_modifier_find_by_name(Sequence *seq, const char *name) +SequenceModifierData *SEQ_modifier_find_by_name(Sequence *seq, const char *name) { return BLI_findstring(&(seq->modifiers), name, offsetof(SequenceModifierData, name)); } -ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context, - Sequence *seq, - ImBuf *ibuf, - int timeline_frame) +ImBuf *SEQ_modifier_apply_stack(const SeqRenderData *context, + Sequence *seq, + ImBuf *ibuf, + int timeline_frame) { SequenceModifierData *smd; ImBuf *processed_ibuf = ibuf; @@ -1420,7 +1420,7 @@ ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context, } for (smd = seq->modifiers.first; smd; smd = smd->next) { - const SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(smd->type); + const SequenceModifierTypeInfo *smti = SEQ_modifier_type_info_get(smd->type); /* could happen if modifier is being removed or not exists in current version of blender */ if (!smti) { @@ -1463,13 +1463,13 @@ ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context, return processed_ibuf; } -void BKE_sequence_modifier_list_copy(Sequence *seqn, Sequence *seq) +void SEQ_modifier_list_copy(Sequence *seqn, Sequence *seq) { SequenceModifierData *smd; for (smd = seq->modifiers.first; smd; smd = smd->next) { SequenceModifierData *smdn; - const SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(smd->type); + const SequenceModifierTypeInfo *smti = SEQ_modifier_type_info_get(smd->type); smdn = MEM_dupallocN(smd); @@ -1482,7 +1482,7 @@ void BKE_sequence_modifier_list_copy(Sequence *seqn, Sequence *seq) } } -int BKE_sequence_supports_modifiers(Sequence *seq) +int SEQ_sequence_supports_modifiers(Sequence *seq) { return !ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD); } @@ -1493,10 +1493,10 @@ int BKE_sequence_supports_modifiers(Sequence *seq) /** \name .blend File I/O * \{ */ -void BKE_sequence_modifier_blend_write(BlendWriter *writer, ListBase *modbase) +void SEQ_modifier_blend_write(BlendWriter *writer, ListBase *modbase) { LISTBASE_FOREACH (SequenceModifierData *, smd, modbase) { - const SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(smd->type); + const SequenceModifierTypeInfo *smti = SEQ_modifier_type_info_get(smd->type); if (smti) { BLO_write_struct_by_name(writer, smti->struct_name, smd); @@ -1518,7 +1518,7 @@ void BKE_sequence_modifier_blend_write(BlendWriter *writer, ListBase *modbase) } } -void BKE_sequence_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb) +void SEQ_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb) { BLO_read_list(reader, lb); @@ -1540,7 +1540,7 @@ void BKE_sequence_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb } } -void BKE_sequence_modifier_blend_read_lib(BlendLibReader *reader, Scene *scene, ListBase *lb) +void SEQ_modifier_blend_read_lib(BlendLibReader *reader, Scene *scene, ListBase *lb) { LISTBASE_FOREACH (SequenceModifierData *, smd, lb) { if (smd->mask_id) { diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c index 98b83651ffc..5d769a18a19 100644 --- a/source/blender/sequencer/intern/prefetch.c +++ b/source/blender/sequencer/intern/prefetch.c @@ -118,7 +118,7 @@ static PrefetchJob *seq_prefetch_job_get(Scene *scene) return NULL; } -bool BKE_sequencer_prefetch_job_is_running(Scene *scene) +bool seq_prefetch_job_is_running(Scene *scene) { PrefetchJob *pfjob = seq_prefetch_job_get(scene); @@ -159,14 +159,14 @@ static Sequence *sequencer_prefetch_get_original_sequence(Sequence *seq, ListBas } /* for cache context swapping */ -Sequence *BKE_sequencer_prefetch_get_original_sequence(Sequence *seq, Scene *scene) +Sequence *seq_prefetch_get_original_sequence(Sequence *seq, Scene *scene) { Editing *ed = scene->ed; return sequencer_prefetch_get_original_sequence(seq, &ed->seqbase); } /* for cache context swapping */ -SeqRenderData *BKE_sequencer_prefetch_get_original_context(const SeqRenderData *context) +SeqRenderData *seq_prefetch_get_original_context(const SeqRenderData *context) { PrefetchJob *pfjob = seq_prefetch_job_get(context->scene); @@ -177,11 +177,11 @@ static bool seq_prefetch_is_cache_full(Scene *scene) { PrefetchJob *pfjob = seq_prefetch_job_get(scene); - if (!BKE_sequencer_cache_is_full(pfjob->scene)) { + if (!seq_cache_is_full(pfjob->scene)) { return false; } - return BKE_sequencer_cache_recycle_item(pfjob->scene) == false; + return seq_cache_recycle_item(pfjob->scene) == false; } static float seq_prefetch_cfra(PrefetchJob *pfjob) @@ -193,7 +193,7 @@ static AnimationEvalContext seq_prefetch_anim_eval_context(PrefetchJob *pfjob) return BKE_animsys_eval_context_construct(pfjob->depsgraph, seq_prefetch_cfra(pfjob)); } -void BKE_sequencer_prefetch_get_time_range(Scene *scene, int *start, int *end) +void seq_prefetch_get_time_range(Scene *scene, int *start, int *end) { PrefetchJob *pfjob = seq_prefetch_job_get(scene); @@ -256,18 +256,18 @@ static void seq_prefetch_update_area(PrefetchJob *pfjob) } } -void BKE_sequencer_prefetch_stop_all(void) +void SEQ_prefetch_stop_all(void) { /*TODO(Richard): Use wm_jobs for prefetch, or pass main. */ for (Scene *scene = G.main->scenes.first; scene; scene = scene->id.next) { - BKE_sequencer_prefetch_stop(scene); + SEQ_prefetch_stop(scene); } } /* Use also to update scene and context changes * This function should almost always be called by cache invalidation, not directly. */ -void BKE_sequencer_prefetch_stop(Scene *scene) +void SEQ_prefetch_stop(Scene *scene) { PrefetchJob *pfjob; pfjob = seq_prefetch_job_get(scene); @@ -338,14 +338,14 @@ static void seq_prefetch_resume(Scene *scene) } } -void BKE_sequencer_prefetch_free(Scene *scene) +void seq_prefetch_free(Scene *scene) { PrefetchJob *pfjob = seq_prefetch_job_get(scene); if (!pfjob) { return; } - BKE_sequencer_prefetch_stop(scene); + SEQ_prefetch_stop(scene); BLI_threadpool_remove(&pfjob->threads, pfjob); BLI_threadpool_end(&pfjob->threads); @@ -372,28 +372,28 @@ static bool seq_prefetch_do_skip_frame(Scene *scene) if (seq_arr[i]->type == SEQ_TYPE_SCENE && (seq_arr[i]->flag & SEQ_SCENE_STRIPS) == 0) { int cached_types = 0; - ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT, false); + ibuf = seq_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT, false); if (ibuf != NULL) { cached_types |= SEQ_CACHE_STORE_FINAL_OUT; IMB_freeImBuf(ibuf); ibuf = NULL; } - ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT, false); + ibuf = seq_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT, false); if (ibuf != NULL) { cached_types |= SEQ_CACHE_STORE_COMPOSITE; IMB_freeImBuf(ibuf); ibuf = NULL; } - ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_PREPROCESSED, false); + ibuf = seq_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_PREPROCESSED, false); if (ibuf != NULL) { cached_types |= SEQ_CACHE_STORE_PREPROCESSED; IMB_freeImBuf(ibuf); ibuf = NULL; } - ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_RAW, false); + ibuf = seq_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_RAW, false); if (ibuf != NULL) { cached_types |= SEQ_CACHE_STORE_RAW; IMB_freeImBuf(ibuf); @@ -463,8 +463,7 @@ static void *seq_prefetch_frames(void *job) } ImBuf *ibuf = SEQ_render_give_ibuf(&pfjob->context_cpy, seq_prefetch_cfra(pfjob), 0); - BKE_sequencer_cache_free_temp_cache( - pfjob->scene, pfjob->context.task_id, seq_prefetch_cfra(pfjob)); + seq_cache_free_temp_cache(pfjob->scene, pfjob->context.task_id, seq_prefetch_cfra(pfjob)); IMB_freeImBuf(ibuf); /* Suspend thread if there is nothing to be prefetched. */ @@ -484,15 +483,14 @@ static void *seq_prefetch_frames(void *job) pfjob->num_frames_prefetched++; } - BKE_sequencer_cache_free_temp_cache( - pfjob->scene, pfjob->context.task_id, seq_prefetch_cfra(pfjob)); + seq_cache_free_temp_cache(pfjob->scene, pfjob->context.task_id, seq_prefetch_cfra(pfjob)); pfjob->running = false; pfjob->scene_eval->ed->prefetch_job = NULL; return NULL; } -static PrefetchJob *seq_prefetch_start(const SeqRenderData *context, float cfra) +static PrefetchJob *seq_prefetch_start_ex(const SeqRenderData *context, float cfra) { PrefetchJob *pfjob = seq_prefetch_job_get(context->scene); @@ -529,7 +527,7 @@ static PrefetchJob *seq_prefetch_start(const SeqRenderData *context, float cfra) } /* Start or resume prefetching*/ -void BKE_sequencer_prefetch_start(const SeqRenderData *context, float timeline_frame, float cost) +void seq_prefetch_start(const SeqRenderData *context, float timeline_frame, float cost) { Scene *scene = context->scene; Editing *ed = scene->ed; @@ -538,7 +536,7 @@ void BKE_sequencer_prefetch_start(const SeqRenderData *context, float timeline_f if (!context->is_prefetch_render && !context->is_proxy_render) { bool playing = seq_prefetch_is_playing(context->bmain); bool scrubbing = seq_prefetch_is_scrubbing(context->bmain); - bool running = BKE_sequencer_prefetch_job_is_running(scene); + bool running = seq_prefetch_job_is_running(scene); seq_prefetch_resume(scene); /* conditions to start: * prefetch enabled, prefetch not running, not scrubbing, @@ -549,16 +547,16 @@ void BKE_sequencer_prefetch_start(const SeqRenderData *context, float timeline_f !(playing && cost > 0.9) && ed->cache_flag & SEQ_CACHE_ALL_TYPES && has_strips && !G.is_rendering && !G.moving) { - seq_prefetch_start(context, timeline_frame); + seq_prefetch_start_ex(context, timeline_frame); } } } -bool BKE_sequencer_prefetch_need_redraw(Main *bmain, Scene *scene) +bool SEQ_prefetch_need_redraw(Main *bmain, Scene *scene) { bool playing = seq_prefetch_is_playing(bmain); bool scrubbing = seq_prefetch_is_scrubbing(bmain); - bool running = BKE_sequencer_prefetch_job_is_running(scene); + bool running = seq_prefetch_job_is_running(scene); bool suspended = seq_prefetch_job_is_waiting(scene); /* force redraw, when prefetching and using cache view. */ diff --git a/source/blender/sequencer/intern/prefetch.h b/source/blender/sequencer/intern/prefetch.h index 1633ee297f8..44aedb537ae 100644 --- a/source/blender/sequencer/intern/prefetch.h +++ b/source/blender/sequencer/intern/prefetch.h @@ -35,16 +35,12 @@ struct Sequence; } #endif -void BKE_sequencer_prefetch_start(const struct SeqRenderData *context, - float timeline_frame, - float cost); -void BKE_sequencer_prefetch_free(struct Scene *scene); -bool BKE_sequencer_prefetch_job_is_running(struct Scene *scene); -void BKE_sequencer_prefetch_get_time_range(struct Scene *scene, int *start, int *end); -struct SeqRenderData *BKE_sequencer_prefetch_get_original_context( - const struct SeqRenderData *context); -struct Sequence *BKE_sequencer_prefetch_get_original_sequence(struct Sequence *seq, - struct Scene *scene); +void seq_prefetch_start(const struct SeqRenderData *context, float timeline_frame, float cost); +void seq_prefetch_free(struct Scene *scene); +bool seq_prefetch_job_is_running(struct Scene *scene); +void seq_prefetch_get_time_range(struct Scene *scene, int *start, int *end); +struct SeqRenderData *seq_prefetch_get_original_context(const struct SeqRenderData *context); +struct Sequence *seq_prefetch_get_original_sequence(struct Sequence *seq, struct Scene *scene); #ifdef __cplusplus } diff --git a/source/blender/sequencer/intern/proxy.c b/source/blender/sequencer/intern/proxy.c index ff65216d987..72dc9708ccb 100644 --- a/source/blender/sequencer/intern/proxy.c +++ b/source/blender/sequencer/intern/proxy.c @@ -422,7 +422,7 @@ bool SEQ_proxy_rebuild_context(Main *bmain, context = MEM_callocN(sizeof(SeqIndexBuildContext), "seq proxy rebuild context"); - nseq = BKE_sequence_dupli_recursive(scene, scene, NULL, seq, 0); + nseq = SEQ_sequence_dupli_recursive(scene, scene, NULL, seq, 0); context->tc_flags = nseq->strip->proxy->build_tc_flags; context->size_flags = nseq->strip->proxy->build_size_flags; diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 2e757a06751..84f2a6df647 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -461,9 +461,9 @@ static bool sequencer_use_crop(const Sequence *seq) return false; } -static bool BKE_sequencer_input_have_to_preprocess(const SeqRenderData *context, - Sequence *seq, - float UNUSED(timeline_frame)) +static bool seq_input_have_to_preprocess(const SeqRenderData *context, + Sequence *seq, + float UNUSED(timeline_frame)) { float mul; @@ -717,8 +717,7 @@ static ImBuf *input_preprocess(const SeqRenderData *context, } if (seq->modifiers.first) { - ImBuf *ibuf_new = BKE_sequence_modifier_apply_stack( - context, seq, preprocessed_ibuf, timeline_frame); + ImBuf *ibuf_new = SEQ_modifier_apply_stack(context, seq, preprocessed_ibuf, timeline_frame); if (ibuf_new != preprocessed_ibuf) { IMB_metadata_copy(ibuf_new, preprocessed_ibuf); @@ -748,8 +747,7 @@ static ImBuf *seq_render_preprocess_ibuf(const SeqRenderData *context, /* Proxies are not stored in cache. */ if (!is_proxy_image) { - BKE_sequencer_cache_put( - context, seq, timeline_frame, SEQ_CACHE_STORE_RAW, ibuf, cost, false); + seq_cache_put(context, seq, timeline_frame, SEQ_CACHE_STORE_RAW, ibuf, cost, false); } /* Reset timer so we can get partial render time. */ @@ -758,8 +756,7 @@ static ImBuf *seq_render_preprocess_ibuf(const SeqRenderData *context, } float cost = seq_estimate_render_cost_end(context->scene, begin); - BKE_sequencer_cache_put( - context, seq, timeline_frame, SEQ_CACHE_STORE_PREPROCESSED, ibuf, cost, false); + seq_cache_put(context, seq, timeline_frame, SEQ_CACHE_STORE_PREPROCESSED, ibuf, cost, false); return ibuf; } @@ -868,7 +865,7 @@ static ImBuf *seq_render_effect_strip_impl(const SeqRenderData *context, float fac, facf; int early_out; int i; - struct SeqEffectHandle sh = BKE_sequence_get_effect(seq); + struct SeqEffectHandle sh = SEQ_effect_handle_get(seq); FCurve *fcu = NULL; ImBuf *ibuf[3]; Sequence *input[3]; @@ -910,8 +907,7 @@ static ImBuf *seq_render_effect_strip_impl(const SeqRenderData *context, for (i = 0; i < 3; i++) { /* Speed effect requires time remapping of `timeline_frame` for input(s). */ if (input[0] && seq->type == SEQ_TYPE_SPEED) { - float target_frame = BKE_sequencer_speed_effect_target_frame_get( - context, seq, timeline_frame, i); + float target_frame = seq_speed_effect_target_frame_get(context, seq, timeline_frame, i); ibuf[i] = seq_render_strip(context, state, input[0], target_frame); } else { /* Other effects. */ @@ -921,7 +917,7 @@ static ImBuf *seq_render_effect_strip_impl(const SeqRenderData *context, } } - if (ibuf[0] && (ibuf[1] || BKE_sequence_effect_get_num_inputs(seq->type) == 1)) { + if (ibuf[0] && (ibuf[1] || SEQ_effect_get_num_inputs(seq->type) == 1)) { if (sh.multithreaded) { out = seq_render_effect_execute_threaded( &sh, context, seq, timeline_frame, fac, facf, ibuf[0], ibuf[1], ibuf[2]); @@ -1628,7 +1624,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, } if (view_id != context->view_id) { - BKE_sequencer_cache_put( + seq_cache_put( &localcontext, seq, timeline_frame, SEQ_CACHE_STORE_RAW, ibufs_arr[view_id], 0, false); } @@ -1677,7 +1673,7 @@ static ImBuf *do_render_strip_seqbase(const SeqRenderData *context, ListBase *seqbase = NULL; int offset; - seqbase = BKE_sequence_seqbase_get(seq, &offset); + seqbase = SEQ_get_seqbase_from_sequence(seq, &offset); if (seqbase && !BLI_listbase_is_empty(seqbase)) { @@ -1806,15 +1802,14 @@ ImBuf *seq_render_strip(const SeqRenderData *context, clock_t begin = seq_estimate_render_cost_begin(); - ibuf = BKE_sequencer_cache_get( - context, seq, timeline_frame, SEQ_CACHE_STORE_PREPROCESSED, false); + ibuf = seq_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_PREPROCESSED, false); if (ibuf != NULL) { return ibuf; } /* Proxies are not stored in cache. */ if (!SEQ_can_use_proxy(seq, SEQ_rendersize_to_proxysize(context->preview_render_size))) { - ibuf = BKE_sequencer_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_RAW, false); + ibuf = seq_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_RAW, false); } if (ibuf == NULL) { @@ -1822,7 +1817,7 @@ ImBuf *seq_render_strip(const SeqRenderData *context, } if (ibuf) { - use_preprocess = BKE_sequencer_input_have_to_preprocess(context, seq, timeline_frame); + use_preprocess = seq_input_have_to_preprocess(context, seq, timeline_frame); ibuf = seq_render_preprocess_ibuf( context, seq, ibuf, timeline_frame, begin, use_preprocess, is_proxy_image); } @@ -1851,7 +1846,7 @@ static bool seq_must_swap_input_in_blend_mode(Sequence *seq) static int seq_get_early_out_for_blend_mode(Sequence *seq) { - struct SeqEffectHandle sh = BKE_sequence_get_blend(seq); + struct SeqEffectHandle sh = seq_effect_get_sequence_blend(seq); float facf = seq->blend_opacity / 100.0f; int early_out = sh.early_out(seq, facf, facf); @@ -1874,7 +1869,7 @@ static ImBuf *seq_render_strip_stack_apply_effect( const SeqRenderData *context, Sequence *seq, float timeline_frame, ImBuf *ibuf1, ImBuf *ibuf2) { ImBuf *out; - struct SeqEffectHandle sh = BKE_sequence_get_blend(seq); + struct SeqEffectHandle sh = seq_effect_get_sequence_blend(seq); float facf = seq->blend_opacity / 100.0f; int swap_input = seq_must_swap_input_in_blend_mode(seq); @@ -1922,7 +1917,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, int early_out; Sequence *seq = seq_arr[i]; - out = BKE_sequencer_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_COMPOSITE, false); + out = seq_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_COMPOSITE, false); if (out) { break; @@ -1954,7 +1949,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, out = seq_render_strip_stack_apply_effect(context, seq, timeline_frame, ibuf1, ibuf2); float cost = seq_estimate_render_cost_end(context->scene, begin); - BKE_sequencer_cache_put( + seq_cache_put( context, seq_arr[i], timeline_frame, SEQ_CACHE_STORE_COMPOSITE, out, cost, false); IMB_freeImBuf(ibuf1); @@ -1983,7 +1978,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, } float cost = seq_estimate_render_cost_end(context->scene, begin); - BKE_sequencer_cache_put( + seq_cache_put( context, seq_arr[i], timeline_frame, SEQ_CACHE_STORE_COMPOSITE, out, cost, false); } @@ -1998,7 +1993,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, int chanshown) { Scene *scene = context->scene; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); ListBase *seqbasep; if (ed == NULL) { @@ -2023,11 +2018,11 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, count = seq_get_shown_sequences(seqbasep, timeline_frame, chanshown, seq_arr); if (count) { - out = BKE_sequencer_cache_get( + out = seq_cache_get( context, seq_arr[count - 1], timeline_frame, SEQ_CACHE_STORE_FINAL_OUT, false); } - BKE_sequencer_cache_free_temp_cache(context->scene, context->task_id, timeline_frame); + seq_cache_free_temp_cache(context->scene, context->task_id, timeline_frame); clock_t begin = seq_estimate_render_cost_begin(); float cost = 0; @@ -2038,27 +2033,27 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, cost = seq_estimate_render_cost_end(context->scene, begin); if (context->is_prefetch_render) { - BKE_sequencer_cache_put(context, - seq_arr[count - 1], - timeline_frame, - SEQ_CACHE_STORE_FINAL_OUT, - out, - cost, - false); + seq_cache_put(context, + seq_arr[count - 1], + timeline_frame, + SEQ_CACHE_STORE_FINAL_OUT, + out, + cost, + false); } else { - BKE_sequencer_cache_put_if_possible(context, - seq_arr[count - 1], - timeline_frame, - SEQ_CACHE_STORE_FINAL_OUT, - out, - cost, - false); + seq_cache_put_if_possible(context, + seq_arr[count - 1], + timeline_frame, + SEQ_CACHE_STORE_FINAL_OUT, + out, + cost, + false); } BLI_mutex_unlock(&seq_render_mutex); } - BKE_sequencer_prefetch_start(context, timeline_frame, cost); + seq_prefetch_start(context, timeline_frame, cost); return out; } diff --git a/source/blender/sequencer/intern/sequencer.c b/source/blender/sequencer/intern/sequencer.c index 87b608ef141..51495e7bf02 100644 --- a/source/blender/sequencer/intern/sequencer.c +++ b/source/blender/sequencer/intern/sequencer.c @@ -104,7 +104,7 @@ static void seq_free_strip(Strip *strip) MEM_freeN(strip); } -Sequence *BKE_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int type) +Sequence *SEQ_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int type) { Sequence *seq; @@ -129,13 +129,13 @@ Sequence *BKE_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int seq->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Sequence Stereo Format"); seq->cache_flag = SEQ_CACHE_STORE_RAW | SEQ_CACHE_STORE_PREPROCESSED | SEQ_CACHE_STORE_COMPOSITE; - BKE_sequence_session_uuid_generate(seq); + SEQ_relations_session_uuid_generate(seq); return seq; } /* only give option to skip cache locally (static func) */ -static void BKE_sequence_free_ex(Scene *scene, +static void seq_sequence_free_ex(Scene *scene, Sequence *seq, const bool do_cache, const bool do_id_user, @@ -145,10 +145,10 @@ static void BKE_sequence_free_ex(Scene *scene, seq_free_strip(seq->strip); } - BKE_sequence_free_anim(seq); + SEQ_relations_sequence_free_anim(seq); if (seq->type & SEQ_TYPE_EFFECT) { - struct SeqEffectHandle sh = BKE_sequence_get_effect(seq); + struct SeqEffectHandle sh = SEQ_effect_handle_get(seq); sh.free(seq, do_id_user); } @@ -186,7 +186,7 @@ static void BKE_sequence_free_ex(Scene *scene, } /* free modifiers */ - BKE_sequence_modifier_clear(seq); + SEQ_modifier_clear(seq); /* free cached data used by this strip, * also invalidate cache for all dependent sequences @@ -194,20 +194,20 @@ static void BKE_sequence_free_ex(Scene *scene, * be _very_ careful here, invalidating cache loops over the scene sequences and * assumes the listbase is valid for all strips, * this may not be the case if lists are being freed. - * this is optional BKE_sequence_invalidate_cache + * this is optional SEQ_relations_invalidate_cache */ if (do_cache) { if (scene) { - BKE_sequence_invalidate_cache_raw(scene, seq); + SEQ_relations_invalidate_cache_raw(scene, seq); } } MEM_freeN(seq); } -void BKE_sequence_free(Scene *scene, Sequence *seq, const bool do_clean_animdata) +void SEQ_sequence_free(Scene *scene, Sequence *seq, const bool do_clean_animdata) { - BKE_sequence_free_ex(scene, seq, true, true, do_clean_animdata); + seq_sequence_free_ex(scene, seq, true, true, do_clean_animdata); } /* cache must be freed before calling this function @@ -221,18 +221,18 @@ void seq_free_sequence_recurse(Scene *scene, Sequence *seq, const bool do_id_use seq_free_sequence_recurse(scene, iseq, do_id_user); } - BKE_sequence_free_ex(scene, seq, false, do_id_user, true); + seq_sequence_free_ex(scene, seq, false, do_id_user, true); } -Editing *BKE_sequencer_editing_get(Scene *scene, bool alloc) +Editing *SEQ_editing_get(Scene *scene, bool alloc) { if (alloc) { - BKE_sequencer_editing_ensure(scene); + SEQ_editing_ensure(scene); } return scene->ed; } -Editing *BKE_sequencer_editing_ensure(Scene *scene) +Editing *SEQ_editing_ensure(Scene *scene) { if (scene->ed == NULL) { Editing *ed; @@ -249,7 +249,7 @@ Editing *BKE_sequencer_editing_ensure(Scene *scene) return scene->ed; } -void BKE_sequencer_editing_free(Scene *scene, const bool do_id_user) +void SEQ_editing_free(Scene *scene, const bool do_id_user) { Editing *ed = scene->ed; Sequence *seq; @@ -258,12 +258,12 @@ void BKE_sequencer_editing_free(Scene *scene, const bool do_id_user) return; } - BKE_sequencer_prefetch_free(scene); - BKE_sequencer_cache_destruct(scene); + seq_prefetch_free(scene); + seq_cache_destruct(scene); SEQ_ALL_BEGIN (ed, seq) { /* handle cache freeing above */ - BKE_sequence_free_ex(scene, seq, false, do_id_user, false); + seq_sequence_free_ex(scene, seq, false, do_id_user, false); } SEQ_ALL_END; @@ -356,7 +356,7 @@ static Sequence *seq_dupli(const Scene *scene_src, Sequence *seqn = MEM_dupallocN(seq); if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) { - BKE_sequence_session_uuid_generate(seq); + SEQ_relations_session_uuid_generate(seq); } seq->tmp = seqn; @@ -386,7 +386,7 @@ static Sequence *seq_dupli(const Scene *scene_src, if (seqn->modifiers.first) { BLI_listbase_clear(&seqn->modifiers); - BKE_sequence_modifier_list_copy(seqn, seq); + SEQ_modifier_list_copy(seqn, seq); } if (seq->type == SEQ_TYPE_META) { @@ -424,7 +424,7 @@ static Sequence *seq_dupli(const Scene *scene_src, } else if (seq->type & SEQ_TYPE_EFFECT) { struct SeqEffectHandle sh; - sh = BKE_sequence_get_effect(seq); + sh = SEQ_effect_handle_get(seq); if (sh.copy) { sh.copy(seqn, seq, flag); } @@ -448,11 +448,11 @@ static Sequence *seq_dupli(const Scene *scene_src, if (scene_src == scene_dst) { if (dupe_flag & SEQ_DUPE_UNIQUE_NAME) { - BKE_sequence_base_unique_name_recursive(&scene_dst->ed->seqbase, seqn); + SEQ_sequence_base_unique_name_recursive(&scene_dst->ed->seqbase, seqn); } if (dupe_flag & SEQ_DUPE_ANIM) { - BKE_sequencer_dupe_animdata(scene_dst, seq->name + 2, seqn->name + 2); + SEQ_dupe_animdata(scene_dst, seq->name + 2, seqn->name + 2); } } @@ -479,7 +479,7 @@ static Sequence *sequence_dupli_recursive_do(const Scene *scene_src, return seqn; } -Sequence *BKE_sequence_dupli_recursive( +Sequence *SEQ_sequence_dupli_recursive( const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Sequence *seq, int dupe_flag) { Sequence *seqn = sequence_dupli_recursive_do(scene_src, scene_dst, new_seq_list, seq, dupe_flag); @@ -490,7 +490,7 @@ Sequence *BKE_sequence_dupli_recursive( return seqn; } -void BKE_sequence_base_dupli_recursive(const Scene *scene_src, +void SEQ_sequence_base_dupli_recursive(const Scene *scene_src, Scene *scene_dst, ListBase *nseqbase, const ListBase *seqbase, @@ -499,7 +499,7 @@ void BKE_sequence_base_dupli_recursive(const Scene *scene_src, { Sequence *seq; Sequence *seqn = NULL; - Sequence *last_seq = BKE_sequencer_active_get((Scene *)scene_src); + Sequence *last_seq = SEQ_select_active_get((Scene *)scene_src); /* always include meta's strips */ int dupe_flag_recursive = dupe_flag | SEQ_DUPE_ALL | SEQ_DUPE_IS_RECURSIVE_CALL; @@ -514,13 +514,13 @@ void BKE_sequence_base_dupli_recursive(const Scene *scene_src, } if (seq->type == SEQ_TYPE_META) { - BKE_sequence_base_dupli_recursive( + SEQ_sequence_base_dupli_recursive( scene_src, scene_dst, &seqn->seqbase, &seq->seqbase, dupe_flag_recursive, flag); } if (dupe_flag & SEQ_DUPE_CONTEXT) { if (seq == last_seq) { - BKE_sequencer_active_set(scene_dst, seqn); + SEQ_select_active_set(scene_dst, seqn); } } } @@ -551,7 +551,7 @@ static size_t sequencer_rna_path_prefix(char str[SEQ_RNAPATH_MAXSTR], const char } /* XXX - hackish function needed for transforming strips! TODO - have some better solution */ -void BKE_sequencer_offset_animdata(Scene *scene, Sequence *seq, int ofs) +void SEQ_offset_animdata(Scene *scene, Sequence *seq, int ofs) { char str[SEQ_RNAPATH_MAXSTR]; size_t str_len; @@ -586,7 +586,7 @@ void BKE_sequencer_offset_animdata(Scene *scene, Sequence *seq, int ofs) DEG_id_tag_update(&scene->adt->action->id, ID_RECALC_ANIMATION); } -void BKE_sequencer_dupe_animdata(Scene *scene, const char *name_src, const char *name_dst) +void SEQ_dupe_animdata(Scene *scene, const char *name_src, const char *name_dst) { char str_from[SEQ_RNAPATH_MAXSTR]; size_t str_from_len; diff --git a/source/blender/sequencer/intern/sound.c b/source/blender/sequencer/intern/sound.c index 9549938abee..f62142d0112 100644 --- a/source/blender/sequencer/intern/sound.c +++ b/source/blender/sequencer/intern/sound.c @@ -40,14 +40,12 @@ #include "strip_time.h" -void BKE_sequence_sound_init(Scene *scene, Sequence *seq); - -void BKE_sequence_sound_init(Scene *scene, Sequence *seq) +static void seq_sound_init(Scene *scene, Sequence *seq) { if (seq->type == SEQ_TYPE_META) { Sequence *seq_child; for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) { - BKE_sequence_sound_init(scene, seq_child); + seq_sound_init(scene, seq_child); } } else { @@ -70,7 +68,7 @@ static bool sequencer_refresh_sound_length_recursive(Main *bmain, Scene *scene, for (seq = seqbase->first; seq; seq = seq->next) { if (seq->type == SEQ_TYPE_META) { if (sequencer_refresh_sound_length_recursive(bmain, scene, &seq->seqbase)) { - BKE_sequence_calc(scene, seq); + SEQ_time_update_sequence(scene, seq); changed = true; } } @@ -86,7 +84,7 @@ static bool sequencer_refresh_sound_length_recursive(Main *bmain, Scene *scene, seq->endofs *= fac; seq->start += (old - seq->startofs); /* So that visual/"real" start frame does not change! */ - BKE_sequence_calc(scene, seq); + SEQ_time_update_sequence(scene, seq); changed = true; } } @@ -94,7 +92,7 @@ static bool sequencer_refresh_sound_length_recursive(Main *bmain, Scene *scene, } #endif -void BKE_sequencer_refresh_sound_length(Main *bmain, Scene *scene) +void SEQ_sound_update_length(Main *bmain, Scene *scene) { #ifdef WITH_AUDASPACE if (scene->ed) { @@ -105,7 +103,7 @@ void BKE_sequencer_refresh_sound_length(Main *bmain, Scene *scene) #endif } -void BKE_sequencer_update_sound_bounds_all(Scene *scene) +void SEQ_sound_update_bounds_all(Scene *scene) { Editing *ed = scene->ed; @@ -117,13 +115,13 @@ void BKE_sequencer_update_sound_bounds_all(Scene *scene) seq_update_sound_bounds_recursive(scene, seq); } else if (ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SCENE)) { - BKE_sequencer_update_sound_bounds(scene, seq); + SEQ_sound_update_bounds(scene, seq); } } } } -void BKE_sequencer_update_sound_bounds(Scene *scene, Sequence *seq) +void SEQ_sound_update_bounds(Scene *scene, Sequence *seq) { if (seq->type == SEQ_TYPE_SCENE) { if (seq->scene && seq->scene_sound) { @@ -155,7 +153,7 @@ static void seq_update_sound_recursive(Scene *scene, ListBase *seqbasep, bSound } } -void BKE_sequencer_update_sound(Scene *scene, bSound *sound) +void SEQ_sound_update(Scene *scene, bSound *sound) { if (scene->ed) { seq_update_sound_recursive(scene, &scene->ed->seqbase, sound); diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c index e56dcf888a7..4fe02b7fdd2 100644 --- a/source/blender/sequencer/intern/strip_add.c +++ b/source/blender/sequencer/intern/strip_add.c @@ -64,7 +64,7 @@ static void seq_load_apply(Main *bmain, Scene *scene, Sequence *seq, SeqLoadInfo if (seq) { BLI_strncpy_utf8(seq->name + 2, seq_load->name, sizeof(seq->name) - 2); BLI_utf8_invalid_strip(seq->name + 2, strlen(seq->name + 2)); - BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); + SEQ_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); if (seq_load->flag & SEQ_LOAD_FRAME_ADVANCE) { seq_load->start_frame += (seq->enddisp - seq->startdisp); @@ -72,7 +72,7 @@ static void seq_load_apply(Main *bmain, Scene *scene, Sequence *seq, SeqLoadInfo if (seq_load->flag & SEQ_LOAD_REPLACE_SEL) { seq_load->flag |= SELECT; - BKE_sequencer_active_set(scene, seq); + SEQ_select_active_set(scene, seq); } if (seq_load->flag & SEQ_LOAD_SOUND_MONO) { @@ -94,13 +94,13 @@ static void seq_load_apply(Main *bmain, Scene *scene, Sequence *seq, SeqLoadInfo } /* NOTE: this function doesn't fill in image names */ -Sequence *BKE_sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) +Sequence *SEQ_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { Scene *scene = CTX_data_scene(C); /* only for active seq */ Sequence *seq; Strip *strip; - seq = BKE_sequence_alloc(seqbasep, seq_load->start_frame, seq_load->channel, SEQ_TYPE_IMAGE); + seq = SEQ_sequence_alloc(seqbasep, seq_load->start_frame, seq_load->channel, SEQ_TYPE_IMAGE); seq->blend_mode = SEQ_TYPE_CROSS; /* so alpha adjustment fade to the strip below */ /* basic defaults */ @@ -124,21 +124,22 @@ Sequence *BKE_sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoad BLI_path_abs(file_path, BKE_main_blendfile_path(CTX_data_main(C))); ImBuf *ibuf = IMB_loadiffname(file_path, IB_rect, seq->strip->colorspace_settings.name); if (ibuf != NULL) { - SEQ_set_scale_to_fit(seq, ibuf->x, ibuf->y, scene->r.xsch, scene->r.ysch, seq_load->fit_method); + SEQ_set_scale_to_fit( + seq, ibuf->x, ibuf->y, scene->r.xsch, scene->r.ysch, seq_load->fit_method); IMB_freeImBuf(ibuf); } - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); return seq; } #ifdef WITH_AUDASPACE -Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) +Sequence *SEQ_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); /* only for sound */ - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); bSound *sound; Sequence *seq; /* generic strip vars */ @@ -158,10 +159,10 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad return NULL; } - seq = BKE_sequence_alloc(seqbasep, seq_load->start_frame, seq_load->channel, SEQ_TYPE_SOUND_RAM); + seq = SEQ_sequence_alloc(seqbasep, seq_load->start_frame, seq_load->channel, SEQ_TYPE_SOUND_RAM); seq->sound = sound; BLI_strncpy(seq->name + 2, "Sound", SEQ_NAME_MAXSTR - 2); - BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); + SEQ_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); /* basic defaults */ /* We add a very small negative offset here, because @@ -176,7 +177,7 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad seq->scene_sound = NULL; - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); /* last active name */ BLI_strncpy(ed->act_sounddir, strip->dir, FILE_MAXDIR); @@ -189,7 +190,7 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad return seq; } #else // WITH_AUDASPACE -Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) +Sequence *SEQ_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { (void)C; (void)seqbasep; @@ -198,7 +199,7 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad } #endif // WITH_AUDASPACE -Sequence *BKE_sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) +Sequence *SEQ_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); /* only for sound */ @@ -259,7 +260,7 @@ Sequence *BKE_sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoad if (seq_load->flag & SEQ_LOAD_MOVIE_SOUND) { seq_load->channel++; } - seq = BKE_sequence_alloc(seqbasep, seq_load->start_frame, seq_load->channel, SEQ_TYPE_MOVIE); + seq = SEQ_sequence_alloc(seqbasep, seq_load->start_frame, seq_load->channel, SEQ_TYPE_MOVIE); /* multiview settings */ if (seq_load->stereo3d_format) { @@ -291,7 +292,7 @@ Sequence *BKE_sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoad SEQ_set_scale_to_fit(seq, width, height, scene->r.xsch, scene->r.ysch, seq_load->fit_method); BLI_strncpy(seq->name + 2, "Movie", SEQ_NAME_MAXSTR - 2); - BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); + SEQ_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); /* adjust scene's frame rate settings to match */ if (seq_load->flag & SEQ_LOAD_SYNC_FPS) { @@ -311,7 +312,7 @@ Sequence *BKE_sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoad BLI_split_dirfile(seq_load->path, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name)); - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); if (seq_load->name[0] == '\0') { BLI_strncpy(seq_load->name, se->name, sizeof(seq_load->name)); @@ -320,20 +321,20 @@ Sequence *BKE_sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoad if (seq_load->flag & SEQ_LOAD_MOVIE_SOUND) { int start_frame_back = seq_load->start_frame; seq_load->channel--; - seq_load->seq_sound = BKE_sequencer_add_sound_strip(C, seqbasep, seq_load); + seq_load->seq_sound = SEQ_add_sound_strip(C, seqbasep, seq_load); seq_load->start_frame = start_frame_back; } /* can be NULL */ seq_load_apply(CTX_data_main(C), scene, seq, seq_load); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); MEM_freeN(anim_arr); return seq; } -/* note: caller should run BKE_sequence_calc(scene, seq) after */ -void BKE_sequence_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const bool lock_range) +/* note: caller should run SEQ_time_update_sequence(scene, seq) after */ +void SEQ_add_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const bool lock_range) { char path[FILE_MAX]; int prev_startdisp = 0, prev_enddisp = 0; @@ -352,7 +353,7 @@ void BKE_sequence_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, cons if (lock_range) { /* keep so we don't have to move the actual start and end points (only the data) */ - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); prev_startdisp = seq->startdisp; prev_enddisp = seq->enddisp; } @@ -379,7 +380,7 @@ void BKE_sequence_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, cons BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name); BLI_path_abs(path, BKE_main_blendfile_path_from_global()); - BKE_sequence_free_anim(seq); + SEQ_relations_sequence_free_anim(seq); if (is_multiview && (seq->views_format == R_IMF_VIEWS_INDIVIDUAL)) { char prefix[FILE_MAX]; @@ -499,19 +500,19 @@ void BKE_sequence_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, cons free_proxy_seq(seq); if (lock_range) { - BKE_sequence_tx_set_final_left(seq, prev_startdisp); - BKE_sequence_tx_set_final_right(seq, prev_enddisp); - BKE_sequence_single_fix(seq); + SEQ_transform_set_left_handle_frame(seq, prev_startdisp); + SEQ_transform_set_right_handle_frame(seq, prev_enddisp); + SEQ_transform_fix_single_image_seq_offsets(seq); } - BKE_sequence_calc(scene, seq); + SEQ_time_update_sequence(scene, seq); } -void BKE_sequence_movie_reload_if_needed(struct Main *bmain, - struct Scene *scene, - struct Sequence *seq, - bool *r_was_reloaded, - bool *r_can_produce_frames) +void SEQ_add_movie_reload_if_needed(struct Main *bmain, + struct Scene *scene, + struct Sequence *seq, + bool *r_was_reloaded, + bool *r_can_produce_frames) { BLI_assert(seq->type == SEQ_TYPE_MOVIE || !"This function is only implemented for movie strips."); @@ -543,7 +544,7 @@ void BKE_sequence_movie_reload_if_needed(struct Main *bmain, return; } - BKE_sequence_reload_new_file(bmain, scene, seq, true); + SEQ_add_reload_new_file(bmain, scene, seq, true); *r_was_reloaded = true; if (BLI_listbase_is_empty(&seq->anims)) { diff --git a/source/blender/sequencer/intern/strip_edit.c b/source/blender/sequencer/intern/strip_edit.c index a29810cc9ee..11f42c5de9d 100644 --- a/source/blender/sequencer/intern/strip_edit.c +++ b/source/blender/sequencer/intern/strip_edit.c @@ -42,7 +42,7 @@ #include "SEQ_sequencer.h" -int BKE_sequence_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str) +int SEQ_edit_sequence_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str) { char name[sizeof(seq_a->name)]; @@ -65,8 +65,7 @@ int BKE_sequence_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str) } if ((seq_a->type & SEQ_TYPE_EFFECT) && (seq_b->type & SEQ_TYPE_EFFECT)) { - if (BKE_sequence_effect_get_num_inputs(seq_a->type) != - BKE_sequence_effect_get_num_inputs(seq_b->type)) { + if (SEQ_effect_get_num_inputs(seq_a->type) != SEQ_effect_get_num_inputs(seq_b->type)) { *error_str = N_("Strips must have the same number of inputs"); return 0; } @@ -125,7 +124,7 @@ static void seq_update_muting_recursive(ListBase *seqbasep, Sequence *metaseq, i } } -void BKE_sequencer_update_muting(Editing *ed) +void SEQ_sound_update_muting(Editing *ed) { if (ed) { /* mute all sounds up to current metastack list */ @@ -167,7 +166,7 @@ static void sequencer_flag_users_for_removal(Scene *scene, ListBase *seqbase, Se } /* Flag seq and its users (effects) for removal. */ -void BKE_sequencer_flag_for_removal(Scene *scene, ListBase *seqbase, Sequence *seq) +void SEQ_edit_flag_for_removal(Scene *scene, ListBase *seqbase, Sequence *seq) { if (seq == NULL || (seq->flag & SEQ_FLAG_DELETE) != 0) { return; @@ -176,7 +175,7 @@ void BKE_sequencer_flag_for_removal(Scene *scene, ListBase *seqbase, Sequence *s /* Flag and remove meta children. */ if (seq->type == SEQ_TYPE_META) { LISTBASE_FOREACH (Sequence *, meta_child, &seq->seqbase) { - BKE_sequencer_flag_for_removal(scene, &seq->seqbase, meta_child); + SEQ_edit_flag_for_removal(scene, &seq->seqbase, meta_child); } } @@ -185,15 +184,15 @@ void BKE_sequencer_flag_for_removal(Scene *scene, ListBase *seqbase, Sequence *s } /* Remove all flagged sequences, return true if sequence is removed. */ -void BKE_sequencer_remove_flagged_sequences(Scene *scene, ListBase *seqbase) +void SEQ_edit_remove_flagged_sequences(Scene *scene, ListBase *seqbase) { LISTBASE_FOREACH_MUTABLE (Sequence *, seq, seqbase) { if (seq->flag & SEQ_FLAG_DELETE) { if (seq->type == SEQ_TYPE_META) { - BKE_sequencer_remove_flagged_sequences(scene, &seq->seqbase); + SEQ_edit_remove_flagged_sequences(scene, &seq->seqbase); } BLI_remlink(seqbase, seq); - BKE_sequence_free(scene, seq, true); + SEQ_sequence_free(scene, seq, true); } } } @@ -254,7 +253,7 @@ static void seq_split_set_right_offset(Sequence *seq, int timeline_frame) else if ((seq->start + seq->len) < timeline_frame) { seq->endstill -= seq->enddisp - timeline_frame; } - BKE_sequence_tx_set_final_right(seq, timeline_frame); + SEQ_transform_set_right_handle_frame(seq, timeline_frame); } static void seq_split_set_left_offset(Sequence *seq, int timeline_frame) @@ -268,7 +267,7 @@ static void seq_split_set_left_offset(Sequence *seq, int timeline_frame) seq->start = timeline_frame - seq->len + 1; seq->endstill = seq->enddisp - timeline_frame - 1; } - BKE_sequence_tx_set_final_left(seq, timeline_frame); + SEQ_transform_set_left_handle_frame(seq, timeline_frame); } /** @@ -297,12 +296,12 @@ Sequence *SEQ_edit_strip_split(Main *bmain, /* Precaution, needed because the length saved on-disk may not match the length saved in the * blend file, or our code may have minor differences reading file length between versions. * This causes hard-split to fail, see: T47862. */ - BKE_sequence_reload_new_file(bmain, scene, seq, true); - BKE_sequence_calc(scene, seq); + SEQ_add_reload_new_file(bmain, scene, seq, true); + SEQ_time_update_sequence(scene, seq); } Sequence *left_seq = seq; - Sequence *right_seq = BKE_sequence_dupli_recursive( + Sequence *right_seq = SEQ_sequence_dupli_recursive( scene, scene, seqbase, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); switch (method) { @@ -313,12 +312,12 @@ Sequence *SEQ_edit_strip_split(Main *bmain, case SEQ_SPLIT_HARD: seq_split_set_right_hold_offset(left_seq, timeline_frame); seq_split_set_left_hold_offset(right_seq, timeline_frame); - BKE_sequence_reload_new_file(bmain, scene, left_seq, false); - BKE_sequence_reload_new_file(bmain, scene, right_seq, false); + SEQ_add_reload_new_file(bmain, scene, left_seq, false); + SEQ_add_reload_new_file(bmain, scene, right_seq, false); break; } - BKE_sequence_calc(scene, left_seq); - BKE_sequence_calc(scene, right_seq); + SEQ_time_update_sequence(scene, left_seq); + SEQ_time_update_sequence(scene, right_seq); return right_seq; } @@ -345,12 +344,14 @@ bool SEQ_edit_remove_gaps(Scene *scene, if (remove_all_gaps) { while (gap_info.gap_exists) { - SEQ_offset_after_frame(scene, seqbase, -gap_info.gap_length, gap_info.gap_start_frame); + SEQ_transform_offset_after_frame( + scene, seqbase, -gap_info.gap_length, gap_info.gap_start_frame); seq_time_gap_info_get(scene, seqbase, initial_frame, &gap_info); } } else { - SEQ_offset_after_frame(scene, seqbase, -gap_info.gap_length, gap_info.gap_start_frame); + SEQ_transform_offset_after_frame( + scene, seqbase, -gap_info.gap_length, gap_info.gap_start_frame); } return true; } diff --git a/source/blender/sequencer/intern/strip_relations.c b/source/blender/sequencer/intern/strip_relations.c index d802ce22f21..939cafb09fd 100644 --- a/source/blender/sequencer/intern/strip_relations.c +++ b/source/blender/sequencer/intern/strip_relations.c @@ -47,7 +47,7 @@ #include "utils.h" /* check whether sequence cur depends on seq */ -static bool BKE_sequence_check_depend(Sequence *seq, Sequence *cur) +static bool seq_relations_check_depend(Sequence *seq, Sequence *cur) { if (cur->seq1 == seq || cur->seq2 == seq || cur->seq3 == seq) { return true; @@ -84,14 +84,14 @@ static void sequence_do_invalidate_dependent(Scene *scene, Sequence *seq, ListBa continue; } - if (BKE_sequence_check_depend(seq, cur)) { + if (seq_relations_check_depend(seq, cur)) { /* Effect must be invalidated completely if they depend on invalidated seq. */ if ((cur->type & SEQ_TYPE_EFFECT) != 0) { - BKE_sequencer_cache_cleanup_sequence(scene, cur, seq, SEQ_CACHE_ALL_TYPES, false); + seq_cache_cleanup_sequence(scene, cur, seq, SEQ_CACHE_ALL_TYPES, false); } else { /* In case of alpha over for example only invalidate composite image */ - BKE_sequencer_cache_cleanup_sequence( + seq_cache_cleanup_sequence( scene, cur, seq, SEQ_CACHE_STORE_COMPOSITE | SEQ_CACHE_STORE_FINAL_OUT, false); } } @@ -110,33 +110,33 @@ static void sequence_invalidate_cache(Scene *scene, Editing *ed = scene->ed; if (invalidate_self) { - BKE_sequence_free_anim(seq); - BKE_sequencer_cache_cleanup_sequence(scene, seq, seq, invalidate_types, false); + SEQ_relations_sequence_free_anim(seq); + seq_cache_cleanup_sequence(scene, seq, seq, invalidate_types, false); } if (seq->effectdata && seq->type == SEQ_TYPE_SPEED) { - BKE_sequence_effect_speed_rebuild_map(scene, seq, true); + seq_effect_speed_rebuild_map(scene, seq, true); } sequence_do_invalidate_dependent(scene, seq, &ed->seqbase); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); - BKE_sequencer_prefetch_stop(scene); + SEQ_prefetch_stop(scene); } -void BKE_sequence_invalidate_cache_in_range(Scene *scene, - Sequence *seq, - Sequence *range_mask, - int invalidate_types) +void SEQ_relations_invalidate_cache_in_range(Scene *scene, + Sequence *seq, + Sequence *range_mask, + int invalidate_types) { - BKE_sequencer_cache_cleanup_sequence(scene, seq, range_mask, invalidate_types, true); + seq_cache_cleanup_sequence(scene, seq, range_mask, invalidate_types, true); } -void BKE_sequence_invalidate_cache_raw(Scene *scene, Sequence *seq) +void SEQ_relations_invalidate_cache_raw(Scene *scene, Sequence *seq) { sequence_invalidate_cache(scene, seq, true, SEQ_CACHE_ALL_TYPES); } -void BKE_sequence_invalidate_cache_preprocessed(Scene *scene, Sequence *seq) +void SEQ_relations_invalidate_cache_preprocessed(Scene *scene, Sequence *seq) { sequence_invalidate_cache(scene, seq, @@ -145,7 +145,7 @@ void BKE_sequence_invalidate_cache_preprocessed(Scene *scene, Sequence *seq) SEQ_CACHE_STORE_FINAL_OUT); } -void BKE_sequence_invalidate_cache_composite(Scene *scene, Sequence *seq) +void SEQ_relations_invalidate_cache_composite(Scene *scene, Sequence *seq) { if (ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD)) { return; @@ -155,7 +155,7 @@ void BKE_sequence_invalidate_cache_composite(Scene *scene, Sequence *seq) scene, seq, true, SEQ_CACHE_STORE_COMPOSITE | SEQ_CACHE_STORE_FINAL_OUT); } -void BKE_sequence_invalidate_dependent(Scene *scene, Sequence *seq) +void SEQ_relations_invalidate_dependent(Scene *scene, Sequence *seq) { if (ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD)) { return; @@ -169,7 +169,7 @@ static void invalidate_scene_strips(Scene *scene, Scene *scene_target, ListBase { for (Sequence *seq = seqbase->first; seq != NULL; seq = seq->next) { if (seq->scene == scene_target) { - BKE_sequence_invalidate_cache_raw(scene, seq); + SEQ_relations_invalidate_cache_raw(scene, seq); } if (seq->seqbase.first != NULL) { @@ -178,7 +178,7 @@ static void invalidate_scene_strips(Scene *scene, Scene *scene_target, ListBase } } -void BKE_sequence_invalidate_scene_strips(Main *bmain, Scene *scene_target) +void SEQ_relations_invalidate_scene_strips(Main *bmain, Scene *scene_target) { for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) { if (scene->ed != NULL) { @@ -191,7 +191,7 @@ static void invalidate_movieclip_strips(Scene *scene, MovieClip *clip_target, Li { for (Sequence *seq = seqbase->first; seq != NULL; seq = seq->next) { if (seq->clip == clip_target) { - BKE_sequence_invalidate_cache_raw(scene, seq); + SEQ_relations_invalidate_cache_raw(scene, seq); } if (seq->seqbase.first != NULL) { @@ -200,7 +200,7 @@ static void invalidate_movieclip_strips(Scene *scene, MovieClip *clip_target, Li } } -void BKE_sequence_invalidate_movieclip_strips(Main *bmain, MovieClip *clip_target) +void SEQ_relations_invalidate_movieclip_strips(Main *bmain, MovieClip *clip_target) { for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) { if (scene->ed != NULL) { @@ -209,7 +209,7 @@ void BKE_sequence_invalidate_movieclip_strips(Main *bmain, MovieClip *clip_targe } } -void BKE_sequencer_free_imbuf(Scene *scene, ListBase *seqbase, bool for_render) +void SEQ_relations_free_imbuf(Scene *scene, ListBase *seqbase, bool for_render) { if (scene->ed == NULL) { return; @@ -217,8 +217,8 @@ void BKE_sequencer_free_imbuf(Scene *scene, ListBase *seqbase, bool for_render) Sequence *seq; - BKE_sequencer_cache_cleanup(scene); - BKE_sequencer_prefetch_stop(scene); + SEQ_cache_cleanup(scene); + SEQ_prefetch_stop(scene); for (seq = seqbase->first; seq; seq = seq->next) { if (for_render && CFRA >= seq->startdisp && CFRA <= seq->enddisp) { @@ -227,14 +227,14 @@ void BKE_sequencer_free_imbuf(Scene *scene, ListBase *seqbase, bool for_render) if (seq->strip) { if (seq->type == SEQ_TYPE_MOVIE) { - BKE_sequence_free_anim(seq); + SEQ_relations_sequence_free_anim(seq); } if (seq->type == SEQ_TYPE_SPEED) { - BKE_sequence_effect_speed_rebuild_map(scene, seq, true); + seq_effect_speed_rebuild_map(scene, seq, true); } } if (seq->type == SEQ_TYPE_META) { - BKE_sequencer_free_imbuf(scene, &seq->seqbase, for_render); + SEQ_relations_free_imbuf(scene, &seq->seqbase, for_render); } if (seq->type == SEQ_TYPE_SCENE) { /* FIXME: recurse downwards, @@ -284,27 +284,27 @@ static bool update_changed_seq_recurs( if (free_imbuf) { if (ibuf_change) { if (seq->type == SEQ_TYPE_MOVIE) { - BKE_sequence_free_anim(seq); + SEQ_relations_sequence_free_anim(seq); } else if (seq->type == SEQ_TYPE_SPEED) { - BKE_sequence_effect_speed_rebuild_map(scene, seq, true); + seq_effect_speed_rebuild_map(scene, seq, true); } } if (len_change) { - BKE_sequence_calc(scene, seq); + SEQ_time_update_sequence(scene, seq); } } return free_imbuf; } -void BKE_sequencer_update_changed_seq_and_deps(Scene *scene, +void SEQ_relations_update_changed_seq_and_deps(Scene *scene, Sequence *changed_seq, int len_change, int ibuf_change) { - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq; if (ed == NULL) { @@ -321,7 +321,7 @@ static void sequencer_all_free_anim_ibufs(ListBase *seqbase, int timeline_frame) { for (Sequence *seq = seqbase->first; seq != NULL; seq = seq->next) { if (seq->enddisp < timeline_frame || seq->startdisp > timeline_frame) { - BKE_sequence_free_anim(seq); + SEQ_relations_sequence_free_anim(seq); } if (seq->type == SEQ_TYPE_META) { sequencer_all_free_anim_ibufs(&seq->seqbase, timeline_frame); @@ -330,14 +330,14 @@ static void sequencer_all_free_anim_ibufs(ListBase *seqbase, int timeline_frame) } /* Unused */ -void BKE_sequencer_all_free_anim_ibufs(Scene *scene, int timeline_frame) +void SEQ_relations_free_all_anim_ibufs(Scene *scene, int timeline_frame) { - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed == NULL) { return; } sequencer_all_free_anim_ibufs(&ed->seqbase, timeline_frame); - BKE_sequencer_cache_cleanup(scene); + SEQ_cache_cleanup(scene); } static Sequence *sequencer_check_scene_recursion(Scene *scene, ListBase *seqbase) @@ -361,9 +361,9 @@ static Sequence *sequencer_check_scene_recursion(Scene *scene, ListBase *seqbase return NULL; } -bool BKE_sequencer_check_scene_recursion(Scene *scene, ReportList *reports) +bool SEQ_relations_check_scene_recursion(Scene *scene, ReportList *reports) { - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed == NULL) { return false; } @@ -391,7 +391,7 @@ bool BKE_sequencer_check_scene_recursion(Scene *scene, ReportList *reports) } /* Check if "seq_main" (indirectly) uses strip "seq". */ -bool BKE_sequencer_render_loop_check(Sequence *seq_main, Sequence *seq) +bool SEQ_relations_render_loop_check(Sequence *seq_main, Sequence *seq) { if (seq_main == NULL || seq == NULL) { return false; @@ -401,15 +401,15 @@ bool BKE_sequencer_render_loop_check(Sequence *seq_main, Sequence *seq) return true; } - if ((seq_main->seq1 && BKE_sequencer_render_loop_check(seq_main->seq1, seq)) || - (seq_main->seq2 && BKE_sequencer_render_loop_check(seq_main->seq2, seq)) || - (seq_main->seq3 && BKE_sequencer_render_loop_check(seq_main->seq3, seq))) { + if ((seq_main->seq1 && SEQ_relations_render_loop_check(seq_main->seq1, seq)) || + (seq_main->seq2 && SEQ_relations_render_loop_check(seq_main->seq2, seq)) || + (seq_main->seq3 && SEQ_relations_render_loop_check(seq_main->seq3, seq))) { return true; } SequenceModifierData *smd; for (smd = seq_main->modifiers.first; smd; smd = smd->next) { - if (smd->mask_sequence && BKE_sequencer_render_loop_check(smd->mask_sequence, seq)) { + if (smd->mask_sequence && SEQ_relations_render_loop_check(smd->mask_sequence, seq)) { return true; } } @@ -418,7 +418,7 @@ bool BKE_sequencer_render_loop_check(Sequence *seq_main, Sequence *seq) } /* Function to free imbuf and anim data on changes */ -void BKE_sequence_free_anim(Sequence *seq) +void SEQ_relations_sequence_free_anim(Sequence *seq) { while (seq->anims.last) { StripAnim *sanim = seq->anims.last; @@ -433,12 +433,12 @@ void BKE_sequence_free_anim(Sequence *seq) BLI_listbase_clear(&seq->anims); } -void BKE_sequence_session_uuid_generate(struct Sequence *sequence) +void SEQ_relations_session_uuid_generate(struct Sequence *sequence) { sequence->runtime.session_uuid = BLI_session_uuid_generate(); } -void BKE_sequencer_check_uuids_unique_and_report(const Scene *scene) +void SEQ_relations_check_uuids_unique_and_report(const Scene *scene) { if (scene->ed == NULL) { return; diff --git a/source/blender/sequencer/intern/strip_select.c b/source/blender/sequencer/intern/strip_select.c index 478ae9be337..fbf28087825 100644 --- a/source/blender/sequencer/intern/strip_select.c +++ b/source/blender/sequencer/intern/strip_select.c @@ -31,9 +31,9 @@ #include "SEQ_sequencer.h" -Sequence *BKE_sequencer_active_get(Scene *scene) +Sequence *SEQ_select_active_get(Scene *scene) { - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed == NULL) { return NULL; @@ -42,9 +42,9 @@ Sequence *BKE_sequencer_active_get(Scene *scene) return ed->act_seq; } -void BKE_sequencer_active_set(Scene *scene, Sequence *seq) +void SEQ_select_active_set(Scene *scene, Sequence *seq) { - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed == NULL) { return; @@ -53,11 +53,11 @@ void BKE_sequencer_active_set(Scene *scene, Sequence *seq) ed->act_seq = seq; } -int BKE_sequencer_active_get_pair(Scene *scene, Sequence **seq_act, Sequence **seq_other) +int SEQ_select_active_get_pair(Scene *scene, Sequence **seq_act, Sequence **seq_other) { - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); - *seq_act = BKE_sequencer_active_get(scene); + *seq_act = SEQ_select_active_get(scene); if (*seq_act == NULL) { return 0; diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c index d9074b2a683..a3b17a7c58c 100644 --- a/source/blender/sequencer/intern/strip_time.c +++ b/source/blender/sequencer/intern/strip_time.c @@ -142,7 +142,7 @@ void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) scene, metaseq, metaseq_start(metaseq), metaseq_end(metaseq)); } -void BKE_sequence_calc_disp(Scene *scene, Sequence *seq) +void SEQ_time_update_sequence_bounds(Scene *scene, Sequence *seq) { if (seq->startofs && seq->startstill) { seq->startstill = 0; @@ -159,7 +159,7 @@ void BKE_sequence_calc_disp(Scene *scene, Sequence *seq) } } -void BKE_sequence_calc(Scene *scene, Sequence *seq) +void SEQ_time_update_sequence(Scene *scene, Sequence *seq) { Sequence *seqm; int min, max; @@ -168,7 +168,7 @@ void BKE_sequence_calc(Scene *scene, Sequence *seq) seqm = seq->seqbase.first; while (seqm) { if (seqm->seqbase.first) { - BKE_sequence_calc(scene, seqm); + SEQ_time_update_sequence(scene, seqm); } seqm = seqm->next; } @@ -206,7 +206,7 @@ void BKE_sequence_calc(Scene *scene, Sequence *seq) seq->len = seq->enddisp - seq->startdisp; } else { - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); } } else { @@ -231,12 +231,12 @@ void BKE_sequence_calc(Scene *scene, Sequence *seq) } seq_update_sound_bounds_recursive(scene, seq); } - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); } } /** Comparison function suitable to be used with BLI_listbase_sort()... */ -int BKE_sequencer_cmp_time_startdisp(const void *a, const void *b) +int SEQ_time_cmp_time_startdisp(const void *a, const void *b) { const Sequence *seq_a = a; const Sequence *seq_b = b; @@ -244,14 +244,14 @@ int BKE_sequencer_cmp_time_startdisp(const void *a, const void *b) return (seq_a->startdisp > seq_b->startdisp); } -int BKE_sequencer_find_next_prev_edit(Scene *scene, - int timeline_frame, - const short side, - const bool do_skip_mute, - const bool do_center, - const bool do_unselected) +int SEQ_time_find_next_prev_edit(Scene *scene, + int timeline_frame, + const short side, + const bool do_skip_mute, + const bool do_center, + const bool do_unselected) { - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq; int dist, best_dist, best_frame = timeline_frame; @@ -319,7 +319,7 @@ int BKE_sequencer_find_next_prev_edit(Scene *scene, return best_frame; } -float BKE_sequence_get_fps(Scene *scene, Sequence *seq) +float SEQ_time_sequence_get_fps(Scene *scene, Sequence *seq) { switch (seq->type) { case SEQ_TYPE_MOVIE: { diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c index 4aabe87bce1..0cf3940dc54 100644 --- a/source/blender/sequencer/intern/strip_transform.c +++ b/source/blender/sequencer/intern/strip_transform.c @@ -44,28 +44,28 @@ static int seq_tx_get_end(Sequence *seq) return seq->start + seq->len; } -int BKE_sequence_tx_get_final_left(Sequence *seq, bool metaclip) +int SEQ_transform_get_left_handle_frame(Sequence *seq, bool metaclip) { if (metaclip && seq->tmp) { /* return the range clipped by the parents range */ - return max_ii(BKE_sequence_tx_get_final_left(seq, false), - BKE_sequence_tx_get_final_left((Sequence *)seq->tmp, true)); + return max_ii(SEQ_transform_get_left_handle_frame(seq, false), + SEQ_transform_get_left_handle_frame((Sequence *)seq->tmp, true)); } return (seq->start - seq->startstill) + seq->startofs; } -int BKE_sequence_tx_get_final_right(Sequence *seq, bool metaclip) +int SEQ_transform_get_right_handle_frame(Sequence *seq, bool metaclip) { if (metaclip && seq->tmp) { /* return the range clipped by the parents range */ - return min_ii(BKE_sequence_tx_get_final_right(seq, false), - BKE_sequence_tx_get_final_right((Sequence *)seq->tmp, true)); + return min_ii(SEQ_transform_get_right_handle_frame(seq, false), + SEQ_transform_get_right_handle_frame((Sequence *)seq->tmp, true)); } return ((seq->start + seq->len) + seq->endstill) - seq->endofs; } -void BKE_sequence_tx_set_final_left(Sequence *seq, int val) +void SEQ_transform_set_left_handle_frame(Sequence *seq, int val) { if (val < (seq)->start) { seq->startstill = abs(val - (seq)->start); @@ -77,7 +77,7 @@ void BKE_sequence_tx_set_final_left(Sequence *seq, int val) } } -void BKE_sequence_tx_set_final_right(Sequence *seq, int val) +void SEQ_transform_set_right_handle_frame(Sequence *seq, int val) { if (val > (seq)->start + (seq)->len) { seq->endstill = abs(val - (seq->start + (seq)->len)); @@ -91,15 +91,15 @@ void BKE_sequence_tx_set_final_right(Sequence *seq, int val) /* used so we can do a quick check for single image seq * since they work a bit differently to normal image seq's (during transform) */ -bool BKE_sequence_single_check(Sequence *seq) +bool SEQ_transform_single_image_check(Sequence *seq) { return ((seq->len == 1) && (seq->type == SEQ_TYPE_IMAGE || - ((seq->type & SEQ_TYPE_EFFECT) && BKE_sequence_effect_get_num_inputs(seq->type) == 0))); + ((seq->type & SEQ_TYPE_EFFECT) && SEQ_effect_get_num_inputs(seq->type) == 0))); } /* check if the selected seq's reference unselected seq's */ -bool BKE_sequence_base_isolated_sel_check(ListBase *seqbase) +bool SEQ_transform_seqbase_isolated_sel_check(ListBase *seqbase) { Sequence *seq; /* is there more than 1 select */ @@ -144,17 +144,18 @@ bool BKE_sequence_base_isolated_sel_check(ListBase *seqbase) * Use to impose limits when dragging/extending - so impossible situations don't happen. * Cant use the #SEQ_LEFTSEL and #SEQ_LEFTSEL directly because the strip may be in a meta-strip. */ -void BKE_sequence_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag) +void SEQ_transform_handle_xlimits(Sequence *seq, int leftflag, int rightflag) { if (leftflag) { - if (BKE_sequence_tx_get_final_left(seq, false) >= - BKE_sequence_tx_get_final_right(seq, false)) { - BKE_sequence_tx_set_final_left(seq, BKE_sequence_tx_get_final_right(seq, false) - 1); + if (SEQ_transform_get_left_handle_frame(seq, false) >= + SEQ_transform_get_right_handle_frame(seq, false)) { + SEQ_transform_set_left_handle_frame(seq, + SEQ_transform_get_right_handle_frame(seq, false) - 1); } - if (BKE_sequence_single_check(seq) == 0) { - if (BKE_sequence_tx_get_final_left(seq, false) >= seq_tx_get_end(seq)) { - BKE_sequence_tx_set_final_left(seq, seq_tx_get_end(seq) - 1); + if (SEQ_transform_single_image_check(seq) == 0) { + if (SEQ_transform_get_left_handle_frame(seq, false) >= seq_tx_get_end(seq)) { + SEQ_transform_set_left_handle_frame(seq, seq_tx_get_end(seq) - 1); } /* doesn't work now - TODO */ @@ -170,14 +171,15 @@ void BKE_sequence_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag) } if (rightflag) { - if (BKE_sequence_tx_get_final_right(seq, false) <= - BKE_sequence_tx_get_final_left(seq, false)) { - BKE_sequence_tx_set_final_right(seq, BKE_sequence_tx_get_final_left(seq, false) + 1); + if (SEQ_transform_get_right_handle_frame(seq, false) <= + SEQ_transform_get_left_handle_frame(seq, false)) { + SEQ_transform_set_right_handle_frame(seq, + SEQ_transform_get_left_handle_frame(seq, false) + 1); } - if (BKE_sequence_single_check(seq) == 0) { - if (BKE_sequence_tx_get_final_right(seq, false) <= seq_tx_get_start(seq)) { - BKE_sequence_tx_set_final_right(seq, seq_tx_get_start(seq) + 1); + if (SEQ_transform_single_image_check(seq) == 0) { + if (SEQ_transform_get_right_handle_frame(seq, false) <= seq_tx_get_start(seq)) { + SEQ_transform_set_right_handle_frame(seq, seq_tx_get_start(seq) + 1); } } } @@ -189,39 +191,30 @@ void BKE_sequence_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag) } } -void BKE_sequence_single_fix(Sequence *seq) +void SEQ_transform_fix_single_image_seq_offsets(Sequence *seq) { int left, start, offset; - if (!BKE_sequence_single_check(seq)) { + if (!SEQ_transform_single_image_check(seq)) { return; } /* make sure the image is always at the start since there is only one, * adjusting its start should be ok */ - left = BKE_sequence_tx_get_final_left(seq, false); + left = SEQ_transform_get_left_handle_frame(seq, false); start = seq->start; if (start != left) { offset = left - start; - BKE_sequence_tx_set_final_left(seq, BKE_sequence_tx_get_final_left(seq, false) - offset); - BKE_sequence_tx_set_final_right(seq, BKE_sequence_tx_get_final_right(seq, false) - offset); + SEQ_transform_set_left_handle_frame(seq, + SEQ_transform_get_left_handle_frame(seq, false) - offset); + SEQ_transform_set_right_handle_frame( + seq, SEQ_transform_get_right_handle_frame(seq, false) - offset); seq->start += offset; } } -bool BKE_sequence_tx_test(Sequence *seq) +bool SEQ_transform_sequence_can_be_translated(Sequence *seq) { - return !(seq->type & SEQ_TYPE_EFFECT) || (BKE_sequence_effect_get_num_inputs(seq->type) == 0); -} - -/** - * Return \a true if given \a seq needs a complete cleanup of its cache when it is transformed. - * - * Some (effect) strip types need a complete re-cache of themselves when they are transformed, - * because they do not 'contain' anything and do not have any explicit relations to other strips. - */ -bool BKE_sequence_tx_fullupdate_test(Sequence *seq) -{ - return BKE_sequence_tx_test(seq) && ELEM(seq->type, SEQ_TYPE_ADJUSTMENT, SEQ_TYPE_MULTICAM); + return !(seq->type & SEQ_TYPE_EFFECT) || (SEQ_effect_get_num_inputs(seq->type) == 0); } static bool seq_overlap(Sequence *seq1, Sequence *seq2) @@ -230,7 +223,7 @@ static bool seq_overlap(Sequence *seq1, Sequence *seq2) ((seq1->enddisp <= seq2->startdisp) || (seq1->startdisp >= seq2->enddisp)) == 0); } -bool BKE_sequence_test_overlap(ListBase *seqbasep, Sequence *test) +bool SEQ_transform_test_overlap(ListBase *seqbasep, Sequence *test) { Sequence *seq; @@ -245,43 +238,43 @@ bool BKE_sequence_test_overlap(ListBase *seqbasep, Sequence *test) return false; } -void BKE_sequence_translate(Scene *evil_scene, Sequence *seq, int delta) +void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delta) { if (delta == 0) { return; } - BKE_sequencer_offset_animdata(evil_scene, seq, delta); + SEQ_offset_animdata(evil_scene, seq, delta); seq->start += delta; if (seq->type == SEQ_TYPE_META) { Sequence *seq_child; for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) { - BKE_sequence_translate(evil_scene, seq_child, delta); + SEQ_transform_translate_sequence(evil_scene, seq_child, delta); } } - BKE_sequence_calc_disp(evil_scene, seq); + SEQ_time_update_sequence_bounds(evil_scene, seq); } /* return 0 if there weren't enough space */ -bool BKE_sequence_base_shuffle_ex(ListBase *seqbasep, - Sequence *test, - Scene *evil_scene, - int channel_delta) +bool SEQ_transform_seqbase_shuffle_ex(ListBase *seqbasep, + Sequence *test, + Scene *evil_scene, + int channel_delta) { const int orig_machine = test->machine; BLI_assert(ELEM(channel_delta, -1, 1)); test->machine += channel_delta; - BKE_sequence_calc(evil_scene, test); - while (BKE_sequence_test_overlap(seqbasep, test)) { + SEQ_time_update_sequence(evil_scene, test); + while (SEQ_transform_test_overlap(seqbasep, test)) { if ((channel_delta > 0) ? (test->machine >= MAXSEQ) : (test->machine < 1)) { break; } test->machine += channel_delta; - BKE_sequence_calc( + SEQ_time_update_sequence( evil_scene, test); // XXX - I don't think this is needed since were only moving vertically, Campbell. } @@ -301,18 +294,18 @@ bool BKE_sequence_base_shuffle_ex(ListBase *seqbasep, test->machine = orig_machine; new_frame = new_frame + (test->start - test->startdisp); /* adjust by the startdisp */ - BKE_sequence_translate(evil_scene, test, new_frame - test->start); + SEQ_transform_translate_sequence(evil_scene, test, new_frame - test->start); - BKE_sequence_calc(evil_scene, test); + SEQ_time_update_sequence(evil_scene, test); return false; } return true; } -bool BKE_sequence_base_shuffle(ListBase *seqbasep, Sequence *test, Scene *evil_scene) +bool SEQ_transform_seqbase_shuffle(ListBase *seqbasep, Sequence *test, Scene *evil_scene) { - return BKE_sequence_base_shuffle_ex(seqbasep, test, evil_scene, 1); + return SEQ_transform_seqbase_shuffle_ex(seqbasep, test, evil_scene, 1); } static int shuffle_seq_time_offset_test(ListBase *seqbasep, char dir) @@ -356,17 +349,17 @@ static int shuffle_seq_time_offset(Scene *scene, ListBase *seqbasep, char dir) for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->tmp) { - BKE_sequence_calc_disp(scene, seq); /* corrects dummy startdisp/enddisp values */ + SEQ_time_update_sequence_bounds(scene, seq); /* corrects dummy startdisp/enddisp values */ } } return tot_ofs; } -bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, - Scene *evil_scene, - ListBase *markers, - const bool use_sync_markers) +bool SEQ_transform_seqbase_shuffle_time(ListBase *seqbasep, + Scene *evil_scene, + ListBase *markers, + const bool use_sync_markers) { /* note: seq->tmp is used to tag strips to move */ @@ -379,7 +372,7 @@ bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, if (offset) { for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->tmp) { - BKE_sequence_translate(evil_scene, seq, offset); + SEQ_transform_translate_sequence(evil_scene, seq, offset); seq->flag &= ~SEQ_OVERLAP; } } @@ -406,16 +399,16 @@ bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, * \param delta: offset in frames to be applied * \param timeline_frame: frame on timeline from where strips are moved */ -void SEQ_offset_after_frame(Scene *scene, - ListBase *seqbase, - const int delta, - const int timeline_frame) +void SEQ_transform_offset_after_frame(Scene *scene, + ListBase *seqbase, + const int delta, + const int timeline_frame) { LISTBASE_FOREACH (Sequence *, seq, seqbase) { if (seq->startdisp >= timeline_frame) { - BKE_sequence_translate(scene, seq, delta); - BKE_sequence_calc(scene, seq); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_transform_translate_sequence(scene, seq, delta); + SEQ_time_update_sequence(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); } } diff --git a/source/blender/sequencer/intern/utils.c b/source/blender/sequencer/intern/utils.c index a76cfb76e62..40f2aca4714 100644 --- a/source/blender/sequencer/intern/utils.c +++ b/source/blender/sequencer/intern/utils.c @@ -51,11 +51,11 @@ #include "proxy.h" #include "utils.h" -void BKE_sequencer_sort(Scene *scene) +void SEQ_sort(Scene *scene) { /* all strips together per kind, and in order of y location ("machine") */ ListBase seqbase, effbase; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq, *seqt; if (ed == NULL) { @@ -132,7 +132,7 @@ static int seqbase_unique_name_recursive_fn(Sequence *seq, void *arg_pt) return 1; } -void BKE_sequence_base_unique_name_recursive(ListBase *seqbasep, Sequence *seq) +void SEQ_sequence_base_unique_name_recursive(ListBase *seqbasep, Sequence *seq) { SeqUniqueInfo sui; char *dot; @@ -156,7 +156,7 @@ void BKE_sequence_base_unique_name_recursive(ListBase *seqbasep, Sequence *seq) while (sui.match) { sui.match = 0; seqbase_unique_name(seqbasep, &sui); - BKE_sequencer_base_recursive_apply(seqbasep, seqbase_unique_name_recursive_fn, &sui); + SEQ_iterator_seqbase_recursive_apply(seqbasep, seqbase_unique_name_recursive_fn, &sui); } BLI_strncpy(seq->name + 2, sui.name_dest, sizeof(seq->name) - 2); @@ -220,7 +220,7 @@ static const char *give_seqname_by_type(int type) } } -const char *BKE_sequence_give_name(Sequence *seq) +const char *SEQ_sequence_give_name(Sequence *seq) { const char *name = give_seqname_by_type(seq->type); @@ -234,7 +234,7 @@ const char *BKE_sequence_give_name(Sequence *seq) return name; } -ListBase *BKE_sequence_seqbase_get(Sequence *seq, int *r_offset) +ListBase *SEQ_get_seqbase_from_sequence(Sequence *seq, int *r_offset) { ListBase *seqbase = NULL; @@ -246,7 +246,7 @@ ListBase *BKE_sequence_seqbase_get(Sequence *seq, int *r_offset) } case SEQ_TYPE_SCENE: { if (seq->flag & SEQ_SCENE_STRIPS && seq->scene) { - Editing *ed = BKE_sequencer_editing_get(seq->scene, false); + Editing *ed = SEQ_editing_get(seq->scene, false); if (ed) { seqbase = &ed->seqbase; *r_offset = seq->scene->r.sfra; @@ -275,7 +275,7 @@ void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile) } /* reset all the previously created anims */ - BKE_sequence_free_anim(seq); + SEQ_relations_sequence_free_anim(seq); BLI_join_dirfile(name, sizeof(name), seq->strip->dir, seq->strip->stripdata->name); BLI_path_abs(name, BKE_main_blendfile_path_from_global()); @@ -388,7 +388,7 @@ void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile) } } -const Sequence *BKE_sequencer_foreground_frame_get(const Scene *scene, int frame) +const Sequence *SEQ_get_topmost_sequence(const Scene *scene, int frame) { const Editing *ed = scene->ed; const Sequence *seq, *best_seq = NULL; @@ -421,7 +421,7 @@ const Sequence *BKE_sequencer_foreground_frame_get(const Scene *scene, int frame } /* in cases where we done know the sequence's listbase */ -ListBase *BKE_sequence_seqbase(ListBase *seqbase, Sequence *seq) +ListBase *SEQ_get_seqbase_by_seq(ListBase *seqbase, Sequence *seq) { Sequence *iseq; ListBase *lb = NULL; @@ -430,7 +430,7 @@ ListBase *BKE_sequence_seqbase(ListBase *seqbase, Sequence *seq) if (seq == iseq) { return seqbase; } - if (iseq->seqbase.first && (lb = BKE_sequence_seqbase(&iseq->seqbase, seq))) { + if (iseq->seqbase.first && (lb = SEQ_get_seqbase_by_seq(&iseq->seqbase, seq))) { return lb; } } @@ -438,7 +438,7 @@ ListBase *BKE_sequence_seqbase(ListBase *seqbase, Sequence *seq) return NULL; } -Sequence *BKE_sequence_metastrip(ListBase *seqbase, Sequence *meta, Sequence *seq) +Sequence *seq_find_metastrip_by_sequence(ListBase *seqbase, Sequence *meta, Sequence *seq) { Sequence *iseq; @@ -448,7 +448,8 @@ Sequence *BKE_sequence_metastrip(ListBase *seqbase, Sequence *meta, Sequence *se if (seq == iseq) { return meta; } - if (iseq->seqbase.first && (rval = BKE_sequence_metastrip(&iseq->seqbase, iseq, seq))) { + if (iseq->seqbase.first && + (rval = seq_find_metastrip_by_sequence(&iseq->seqbase, iseq, seq))) { return rval; } } @@ -460,7 +461,7 @@ Sequence *BKE_sequence_metastrip(ListBase *seqbase, Sequence *meta, Sequence *se * Only use as last resort when the StripElem is available but no the Sequence. * (needed for RNA) */ -Sequence *BKE_sequencer_from_elem(ListBase *seqbase, StripElem *se) +Sequence *SEQ_sequence_from_strip_elem(ListBase *seqbase, StripElem *se) { Sequence *iseq; @@ -470,7 +471,7 @@ Sequence *BKE_sequencer_from_elem(ListBase *seqbase, StripElem *se) (ARRAY_HAS_ITEM(se, iseq->strip->stripdata, iseq->len))) { break; } - if ((seq_found = BKE_sequencer_from_elem(&iseq->seqbase, se))) { + if ((seq_found = SEQ_sequence_from_strip_elem(&iseq->seqbase, se))) { iseq = seq_found; break; } @@ -479,7 +480,7 @@ Sequence *BKE_sequencer_from_elem(ListBase *seqbase, StripElem *se) return iseq; } -Sequence *BKE_sequence_get_by_name(ListBase *seqbase, const char *name, bool recursive) +Sequence *SEQ_get_sequence_by_name(ListBase *seqbase, const char *name, bool recursive) { Sequence *iseq = NULL; Sequence *rseq = NULL; @@ -489,7 +490,7 @@ Sequence *BKE_sequence_get_by_name(ListBase *seqbase, const char *name, bool rec return iseq; } if (recursive && (iseq->seqbase.first) && - (rseq = BKE_sequence_get_by_name(&iseq->seqbase, name, 1))) { + (rseq = SEQ_get_sequence_by_name(&iseq->seqbase, name, 1))) { return rseq; } } @@ -497,9 +498,9 @@ Sequence *BKE_sequence_get_by_name(ListBase *seqbase, const char *name, bool rec return NULL; } -Mask *BKE_sequencer_mask_get(Scene *scene) +Mask *SEQ_active_mask_get(Scene *scene) { - Sequence *seq_act = BKE_sequencer_active_get(scene); + Sequence *seq_act = SEQ_select_active_get(scene); if (seq_act && seq_act->type == SEQ_TYPE_MASK) { return seq_act->mask; @@ -508,7 +509,7 @@ Mask *BKE_sequencer_mask_get(Scene *scene) return NULL; } -void BKE_sequence_alpha_mode_from_extension(Sequence *seq) +void SEQ_alpha_mode_from_file_extension(Sequence *seq) { if (seq->strip && seq->strip->stripdata) { const char *filename = seq->strip->stripdata->name; @@ -518,7 +519,7 @@ void BKE_sequence_alpha_mode_from_extension(Sequence *seq) /* called on draw, needs to be fast, * we could cache and use a flag if we want to make checks for file paths resolving for eg. */ -bool BKE_sequence_is_valid_check(Sequence *seq) +bool SEQ_sequence_has_source(Sequence *seq) { switch (seq->type) { case SEQ_TYPE_MASK: diff --git a/source/blender/sequencer/intern/utils.h b/source/blender/sequencer/intern/utils.h index f30ea753d37..97f33bb3ae0 100644 --- a/source/blender/sequencer/intern/utils.h +++ b/source/blender/sequencer/intern/utils.h @@ -31,9 +31,9 @@ struct Scene; bool sequencer_seq_generates_image(struct Sequence *seq); void seq_open_anim_file(struct Scene *scene, struct Sequence *seq, bool openfile); -struct Sequence *BKE_sequence_metastrip(ListBase *seqbase /* = ed->seqbase */, - struct Sequence *meta /* = NULL */, - struct Sequence *seq); +struct Sequence *seq_find_metastrip_by_sequence(ListBase *seqbase /* = ed->seqbase */, + struct Sequence *meta /* = NULL */, + struct Sequence *seq); #ifdef __cplusplus } |