diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_camera.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_movieclip.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 200 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer_api.c | 60 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 |
8 files changed, 145 insertions, 143 deletions
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index df9f4674900..2ac8b50f381 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -127,7 +127,7 @@ static void rna_Camera_background_images_clear(Camera *cam) static void rna_Camera_dof_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr)) { - BKE_sequence_invalidate_scene_strips(bmain, scene); + SEQ_relations_invalidate_scene_strips(bmain, scene); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); } diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index ac47f434c3b..2293b892ddb 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -608,14 +608,14 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain, MovieClip *clip = (MovieClip *)id; DEG_id_tag_update(&clip->id, ID_RECALC_SOURCE); - BKE_sequence_invalidate_movieclip_strips(bmain, clip); + SEQ_relations_invalidate_movieclip_strips(bmain, clip); WM_main_add_notifier(NC_MOVIECLIP | ND_DISPLAY, &clip->id); WM_main_add_notifier(NC_MOVIECLIP | NA_EDITED, &clip->id); } else if (GS(id->name) == ID_SCE) { Scene *scene = (Scene *)id; - BKE_sequence_invalidate_scene_strips(bmain, scene); + SEQ_relations_invalidate_scene_strips(bmain, scene); if (scene->ed) { ColorManagedColorspaceSettings *colorspace_settings = (ColorManagedColorspaceSettings *) @@ -634,18 +634,18 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain, } if (seq_found) { - BKE_sequence_free_anim(seq); + SEQ_relations_sequence_free_anim(seq); if (seq->strip->proxy && seq->strip->proxy->anim) { IMB_free_anim(seq->strip->proxy->anim); seq->strip->proxy->anim = NULL; } - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); } else { SEQ_ALL_BEGIN (scene->ed, seq) { - BKE_sequence_free_anim(seq); + SEQ_relations_sequence_free_anim(seq); } SEQ_ALL_END; } diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index d07a4b4fac7..e7f697b281d 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -76,7 +76,7 @@ static void rna_MovieClip_use_proxy_update(Main *bmain, Scene *UNUSED(scene), Po { MovieClip *clip = (MovieClip *)ptr->owner_id; BKE_movieclip_clear_cache(clip); - BKE_sequence_invalidate_movieclip_strips(bmain, clip); + SEQ_relations_invalidate_movieclip_strips(bmain, clip); } static void rna_MovieClipUser_proxy_render_settings_update(Main *bmain, @@ -105,7 +105,7 @@ static void rna_MovieClipUser_proxy_render_settings_update(Main *bmain, if (clip && (clip->flag & MCLIP_USE_PROXY)) { BKE_movieclip_clear_cache(clip); - BKE_sequence_invalidate_movieclip_strips(bmain, clip); + SEQ_relations_invalidate_movieclip_strips(bmain, clip); } break; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 84222347425..bce10b42ea8 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -916,7 +916,7 @@ static void rna_Scene_fps_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(p /* NOTE: Tag via dependency graph will take care of all the updates ion the evaluated domain, * however, changes in FPS actually modifies an original skip length, * so this we take care about here. */ - BKE_sequencer_refresh_sound_length(bmain, scene); + SEQ_sound_update_length(bmain, scene); } static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) @@ -2250,7 +2250,7 @@ static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po Scene *scene = (Scene *)ptr->owner_id; Object *camera = scene->camera; - BKE_sequencer_cache_cleanup(scene); + SEQ_cache_cleanup(scene); if (camera && (camera->type == OB_CAMERA)) { DEG_id_tag_update(&camera->id, ID_RECALC_GEOMETRY); @@ -2259,7 +2259,7 @@ static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) { - BKE_sequencer_cache_cleanup(scene); + SEQ_cache_cleanup(scene); } static char *rna_ToolSettings_path(PointerRNA *UNUSED(ptr)) diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index a57c1196f6a..0549fc8bab2 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -186,7 +186,7 @@ static void rna_Scene_ray_cast(Scene *scene, static void rna_Scene_sequencer_editing_free(Scene *scene) { - BKE_sequencer_editing_free(scene, true); + SEQ_editing_free(scene, true); } # ifdef WITH_ALEMBIC @@ -343,7 +343,7 @@ void RNA_api_scene(StructRNA *srna) RNA_def_function_output(func, parm); /* Sequencer. */ - func = RNA_def_function(srna, "sequence_editor_create", "BKE_sequencer_editing_ensure"); + func = RNA_def_function(srna, "sequence_editor_create", "SEQ_editing_ensure"); RNA_def_function_ui_description(func, "Ensure sequence editor is valid in this scene"); parm = RNA_def_pointer( func, "sequence_editor", "SequenceEditor", "", "New sequence editor data or NULL"); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index eea6fd88ec7..43d65a4380b 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -103,16 +103,16 @@ static void meta_tmp_ref(Sequence *seq_par, Sequence *seq) static void rna_SequenceElement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed) { StripElem *se = (StripElem *)ptr->data; Sequence *seq; /* slow but we can't avoid! */ - seq = BKE_sequencer_from_elem(&ed->seqbase, se); + seq = SEQ_sequence_from_strip_elem(&ed->seqbase, se); if (seq) { - BKE_sequence_invalidate_cache_raw(scene, seq); + SEQ_relations_invalidate_cache_raw(scene, seq); } } } @@ -122,12 +122,12 @@ static void rna_Sequence_invalidate_raw_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed) { Sequence *seq = (Sequence *)ptr->data; - BKE_sequence_invalidate_cache_raw(scene, seq); + SEQ_relations_invalidate_cache_raw(scene, seq); } } @@ -136,12 +136,12 @@ static void rna_Sequence_invalidate_preprocessed_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed) { Sequence *seq = (Sequence *)ptr->data; - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); } } @@ -150,12 +150,12 @@ static void rna_Sequence_invalidate_composite_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed) { Sequence *seq = (Sequence *)ptr->data; - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); } } @@ -172,7 +172,7 @@ static void rna_Sequence_use_sequence(Main *bmain, Scene *scene, PointerRNA *ptr rna_Sequence_invalidate_raw_update(bmain, scene, ptr); /* Changing recursion changes set of IDs which needs to be remapped by the copy-on-write. * the only way for this currently is to tag the ID for ID_RECALC_COPY_ON_WRITE. */ - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed) { Sequence *seq = (Sequence *)ptr->data; if (seq->scene != NULL) { @@ -189,7 +189,7 @@ static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *i PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); meta_tmp_ref(NULL, ed->seqbase.first); @@ -202,8 +202,8 @@ static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain), { Editing *ed = scene->ed; - BKE_sequencer_free_imbuf(scene, &ed->seqbase, false); - BKE_sequencer_cache_cleanup(scene); + SEQ_relations_free_imbuf(scene, &ed->seqbase, false); + SEQ_cache_cleanup(scene); } static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter) @@ -263,10 +263,10 @@ static void rna_Sequence_views_format_update(Main *bmain, Scene *scene, PointerR static void do_sequence_frame_change_update(Scene *scene, Sequence *seq) { - Editing *ed = BKE_sequencer_editing_get(scene, false); - ListBase *seqbase = BKE_sequence_seqbase(&ed->seqbase, seq); + Editing *ed = SEQ_editing_get(scene, false); + ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); Sequence *tseq; - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); /* ensure effects are always fit in length to their input */ @@ -275,14 +275,14 @@ static void do_sequence_frame_change_update(Scene *scene, Sequence *seq) */ for (tseq = seqbase->first; tseq; tseq = tseq->next) { if (tseq->seq1 || tseq->seq2 || tseq->seq3) { - BKE_sequence_calc(scene, tseq); + SEQ_time_update_sequence(scene, tseq); } } - if (BKE_sequence_test_overlap(seqbase, seq)) { - BKE_sequence_base_shuffle(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */ + if (SEQ_transform_test_overlap(seqbase, seq)) { + SEQ_transform_seqbase_shuffle(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */ } - BKE_sequencer_sort(scene); + SEQ_sort(scene); } /* A simple wrapper around above func, directly usable as prop update func. @@ -301,10 +301,10 @@ static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value) Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - BKE_sequence_invalidate_cache_composite(scene, seq); - BKE_sequence_translate(scene, seq, value - seq->start); + SEQ_relations_invalidate_cache_composite(scene, seq); + SEQ_transform_translate_sequence(scene, seq, value - seq->start); do_sequence_frame_change_update(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); } static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value) @@ -312,11 +312,11 @@ static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value) Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - BKE_sequence_invalidate_cache_composite(scene, seq); - BKE_sequence_tx_set_final_left(seq, value); - BKE_sequence_single_fix(seq); + SEQ_relations_invalidate_cache_composite(scene, seq); + SEQ_transform_set_left_handle_frame(seq, value); + SEQ_transform_fix_single_image_seq_offsets(seq); do_sequence_frame_change_update(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); } static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value) @@ -324,11 +324,11 @@ static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value) Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - BKE_sequence_invalidate_cache_composite(scene, seq); - BKE_sequence_tx_set_final_right(seq, value); - BKE_sequence_single_fix(seq); + SEQ_relations_invalidate_cache_composite(scene, seq); + SEQ_transform_set_right_handle_frame(seq, value); + SEQ_transform_fix_single_image_seq_offsets(seq); do_sequence_frame_change_update(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); } static void rna_Sequence_frame_offset_start_set(PointerRNA *ptr, int value) @@ -336,7 +336,7 @@ static void rna_Sequence_frame_offset_start_set(PointerRNA *ptr, int value) Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); seq->startofs = value; } @@ -345,7 +345,7 @@ static void rna_Sequence_frame_offset_end_set(PointerRNA *ptr, int value) Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); seq->endofs = value; } @@ -354,7 +354,7 @@ static void rna_Sequence_frame_still_start_set(PointerRNA *ptr, int value) Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); seq->startstill = value; } @@ -363,7 +363,7 @@ static void rna_Sequence_frame_still_end_set(PointerRNA *ptr, int value) Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); seq->endstill = value; } @@ -374,7 +374,7 @@ static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value) seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs); - BKE_sequence_reload_new_file(G.main, scene, seq, false); + SEQ_add_reload_new_file(G.main, scene, seq, false); do_sequence_frame_change_update(scene, seq); } @@ -385,7 +385,7 @@ static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value) seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs); - BKE_sequence_reload_new_file(G.main, scene, seq, false); + SEQ_add_reload_new_file(G.main, scene, seq, false); do_sequence_frame_change_update(scene, seq); } @@ -428,43 +428,45 @@ static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value) Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - BKE_sequence_invalidate_cache_composite(scene, seq); - BKE_sequence_tx_set_final_right(seq, BKE_sequence_tx_get_final_left(seq, false) + value); + SEQ_relations_invalidate_cache_composite(scene, seq); + SEQ_transform_set_right_handle_frame(seq, + SEQ_transform_get_left_handle_frame(seq, false) + value); do_sequence_frame_change_update(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); } static int rna_Sequence_frame_length_get(PointerRNA *ptr) { Sequence *seq = (Sequence *)ptr->data; - return BKE_sequence_tx_get_final_right(seq, false) - BKE_sequence_tx_get_final_left(seq, false); + return SEQ_transform_get_right_handle_frame(seq, false) - + SEQ_transform_get_left_handle_frame(seq, false); } static int rna_Sequence_frame_editable(PointerRNA *ptr, const char **UNUSED(r_info)) { Sequence *seq = (Sequence *)ptr->data; /* Effect sequences' start frame and length must be readonly! */ - return (BKE_sequence_effect_get_num_inputs(seq->type)) ? 0 : PROP_EDITABLE; + return (SEQ_effect_get_num_inputs(seq->type)) ? 0 : PROP_EDITABLE; } static void rna_Sequence_channel_set(PointerRNA *ptr, int value) { Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); - ListBase *seqbase = BKE_sequence_seqbase(&ed->seqbase, seq); + Editing *ed = SEQ_editing_get(scene, false); + ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); /* check channel increment or decrement */ const int channel_delta = (value >= seq->machine) ? 1 : -1; seq->machine = value; - if (BKE_sequence_test_overlap(seqbase, seq)) { + if (SEQ_transform_test_overlap(seqbase, seq)) { /* XXX - BROKEN!, uses context seqbasep */ - BKE_sequence_base_shuffle_ex(seqbase, seq, scene, channel_delta); + SEQ_transform_seqbase_shuffle_ex(seqbase, seq, scene, channel_delta); } - BKE_sequencer_sort(scene); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_sort(scene); + SEQ_relations_invalidate_cache_composite(scene, seq); } static void rna_Sequence_use_proxy_set(PointerRNA *ptr, bool value) @@ -492,7 +494,7 @@ static Sequence *sequence_get_by_transform(Editing *ed, StripTransform *transfor data.data = transform; /* irritating we need to search for our sequence! */ - BKE_sequencer_base_recursive_apply(&ed->seqbase, transform_seq_cmp_fn, &data); + SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, transform_seq_cmp_fn, &data); return data.seq; } @@ -500,7 +502,7 @@ static Sequence *sequence_get_by_transform(Editing *ed, StripTransform *transfor static char *rna_SequenceTransform_path(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_transform(ed, ptr->data); if (seq && seq->name + 2) { @@ -519,10 +521,10 @@ static void rna_SequenceTransform_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_transform(ed, ptr->data); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); } static int crop_seq_cmp_fn(Sequence *seq, void *arg_pt) @@ -544,7 +546,7 @@ static Sequence *sequence_get_by_crop(Editing *ed, StripCrop *crop) data.data = crop; /* irritating we need to search for our sequence! */ - BKE_sequencer_base_recursive_apply(&ed->seqbase, crop_seq_cmp_fn, &data); + SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, crop_seq_cmp_fn, &data); return data.seq; } @@ -552,7 +554,7 @@ static Sequence *sequence_get_by_crop(Editing *ed, StripCrop *crop) static char *rna_SequenceCrop_path(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_crop(ed, ptr->data); if (seq && seq->name + 2) { @@ -569,10 +571,10 @@ static char *rna_SequenceCrop_path(PointerRNA *ptr) static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_crop(ed, ptr->data); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); } static void rna_Sequence_text_font_set(PointerRNA *ptr, @@ -583,7 +585,7 @@ static void rna_Sequence_text_font_set(PointerRNA *ptr, TextVars *data = seq->effectdata; VFont *value = ptr_value.data; - BKE_sequencer_text_font_unload(data, true); + SEQ_effect_text_font_unload(data, true); id_us_plus(&value->id); data->text_blf_id = SEQ_FONT_NOT_LOADED; @@ -610,7 +612,7 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value) char oldname[sizeof(seq->name)]; AnimData *adt; - BKE_sequencer_prefetch_stop(scene); + SEQ_prefetch_stop(scene); /* make a copy of the old name first */ BLI_strncpy(oldname, seq->name + 2, sizeof(seq->name) - 2); @@ -619,7 +621,7 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value) BLI_strncpy_utf8(seq->name + 2, value, sizeof(seq->name) - 2); /* make sure the name is unique */ - BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); + SEQ_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); /* fix all the animation data which may link to this */ @@ -730,11 +732,11 @@ static bool rna_MovieSequence_reload_if_needed(ID *scene_id, Sequence *seq, Main bool has_reloaded; bool can_produce_frames; - BKE_sequence_movie_reload_if_needed(bmain, scene, seq, &has_reloaded, &can_produce_frames); + SEQ_add_movie_reload_if_needed(bmain, scene, seq, &has_reloaded, &can_produce_frames); if (has_reloaded && can_produce_frames) { - BKE_sequence_calc(scene, seq); - BKE_sequence_invalidate_cache_raw(scene, seq); + SEQ_time_update_sequence(scene, seq); + SEQ_relations_invalidate_cache_raw(scene, seq); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); @@ -834,7 +836,7 @@ static int rna_Sequence_input_count_get(PointerRNA *ptr) { Sequence *seq = (Sequence *)(ptr->data); - return BKE_sequence_effect_get_num_inputs(seq->type); + return SEQ_effect_get_num_inputs(seq->type); } static void rna_Sequence_input_set(PointerRNA *ptr, @@ -846,7 +848,7 @@ static void rna_Sequence_input_set(PointerRNA *ptr, Sequence *seq = ptr->data; Sequence *input = ptr_value.data; - if (BKE_sequencer_render_loop_check(input, seq)) { + if (SEQ_relations_render_loop_check(input, seq)) { BKE_report(reports, RPT_ERROR, "Cannot reassign inputs: recursion detected"); return; } @@ -895,13 +897,13 @@ static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value) static void rna_Sequence_reopen_files_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); - BKE_sequencer_free_imbuf(scene, &ed->seqbase, false); + SEQ_relations_free_imbuf(scene, &ed->seqbase, false); rna_Sequence_invalidate_raw_update(bmain, scene, ptr); if (RNA_struct_is_a(ptr->type, &RNA_SoundSequence)) { - BKE_sequencer_update_sound_bounds(scene, ptr->data); + SEQ_sound_update_bounds(scene, ptr->data); } } @@ -909,8 +911,8 @@ static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), Poin { Scene *scene = (Scene *)ptr->owner_id; Sequence *seq = (Sequence *)(ptr->data); - 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); rna_Sequence_invalidate_raw_update(bmain, scene, ptr); } @@ -937,26 +939,26 @@ static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy) data.seq = NULL; data.data = proxy; - BKE_sequencer_base_recursive_apply(&ed->seqbase, seqproxy_seq_cmp_fn, &data); + SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, seqproxy_seq_cmp_fn, &data); return data.seq; } static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_proxy(ed, ptr->data); - BKE_sequence_reload_new_file(bmain, scene, seq, false); + SEQ_add_reload_new_file(bmain, scene, seq, false); do_sequence_frame_change_update(scene, seq); } static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_proxy(ed, ptr->data); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); } /* do_versions? */ @@ -1006,7 +1008,7 @@ static Sequence *sequence_get_by_colorbalance(Editing *ed, data.data = cb; /* irritating we need to search for our sequence! */ - BKE_sequencer_base_recursive_apply(&ed->seqbase, colbalance_seq_cmp_fn, &data); + SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, colbalance_seq_cmp_fn, &data); *r_smd = data.smd; @@ -1017,7 +1019,7 @@ static char *rna_SequenceColorBalance_path(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; SequenceModifierData *smd; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd); if (seq && seq->name + 2) { @@ -1049,17 +1051,17 @@ static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); SequenceModifierData *smd; Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); } static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, bool value) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed == NULL) { return; @@ -1079,7 +1081,7 @@ static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, bool value) static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed == NULL) { return scene->r.cfra; @@ -1096,7 +1098,7 @@ static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr) static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); if (ed == NULL) { return; @@ -1130,7 +1132,7 @@ static Sequence *sequence_get_by_modifier(Editing *ed, SequenceModifierData *smd data.data = smd; /* irritating we need to search for our sequence! */ - BKE_sequencer_base_recursive_apply(&ed->seqbase, modifier_seq_cmp_fn, &data); + SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, modifier_seq_cmp_fn, &data); return data.seq; } @@ -1160,7 +1162,7 @@ static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr) static char *rna_SequenceModifier_path(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); SequenceModifierData *smd = ptr->data; Sequence *seq = sequence_get_by_modifier(ed, smd); @@ -1182,7 +1184,7 @@ static void rna_SequenceModifier_name_set(PointerRNA *ptr, const char *value) { SequenceModifierData *smd = ptr->data; Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_modifier(ed, smd); AnimData *adt; char oldname[sizeof(smd->name)]; @@ -1194,7 +1196,7 @@ static void rna_SequenceModifier_name_set(PointerRNA *ptr, const char *value) BLI_strncpy_utf8(smd->name, value, sizeof(smd->name)); /* make sure the name is truly unique */ - BKE_sequence_modifier_unique_name(seq, smd); + SEQ_modifier_unique_name(seq, smd); /* fix all the animation data which may link to this */ adt = BKE_animdata_from_id(&scene->id); @@ -1214,16 +1216,16 @@ static void rna_SequenceModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene { /* strip from other scenes could be modified, so using active scene is not reliable */ Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_modifier(ed, ptr->data); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); } static bool rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_modifier(ed, ptr->data); Sequence *cur = (Sequence *)value.data; @@ -1237,7 +1239,7 @@ static bool rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA static SequenceModifierData *rna_Sequence_modifier_new( Sequence *seq, bContext *C, ReportList *reports, const char *name, int type) { - if (!BKE_sequence_supports_modifiers(seq)) { + if (!SEQ_sequence_supports_modifiers(seq)) { BKE_report(reports, RPT_ERROR, "Sequence type does not support modifiers"); return NULL; @@ -1246,9 +1248,9 @@ static SequenceModifierData *rna_Sequence_modifier_new( Scene *scene = CTX_data_scene(C); SequenceModifierData *smd; - smd = BKE_sequence_modifier_new(seq, name, type); + smd = SEQ_modifier_new(seq, name, type); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); @@ -1264,13 +1266,13 @@ static void rna_Sequence_modifier_remove(Sequence *seq, SequenceModifierData *smd = smd_ptr->data; Scene *scene = CTX_data_scene(C); - if (BKE_sequence_modifier_remove(seq, smd) == false) { + if (SEQ_modifier_remove(seq, smd) == false) { BKE_report(reports, RPT_ERROR, "Modifier was not found in the stack"); return; } RNA_POINTER_INVALIDATE(smd_ptr); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); } @@ -1279,9 +1281,9 @@ static void rna_Sequence_modifier_clear(Sequence *seq, bContext *C) { Scene *scene = CTX_data_scene(C); - BKE_sequence_modifier_clear(seq); + SEQ_modifier_clear(seq); - BKE_sequence_invalidate_cache_preprocessed(scene, seq); + SEQ_relations_invalidate_cache_preprocessed(scene, seq); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); } @@ -1292,11 +1294,11 @@ static void rna_SequenceModifier_strip_set(PointerRNA *ptr, { SequenceModifierData *smd = ptr->data; Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = BKE_sequencer_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = sequence_get_by_modifier(ed, smd); Sequence *target = (Sequence *)value.data; - if (target != NULL && BKE_sequencer_render_loop_check(target, seq)) { + if (target != NULL && SEQ_relations_render_loop_check(target, seq)) { BKE_report(reports, RPT_ERROR, "Recursion detected, can not use this strip"); return; } @@ -1308,7 +1310,7 @@ static float rna_Sequence_fps_get(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; Sequence *seq = (Sequence *)(ptr->data); - return BKE_sequence_get_fps(scene, seq); + return SEQ_time_sequence_get_fps(scene, seq); } #else diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 6f97098900e..67497c2da2a 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -58,11 +58,11 @@ static void rna_Sequence_update_rnafunc(ID *id, Sequence *self, bool do_data) { if (do_data) { - BKE_sequencer_update_changed_seq_and_deps((Scene *)id, self, true, true); + SEQ_relations_update_changed_seq_and_deps((Scene *)id, self, true, true); // new_tstripdata(self); /* need 2.6x version of this. */ } - BKE_sequence_calc((Scene *)id, self); - BKE_sequence_calc_disp((Scene *)id, self); + SEQ_time_update_sequence((Scene *)id, self); + SEQ_time_update_sequence_bounds((Scene *)id, self); } static void rna_Sequence_swap_internal(Sequence *seq_self, @@ -71,7 +71,7 @@ static void rna_Sequence_swap_internal(Sequence *seq_self, { const char *error_msg; - if (BKE_sequence_swap(seq_self, seq_other, &error_msg) == 0) { + if (SEQ_edit_sequence_swap(seq_self, seq_other, &error_msg) == 0) { BKE_report(reports, RPT_ERROR, error_msg); } } @@ -82,10 +82,10 @@ static Sequence *alloc_generic_sequence( Sequence *seq; StripElem *se; - seq = BKE_sequence_alloc(seqbase, frame_start, channel, type); + seq = SEQ_sequence_alloc(seqbase, frame_start, channel, type); BLI_strncpy(seq->name + 2, name, sizeof(seq->name) - 2); - BKE_sequence_base_unique_name_recursive(seqbase, seq); + SEQ_sequence_base_unique_name_recursive(seqbase, seq); Strip *strip = seq->strip; @@ -121,7 +121,7 @@ static Sequence *rna_Sequences_new_clip(ID *id, seq->len = BKE_movieclip_get_duration(clip); id_us_plus((ID *)clip); - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); DEG_relations_tag_update(bmain); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); @@ -168,8 +168,8 @@ static Sequence *rna_Sequences_new_mask(ID *id, seq->len = BKE_mask_get_duration(mask); id_us_plus((ID *)mask); - BKE_sequence_calc_disp(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); DEG_relations_tag_update(bmain); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); @@ -205,8 +205,8 @@ static Sequence *rna_Sequences_new_scene(ID *id, seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1; id_us_plus((ID *)sce_seq); - BKE_sequence_calc_disp(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); DEG_relations_tag_update(bmain); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); @@ -255,12 +255,12 @@ static Sequence *rna_Sequences_new_image(ID *id, if (seq->strip->stripdata->name[0] == '\0') { BKE_report(reports, RPT_ERROR, "Sequences.new_image: unable to open image file"); BLI_remlink(seqbase, seq); - BKE_sequence_free(scene, seq, true); + SEQ_sequence_free(scene, seq, true); return NULL; } - BKE_sequence_calc_disp(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); DEG_relations_tag_update(bmain); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); @@ -318,8 +318,8 @@ static Sequence *rna_Sequences_new_movie( seq->len = IMB_anim_get_duration(an, IMB_TC_RECORD_RUN); } - BKE_sequence_calc_disp(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); @@ -365,7 +365,7 @@ static Sequence *rna_Sequences_new_sound(ID *id, seq->sound = sound; seq->len = ceil((double)info.length * FPS); - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); DEG_relations_tag_update(bmain); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); @@ -429,7 +429,7 @@ static Sequence *rna_Sequences_new_effect(ID *id, Scene *scene = (Scene *)id; Sequence *seq; struct SeqEffectHandle sh; - int num_inputs = BKE_sequence_effect_get_num_inputs(type); + int num_inputs = SEQ_effect_get_num_inputs(type); switch (num_inputs) { case 0: @@ -467,7 +467,7 @@ static Sequence *rna_Sequences_new_effect(ID *id, seq = alloc_generic_sequence(seqbase, name, frame_start, channel, type, NULL); - sh = BKE_sequence_get_effect(seq); + sh = SEQ_effect_handle_get(seq); seq->seq1 = seq1; seq->seq2 = seq2; @@ -477,14 +477,14 @@ static Sequence *rna_Sequences_new_effect(ID *id, if (!seq1) { /* effect has no deps */ seq->len = 1; - BKE_sequence_tx_set_final_right(seq, frame_end); + SEQ_transform_set_right_handle_frame(seq, frame_end); } seq->flag |= SEQ_USE_EFFECT_DEFAULT_FADE; - BKE_sequence_calc(scene, seq); - BKE_sequence_calc_disp(scene, seq); - BKE_sequence_invalidate_cache_composite(scene, seq); + SEQ_time_update_sequence(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); + SEQ_relations_invalidate_cache_composite(scene, seq); DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); @@ -536,8 +536,8 @@ static void rna_Sequences_remove( return; } - BKE_sequencer_flag_for_removal(scene, seqbase, seq); - BKE_sequencer_remove_flagged_sequences(scene, seqbase); + SEQ_edit_flag_for_removal(scene, seqbase, seq); + SEQ_edit_remove_flagged_sequences(scene, seqbase); RNA_POINTER_INVALIDATE(seq_ptr); DEG_relations_tag_update(bmain); @@ -568,7 +568,7 @@ static StripElem *rna_SequenceElements_append(ID *id, Sequence *seq, const char BLI_strncpy(se->name, filename, sizeof(se->name)); seq->len++; - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); return se; @@ -609,7 +609,7 @@ static void rna_SequenceElements_pop(ID *id, Sequence *seq, ReportList *reports, MEM_freeN(seq->strip->stripdata); seq->strip->stripdata = new_seq; - BKE_sequence_calc_disp(scene, seq); + SEQ_time_update_sequence_bounds(scene, seq); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); } @@ -618,13 +618,13 @@ static void rna_Sequence_invalidate_cache_rnafunc(ID *id, Sequence *self, int ty { switch (type) { case SEQ_CACHE_STORE_RAW: - BKE_sequence_invalidate_cache_raw((Scene *)id, self); + SEQ_relations_invalidate_cache_raw((Scene *)id, self); break; case SEQ_CACHE_STORE_PREPROCESSED: - BKE_sequence_invalidate_cache_preprocessed((Scene *)id, self); + SEQ_relations_invalidate_cache_preprocessed((Scene *)id, self); break; case SEQ_CACHE_STORE_COMPOSITE: - BKE_sequence_invalidate_cache_composite((Scene *)id, self); + SEQ_relations_invalidate_cache_composite((Scene *)id, self); break; } } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 2f821dad811..5604ccd9655 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2223,7 +2223,7 @@ static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) { - BKE_sequencer_cache_cleanup(scene); + SEQ_cache_cleanup(scene); } static void rna_Sequencer_view_type_update(Main *UNUSED(bmain), |