diff options
Diffstat (limited to 'source')
31 files changed, 140 insertions, 143 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 7f7a2d97cbb..b217850e119 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -687,7 +687,7 @@ void do_versions_after_linking_290(Main *bmain, ReportList *UNUSED(reports)) if (!MAIN_VERSION_ATLEAST(bmain, 293, 16)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { - seq_update_meta_disp_range(SEQ_editing_get(scene, false)); + seq_update_meta_disp_range(SEQ_editing_get(scene)); } /* Add a separate socket for Grid node X and Y size. */ @@ -1650,7 +1650,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { continue; } diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 2cc0f6ad288..916d4232f03 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -214,7 +214,7 @@ static void animchan_sync_fcurve_scene(bAnimListElem *ale) } /* Check if this strip is selected. */ - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = SEQ_get_sequence_by_name(ed->seqbasep, seq_name, false); MEM_freeN(seq_name); diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 2252fc4fcbc..7e3e3f363c2 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1103,7 +1103,7 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id if (fcu->rna_path && (seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all["))) { /* Get strip name, and check if this strip is selected. */ Sequence *seq = NULL; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { seq = SEQ_get_sequence_by_name(ed->seqbasep, seq_name, false); } diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 6f3277397c5..450d7cd100e 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -105,7 +105,7 @@ static void seq_frame_snap_update_best(const int position, static int seq_frame_apply_snap(bContext *C, Scene *scene, const int timeline_frame) { - ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(scene, false)); + ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(scene)); SeqCollection *strips = SEQ_query_all_strips(seqbase); int best_frame = 0; diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 13c338efdec..2ccefb993c7 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -623,7 +623,7 @@ static eContextResult screen_ctx_sequences(const bContext *C, bContextDataResult { wmWindow *win = CTX_wm_window(C); Scene *scene = WM_window_get_active_scene(win); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) { CTX_data_list_add(result, &scene->id, &RNA_Sequence, seq); @@ -637,7 +637,7 @@ static eContextResult screen_ctx_selected_sequences(const bContext *C, bContextD { wmWindow *win = CTX_wm_window(C); Scene *scene = WM_window_get_active_scene(win); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) { if (seq->flag & SELECT) { @@ -654,7 +654,7 @@ static eContextResult screen_ctx_selected_editable_sequences(const bContext *C, { wmWindow *win = CTX_wm_window(C); Scene *scene = WM_window_get_active_scene(win); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) { if (seq->flag & SELECT && !(seq->flag & SEQ_LOCK)) { diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 1feecc04ead..581892ebb3a 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -673,7 +673,7 @@ static void tree_element_sequence_activate(bContext *C, const eOLSetState set) { Sequence *seq = (Sequence *)te->directdata; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (BLI_findindex(ed->seqbasep, seq) != -1) { if (set == OL_SETSEL_EXTEND) { @@ -695,7 +695,7 @@ static void tree_element_sequence_activate(bContext *C, static void tree_element_sequence_dup_activate(Scene *scene, TreeElement *UNUSED(te)) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); #if 0 select_single_seq(seq, 1); diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index d88ae82cc9a..7709c6bb053 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1286,7 +1286,7 @@ static void sequence_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem { Sequence *seq = (Sequence *)te->directdata; Scene *scene = (Scene *)scene_ptr; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (BLI_findindex(ed->seqbasep, seq) != -1) { if (event == OL_DOP_SELECT) { ED_sequencer_select_sequence_single(scene, seq, true); diff --git a/source/blender/editors/space_outliner/tree/tree_display_sequencer.cc b/source/blender/editors/space_outliner/tree/tree_display_sequencer.cc index 40f329d72c3..02af6a13cb3 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_sequencer.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_sequencer.cc @@ -43,7 +43,7 @@ ListBase TreeDisplaySequencer::buildTree(const TreeSourceData &source_data) { ListBase tree = {nullptr}; - Editing *ed = SEQ_editing_get(source_data.scene, false); + Editing *ed = SEQ_editing_get(source_data.scene); if (ed == nullptr) { return tree; } diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 16b690dd6e4..081f0241e94 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -185,7 +185,7 @@ static int sequencer_generic_invoke_xy_guess_channel(bContext *C, int type) Sequence *tgt = NULL; Sequence *seq; Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, true); + Editing *ed = SEQ_editing_ensure(scene); int timeline_frame = (int)CFRA; int proximity = INT_MAX; @@ -314,7 +314,7 @@ static void load_data_init_from_operator(SeqLoadData *load_data, bContext *C, wm static void seq_load_apply_generic_options(bContext *C, wmOperator *op, Sequence *seq) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (seq == NULL) { return; @@ -356,7 +356,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - const Editing *ed = SEQ_editing_get(scene, true); + const Editing *ed = SEQ_editing_ensure(scene); Scene *sce_seq = BLI_findlink(&bmain->scenes, RNA_enum_get(op->ptr, "scene")); if (sce_seq == NULL) { @@ -384,7 +384,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) static void sequencer_disable_one_time_properties(bContext *C, wmOperator *op) { - Editing *ed = SEQ_editing_get(CTX_data_scene(C), false); + Editing *ed = SEQ_editing_get(CTX_data_scene(C)); /* Disable following properties if there are any existing strips, unless overridden by user. */ if (ed && ed->seqbasep && ed->seqbasep->first) { if (RNA_struct_find_property(op->ptr, "use_framerate")) { @@ -435,7 +435,7 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - const Editing *ed = SEQ_editing_get(scene, true); + const Editing *ed = SEQ_editing_ensure(scene); MovieClip *clip = BLI_findlink(&bmain->movieclips, RNA_enum_get(op->ptr, "clip")); if (clip == NULL) { @@ -499,7 +499,7 @@ static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - const Editing *ed = SEQ_editing_get(scene, true); + const Editing *ed = SEQ_editing_ensure(scene); Mask *mask = BLI_findlink(&bmain->masks, RNA_enum_get(op->ptr, "mask")); if (mask == NULL) { @@ -632,7 +632,7 @@ static void sequencer_add_movie_multiple_strips(bContext *C, { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - const Editing *ed = SEQ_editing_get(scene, true); + const Editing *ed = SEQ_editing_ensure(scene); RNA_BEGIN (op->ptr, itemptr, "files") { char dir_only[FILE_MAX]; @@ -668,7 +668,7 @@ static bool sequencer_add_movie_single_strip(bContext *C, wmOperator *op, SeqLoa { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - const Editing *ed = SEQ_editing_get(scene, true); + const Editing *ed = SEQ_editing_ensure(scene); Sequence *seq_movie = NULL; Sequence *seq_sound = NULL; @@ -817,7 +817,7 @@ static void sequencer_add_sound_multiple_strips(bContext *C, { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, true); + Editing *ed = SEQ_editing_ensure(scene); RNA_BEGIN (op->ptr, itemptr, "files") { char dir_only[FILE_MAX]; @@ -842,7 +842,7 @@ static bool sequencer_add_sound_single_strip(bContext *C, wmOperator *op, SeqLoa { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, true); + Editing *ed = SEQ_editing_ensure(scene); Sequence *seq = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data, 0.0f); if (seq == NULL) { @@ -1035,7 +1035,7 @@ static void sequencer_add_image_strip_load_files( static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, true); + Editing *ed = SEQ_editing_ensure(scene); SeqLoadData load_data; load_data_init_from_operator(&load_data, C, op); @@ -1141,7 +1141,7 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot) static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, true); + Editing *ed = SEQ_editing_ensure(scene); const char *error_msg; SeqLoadData load_data; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index fe3ff469e50..b56ad48cec2 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -2275,9 +2275,9 @@ static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *region) } } -static void seq_draw_sfra_efra(Scene *scene, View2D *v2d) +static void seq_draw_sfra_efra(const Scene *scene, View2D *v2d) { - const Editing *ed = SEQ_editing_get(scene, false); + const Editing *ed = SEQ_editing_get(scene); const int frame_sta = scene->r.sfra; const int frame_end = scene->r.efra + 1; @@ -2312,7 +2312,7 @@ static void seq_draw_sfra_efra(Scene *scene, View2D *v2d) /* While in meta strip, draw a checkerboard overlay outside of frame range. */ if (ed && !BLI_listbase_is_empty(&ed->metastack)) { - MetaStack *ms = ed->metastack.last; + const MetaStack *ms = ed->metastack.last; immUnbindProgram(); immBindBuiltinProgram(GPU_SHADER_2D_CHECKER); @@ -2586,7 +2586,7 @@ static void draw_overlap_frame_indicator(const struct Scene *scene, const View2D void draw_timeline_seq(const bContext *C, ARegion *region) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); SpaceSeq *sseq = CTX_wm_space_seq(C); View2D *v2d = ®ion->v2d; short cfra_flag = 0; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 935bc97d0b2..b95b7fa0620 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -190,14 +190,14 @@ bool ED_space_sequencer_has_playback_animation(const struct SpaceSeq *sseq, /* Operator functions. */ bool sequencer_edit_poll(bContext *C) { - return (SEQ_editing_get(CTX_data_scene(C), false) != NULL); + return (SEQ_editing_get(CTX_data_scene(C)) != NULL); } #if 0 /* UNUSED */ bool sequencer_strip_poll(bContext *C) { Editing *ed; - return (((ed = SEQ_editing_get(CTX_data_scene(C), false)) != NULL) && + return (((ed = SEQ_editing_get(CTX_data_scene(C))) != NULL) && (ed->act_seq != NULL)); } #endif @@ -206,14 +206,14 @@ bool sequencer_strip_has_path_poll(bContext *C) { Editing *ed; Sequence *seq; - return (((ed = SEQ_editing_get(CTX_data_scene(C), false)) != NULL) && - ((seq = ed->act_seq) != NULL) && (SEQ_HAS_PATH(seq))); + return (((ed = SEQ_editing_get(CTX_data_scene(C))) != NULL) && ((seq = ed->act_seq) != NULL) && + (SEQ_HAS_PATH(seq))); } bool sequencer_view_preview_poll(bContext *C) { SpaceSeq *sseq = CTX_wm_space_seq(C); - Editing *ed = SEQ_editing_get(CTX_data_scene(C), false); + Editing *ed = SEQ_editing_get(CTX_data_scene(C)); if (ed && sseq && (sseq->mainb == SEQ_DRAW_IMG_IMBUF)) { return 1; } @@ -241,7 +241,7 @@ static int sequencer_gap_remove_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); const bool do_all = RNA_boolean_get(op->ptr, "all"); - const Editing *ed = SEQ_editing_get(scene, false); + const Editing *ed = SEQ_editing_get(scene); SEQ_edit_remove_gaps(scene, ed->seqbasep, CFRA, do_all); @@ -281,7 +281,7 @@ static int sequencer_gap_insert_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); const int frames = RNA_int_get(op->ptr, "frames"); - const Editing *ed = SEQ_editing_get(scene, false); + const Editing *ed = SEQ_editing_get(scene); SEQ_transform_offset_after_frame(scene, ed->seqbasep, frames, CFRA); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -327,7 +327,7 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; int snap_frame; @@ -531,7 +531,7 @@ static int sequencer_slip_invoke(bContext *C, wmOperator *op, const wmEvent *eve { SlipData *data; Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); float mouseloc[2]; int num_seq; View2D *v2d = UI_view2d_fromcontext(C); @@ -579,7 +579,7 @@ static int sequencer_slip_invoke(bContext *C, wmOperator *op, const wmEvent *eve static bool sequencer_slip_recursively(Scene *scene, SlipData *data, int offset) { /* Only data types supported for now. */ - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); bool changed = false; /* Iterate in reverse so meta-strips are iterated after their children. */ @@ -663,7 +663,7 @@ static void sequencer_slip_apply_limits(SlipData *data, int *offset) static int sequencer_slip_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); int offset = RNA_int_get(op->ptr, "offset"); bool success = false; @@ -798,7 +798,7 @@ static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *even case EVT_ESCKEY: case RIGHTMOUSE: { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); for (int i = 0; i < data->num_seq; i++) { transseq_restore(data->ts + i, data->seq_array[i]); @@ -900,7 +900,7 @@ void SEQUENCER_OT_slip(struct wmOperatorType *ot) static int sequencer_mute_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; bool selected; @@ -956,7 +956,7 @@ void SEQUENCER_OT_mute(struct wmOperatorType *ot) static int sequencer_unmute_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; bool selected; @@ -1012,7 +1012,7 @@ void SEQUENCER_OT_unmute(struct wmOperatorType *ot) static int sequencer_lock_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; for (seq = ed->seqbasep->first; seq; seq = seq->next) { @@ -1050,7 +1050,7 @@ void SEQUENCER_OT_lock(struct wmOperatorType *ot) static int sequencer_unlock_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; for (seq = ed->seqbasep->first; seq; seq = seq->next) { @@ -1089,7 +1089,7 @@ static int sequencer_reload_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; const bool adjust_length = RNA_boolean_get(op->ptr, "adjust_length"); @@ -1152,7 +1152,7 @@ static bool sequencer_refresh_all_poll(bContext *C) static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); SEQ_relations_free_imbuf(scene, &ed->seqbase, false); @@ -1187,7 +1187,7 @@ int seq_effect_find_selected(Scene *scene, Sequence **r_selseq3, const char **r_error_str) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq1 = NULL, *seq2 = NULL, *seq3 = NULL, *seq; *r_error_str = NULL; @@ -1316,7 +1316,7 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) static bool sequencer_effect_poll(bContext *C) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { Sequence *last_seq = SEQ_select_active_get(scene); @@ -1423,7 +1423,7 @@ static int sequencer_split_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); bool changed = false; bool seq_selected = false; @@ -1628,7 +1628,7 @@ void SEQUENCER_OT_split(struct wmOperatorType *ot) static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return OPERATOR_CANCELLED; @@ -1688,7 +1688,7 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); SEQ_prefetch_stop(scene); @@ -1747,7 +1747,7 @@ void SEQUENCER_OT_delete(wmOperatorType *ot) static int sequencer_offset_clear_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; /* For effects, try to find a replacement input. */ @@ -1802,7 +1802,7 @@ void SEQUENCER_OT_offset_clear(wmOperatorType *ot) static int sequencer_separate_images_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq, *seq_new; Strip *strip_new; @@ -1908,7 +1908,7 @@ void SEQUENCER_OT_images_separate(wmOperatorType *ot) static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *active_seq = SEQ_select_active_get(scene); if (active_seq && active_seq->type == SEQ_TYPE_META && active_seq->flag & SELECT) { @@ -1959,7 +1959,7 @@ void SEQUENCER_OT_meta_toggle(wmOperatorType *ot) static int sequencer_meta_make_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *active_seq = SEQ_select_active_get(scene); ListBase *active_seqbase = SEQ_active_seqbase_get(ed); @@ -2027,7 +2027,7 @@ void SEQUENCER_OT_meta_make(wmOperatorType *ot) static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *active_seq = SEQ_select_active_get(scene); if (active_seq == NULL || active_seq->type != SEQ_TYPE_META) { @@ -2181,7 +2181,7 @@ static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, i { /* sel: 0==unselected, 1==selected, -1==don't care. */ Sequence *seq, *best_seq = NULL; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); int dist, best_dist; best_dist = MAXFRAME * 2; @@ -2231,7 +2231,7 @@ static bool seq_is_parent(Sequence *par, Sequence *seq) static int sequencer_swap_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *active_seq = SEQ_select_active_get(scene); Sequence *seq, *iseq; int side = RNA_enum_get(op->ptr, "side"); @@ -2399,7 +2399,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); SEQ_clipboard_free(); @@ -2456,7 +2456,7 @@ void SEQUENCER_OT_copy(wmOperatorType *ot) void ED_sequencer_deselect_all(Scene *scene) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return; @@ -2471,7 +2471,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, true); /* Create if needed. */ + Editing *ed = SEQ_editing_ensure(scene); /* Create if needed. */ ListBase nseqbase = {NULL, NULL}; int ofs; Sequence *iseq, *iseq_first; @@ -2640,7 +2640,7 @@ static const EnumPropertyItem prop_change_effect_input_types[] = { static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = SEQ_select_active_get(scene); Sequence **seq_1, **seq_2; @@ -2724,7 +2724,7 @@ EnumPropertyItem sequencer_prop_effect_types[] = { static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = SEQ_select_active_get(scene); const int new_type = RNA_enum_get(op->ptr, "type"); @@ -2790,7 +2790,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = SEQ_select_active_get(scene); const bool is_relative_path = RNA_boolean_get(op->ptr, "relative_path"); const bool use_placeholders = RNA_boolean_get(op->ptr, "use_placeholders"); @@ -3000,7 +3000,7 @@ static int sequencer_export_subtitles_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); Sequence *seq, *seq_next; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); ListBase text_seq = {0}; int iter = 0; FILE *file; @@ -3077,8 +3077,8 @@ static bool sequencer_strip_is_text_poll(bContext *C) { Editing *ed; Sequence *seq; - return (((ed = SEQ_editing_get(CTX_data_scene(C), false)) != NULL) && - ((seq = ed->act_seq) != NULL) && (seq->type == SEQ_TYPE_TEXT)); + return (((ed = SEQ_editing_get(CTX_data_scene(C))) != NULL) && ((seq = ed->act_seq) != NULL) && + (seq->type == SEQ_TYPE_TEXT)); } void SEQUENCER_OT_export_subtitles(struct wmOperatorType *ot) @@ -3114,7 +3114,7 @@ void SEQUENCER_OT_export_subtitles(struct wmOperatorType *ot) static int sequencer_set_range_to_strips_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; int sfra = MAXFRAME; @@ -3199,7 +3199,7 @@ static const EnumPropertyItem transform_reset_properties[] = { static int sequencer_strip_transform_clear_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - const Editing *ed = SEQ_editing_get(scene, false); + const Editing *ed = SEQ_editing_get(scene); Sequence *seq; const int property = RNA_enum_get(op->ptr, "property"); @@ -3272,7 +3272,7 @@ static const EnumPropertyItem scale_fit_methods[] = { static int sequencer_strip_transform_fit_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - const Editing *ed = SEQ_editing_get(scene, false); + const Editing *ed = SEQ_editing_get(scene); Sequence *seq; const eSeqImageFitMethod fit_method = RNA_enum_get(op->ptr, "fit_method"); diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c index 9b3ecacceb9..dd8595622f8 100644 --- a/source/blender/editors/space_sequencer/sequencer_modifier.c +++ b/source/blender/editors/space_sequencer/sequencer_modifier.c @@ -48,7 +48,7 @@ static bool strip_modifier_active_poll(bContext *C) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { Sequence *seq = SEQ_select_active_get(scene); diff --git a/source/blender/editors/space_sequencer/sequencer_proxy.c b/source/blender/editors/space_sequencer/sequencer_proxy.c index 16d14b5fa72..0a8eb7cb88f 100644 --- a/source/blender/editors/space_sequencer/sequencer_proxy.c +++ b/source/blender/editors/space_sequencer/sequencer_proxy.c @@ -56,7 +56,7 @@ static void seq_proxy_build_job(const bContext *C, ReportList *reports) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); ScrArea *area = CTX_wm_area(C); if (ed == NULL) { @@ -121,7 +121,7 @@ static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) Main *bmain = CTX_data_main(C); struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); GSet *file_list; if (ed == NULL) { @@ -184,7 +184,7 @@ static int sequencer_enable_proxies_invoke(bContext *C, static int sequencer_enable_proxies_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); bool proxy_25 = RNA_boolean_get(op->ptr, "proxy_25"); bool proxy_50 = RNA_boolean_get(op->ptr, "proxy_50"); bool proxy_75 = RNA_boolean_get(op->ptr, "proxy_75"); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 333edd0ed5f..4c938a412d2 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -202,7 +202,7 @@ void select_surround_from_last(Scene *scene) void ED_sequencer_select_sequence_single(Scene *scene, Sequence *seq, bool deselect_all) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (deselect_all) { ED_sequencer_deselect_all(scene); @@ -236,7 +236,7 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se { /* sel: 0==unselected, 1==selected, -1==don't care. */ Sequence *seq; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return NULL; @@ -270,7 +270,7 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[2]) { Sequence *seq; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); float x, y; float pixelx; float handsize; @@ -396,7 +396,7 @@ static int sequencer_de_select_all_exec(bContext *C, wmOperator *op) int action = RNA_enum_get(op->ptr, "action"); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; if (action == SEL_TOGGLE) { @@ -463,7 +463,7 @@ void SEQUENCER_OT_select_all(struct wmOperatorType *ot) static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; for (seq = ed->seqbasep->first; seq; seq = seq->next) { @@ -508,7 +508,7 @@ static int sequencer_select_exec(bContext *C, wmOperator *op) { View2D *v2d = UI_view2d_fromcontext(C); Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); const bool extend = RNA_boolean_get(op->ptr, "extend"); const bool deselect_all = RNA_boolean_get(op->ptr, "deselect_all"); const bool linked_handle = RNA_boolean_get(op->ptr, "linked_handle"); @@ -799,7 +799,7 @@ void SEQUENCER_OT_select(wmOperatorType *ot) /* Run recursively to select linked. */ static bool select_linked_internal(Scene *scene) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return false; @@ -832,7 +832,7 @@ static bool select_linked_internal(Scene *scene) /* Select only one linked strip on each side. */ static bool select_more_less_seq__internal(Scene *scene, bool select_more) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return false; @@ -1070,7 +1070,7 @@ static const EnumPropertyItem prop_select_handles_side_types[] = { static int sequencer_select_handles_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; int sel_side = RNA_enum_get(op->ptr, "side"); @@ -1169,7 +1169,7 @@ void SEQUENCER_OT_select_handles(wmOperatorType *ot) static int sequencer_select_side_of_frame_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); const bool extend = RNA_boolean_get(op->ptr, "extend"); const int side = RNA_enum_get(op->ptr, "side"); @@ -1244,7 +1244,7 @@ void SEQUENCER_OT_select_side_of_frame(wmOperatorType *ot) static int sequencer_select_side_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); const int sel_side = RNA_enum_get(op->ptr, "side"); const int frame_init = sel_side == SEQ_SIDE_LEFT ? INT_MIN : INT_MAX; @@ -1315,7 +1315,7 @@ static int sequencer_box_select_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); View2D *v2d = UI_view2d_fromcontext(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return OPERATOR_CANCELLED; @@ -1679,7 +1679,7 @@ static bool select_grouped_effect_link(Editing *ed, static int sequencer_select_grouped_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *actseq = SEQ_select_active_get(scene); if (actseq == NULL) { diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c index a0a9cdd96b1..981f793c896 100644 --- a/source/blender/editors/space_sequencer/sequencer_view.c +++ b/source/blender/editors/space_sequencer/sequencer_view.c @@ -90,7 +90,7 @@ static int sequencer_view_all_exec(bContext *C, wmOperator *op) const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); Scene *scene = CTX_data_scene(C); - const Editing *ed = SEQ_editing_get(scene, false); + const Editing *ed = SEQ_editing_get(scene); SEQ_timeline_boundbox(scene, SEQ_active_seqbase_get(ed), &box); UI_view2d_smooth_view(C, region, &box, smooth_viewtx); @@ -274,7 +274,7 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); View2D *v2d = UI_view2d_fromcontext(C); ARegion *region = CTX_wm_region(C); - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; rctf cur_new = v2d->cur; diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index 9548498f0b8..a2698b342d0 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -265,7 +265,7 @@ static void free_transform_custom_data(TransCustomData *custom_data) /* Canceled, need to update the strips display. */ static void seq_transform_cancel(TransInfo *t, SeqCollection *transformed_strips) { - ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene, false)); + ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene)); Sequence *seq; SEQ_ITERATOR_FOREACH (seq, transformed_strips) { @@ -346,7 +346,7 @@ static bool seq_transform_check_strip_effects(SeqCollection *transformed_strips) static ListBase *seqbase_active_get(const TransInfo *t) { - Editing *ed = SEQ_editing_get(t->scene, false); + Editing *ed = SEQ_editing_get(t->scene); return SEQ_active_seqbase_get(ed); } @@ -589,7 +589,7 @@ static SeqCollection *seq_transform_collection_from_transdata(TransDataContainer static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *custom_data) { - Editing *ed = SEQ_editing_get(t->scene, false); + Editing *ed = SEQ_editing_get(t->scene); if (ed == NULL) { free_transform_custom_data(custom_data); return; @@ -622,7 +622,7 @@ void createTransSeqData(TransInfo *t) #define XXX_DURIAN_ANIM_TX_HACK Scene *scene = t->scene; - Editing *ed = SEQ_editing_get(t->scene, false); + Editing *ed = SEQ_editing_get(t->scene); TransData *td = NULL; TransData2D *td2d = NULL; TransDataSeq *tdsq = NULL; diff --git a/source/blender/editors/transform/transform_snap_sequencer.c b/source/blender/editors/transform/transform_snap_sequencer.c index 6e926f36fba..a54149912a9 100644 --- a/source/blender/editors/transform/transform_snap_sequencer.c +++ b/source/blender/editors/transform/transform_snap_sequencer.c @@ -137,7 +137,7 @@ static SeqCollection *seq_collection_extract_effects(SeqCollection *collection) static SeqCollection *query_snap_targets(const TransInfo *t, SeqCollection *snap_sources) { - ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene, false)); + ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene)); const short snap_flag = SEQ_tool_settings_snap_flag_get(t->scene); SeqCollection *snap_targets = SEQ_collection_create(__func__); LISTBASE_FOREACH (Sequence *, seq, seqbase) { @@ -255,7 +255,7 @@ static int seq_snap_threshold_get_frame_distance(const TransInfo *t) TransSeqSnapData *transform_snap_sequencer_data_alloc(const TransInfo *t) { TransSeqSnapData *snap_data = MEM_callocN(sizeof(TransSeqSnapData), __func__); - ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene, false)); + ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene)); SeqCollection *snap_sources = SEQ_query_selected_strips(seqbase); SeqCollection *snap_targets = query_snap_targets(t, snap_sources); diff --git a/source/blender/editors/util/ed_util_imbuf.c b/source/blender/editors/util/ed_util_imbuf.c index 9e05efca3df..fcbc0807893 100644 --- a/source/blender/editors/util/ed_util_imbuf.c +++ b/source/blender/editors/util/ed_util_imbuf.c @@ -565,7 +565,7 @@ bool ED_imbuf_sample_poll(bContext *C) return false; } - return sseq && SEQ_editing_get(CTX_data_scene(C), false) != NULL; + return sseq && SEQ_editing_get(CTX_data_scene(C)) != NULL; } return false; diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 077cfb0efb3..d9837f21833 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -106,7 +106,7 @@ typedef struct SequenceSearchData { static void rna_SequenceElement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { StripElem *se = (StripElem *)ptr->data; @@ -125,7 +125,7 @@ static void rna_Sequence_invalidate_raw_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { Sequence *seq = (Sequence *)ptr->data; @@ -139,7 +139,7 @@ static void rna_Sequence_invalidate_preprocessed_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { Sequence *seq = (Sequence *)ptr->data; @@ -153,7 +153,7 @@ static void UNUSED_FUNCTION(rna_Sequence_invalidate_composite_update)(Main *UNUS PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { Sequence *seq = (Sequence *)ptr->data; @@ -175,7 +175,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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed) { Sequence *seq = (Sequence *)ptr->data; if (seq->scene != NULL) { @@ -192,7 +192,7 @@ static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *i PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); SeqCollection *all_strips = SEQ_query_all_strips_recursive(&ed->seqbase); BLI_Iterator *bli_iter = MEM_callocN(sizeof(BLI_Iterator), __func__); @@ -286,7 +286,7 @@ 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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); Sequence *tseq; SEQ_time_update_sequence_bounds(scene, seq); @@ -474,7 +474,7 @@ static void rna_Sequence_channel_set(PointerRNA *ptr, int value) { Sequence *seq = (Sequence *)ptr->data; Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); /* check channel increment or decrement */ @@ -522,7 +522,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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_transform(ed, ptr->data); if (seq && seq->name + 2) { @@ -541,7 +541,7 @@ static void rna_SequenceTransform_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_transform(ed, ptr->data); SEQ_relations_invalidate_cache_preprocessed(scene, seq); @@ -574,7 +574,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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_crop(ed, ptr->data); if (seq && seq->name + 2) { @@ -591,7 +591,7 @@ 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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_crop(ed, ptr->data); SEQ_relations_invalidate_cache_preprocessed(scene, seq); @@ -910,7 +910,7 @@ 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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); SEQ_relations_free_imbuf(scene, &ed->seqbase, false); rna_Sequence_invalidate_raw_update(bmain, scene, ptr); @@ -960,7 +960,7 @@ static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy) static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_proxy(ed, ptr->data); SEQ_add_reload_new_file(bmain, scene, seq, false); @@ -970,7 +970,7 @@ static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), Point static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_proxy(ed, ptr->data); SEQ_relations_invalidate_cache_preprocessed(scene, seq); } @@ -1029,7 +1029,7 @@ static char *rna_SequenceColorBalance_path(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; SequenceModifierData *smd; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd); if (seq && seq->name + 2) { @@ -1061,7 +1061,7 @@ static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); SequenceModifierData *smd; Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd); @@ -1071,7 +1071,7 @@ static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, bool value) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return; @@ -1091,7 +1091,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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return scene->r.cfra; @@ -1108,7 +1108,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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return; @@ -1172,7 +1172,7 @@ static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr) static char *rna_SequenceModifier_path(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); SequenceModifierData *smd = ptr->data; Sequence *seq = sequence_get_by_modifier(ed, smd); @@ -1194,7 +1194,7 @@ static void rna_SequenceModifier_name_set(PointerRNA *ptr, const char *value) { SequenceModifierData *smd = ptr->data; Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_modifier(ed, smd); AnimData *adt; char oldname[sizeof(smd->name)]; @@ -1226,7 +1226,7 @@ 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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_modifier(ed, ptr->data); SEQ_relations_invalidate_cache_preprocessed(scene, seq); @@ -1235,7 +1235,7 @@ static void rna_SequenceModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene static bool rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value) { Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_modifier(ed, ptr->data); Sequence *cur = (Sequence *)value.data; @@ -1304,7 +1304,7 @@ static void rna_SequenceModifier_strip_set(PointerRNA *ptr, { SequenceModifierData *smd = ptr->data; Scene *scene = (Scene *)ptr->owner_id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq = sequence_get_by_modifier(ed, smd); Sequence *target = (Sequence *)value.data; diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 7ddbf450e6a..a0564d3435b 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -105,7 +105,7 @@ static Sequence *rna_Sequence_split( ID *id, Sequence *seq, Main *bmain, ReportList *reports, int frame, int split_method) { Scene *scene = (Scene *)id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); const char *error_msg = NULL; @@ -127,7 +127,7 @@ static Sequence *rna_Sequence_split( static Sequence *rna_Sequence_parent_meta(ID *id, Sequence *seq_self) { Scene *scene = (Scene *)id; - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); return SEQ_find_metastrip_by_sequence(&ed->seqbase, NULL, seq_self); } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 09fa2c84005..d391b09189a 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2274,7 +2274,7 @@ static void seq_build_proxy(bContext *C, PointerRNA *ptr) SpaceSeq *sseq = ptr->data; Scene *scene = CTX_data_scene(C); - ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(scene, false)); + ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(scene)); GSet *file_list = BLI_gset_new(BLI_ghashutil_strhash_p, BLI_ghashutil_strcmp, "file list"); wmJob *wm_job = ED_seq_proxy_wm_job_get(C); diff --git a/source/blender/sequencer/SEQ_sequencer.h b/source/blender/sequencer/SEQ_sequencer.h index 15fe0be3571..d7800d208a4 100644 --- a/source/blender/sequencer/SEQ_sequencer.h +++ b/source/blender/sequencer/SEQ_sequencer.h @@ -65,7 +65,7 @@ short SEQ_tool_settings_snap_mode_get(struct Scene *scene); int SEQ_tool_settings_snap_distance_get(struct Scene *scene); eSeqOverlapMode SEQ_tool_settings_overlap_mode_get(struct Scene *scene); struct SequencerToolSettings *SEQ_tool_settings_copy(struct SequencerToolSettings *tool_settings); -struct Editing *SEQ_editing_get(struct Scene *scene, bool alloc); +struct Editing *SEQ_editing_get(const struct Scene *scene); struct Editing *SEQ_editing_ensure(struct Scene *scene); void SEQ_editing_free(struct Scene *scene, const bool do_id_user); struct ListBase *SEQ_active_seqbase_get(const struct Editing *ed); diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c index dd2d828415c..3e0b4738db1 100644 --- a/source/blender/sequencer/intern/prefetch.c +++ b/source/blender/sequencer/intern/prefetch.c @@ -491,7 +491,7 @@ static void *seq_prefetch_frames(void *job) */ pfjob->scene_eval->ed->prefetch_job = pfjob; - ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(pfjob->scene, false)); + ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(pfjob->scene)); if (seq_prefetch_must_skip_frame(pfjob, seqbase)) { pfjob->num_frames_prefetched++; continue; diff --git a/source/blender/sequencer/intern/proxy_job.c b/source/blender/sequencer/intern/proxy_job.c index aea66da4cc4..afdac04d998 100644 --- a/source/blender/sequencer/intern/proxy_job.c +++ b/source/blender/sequencer/intern/proxy_job.c @@ -79,7 +79,7 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog static void proxy_endjob(void *pjv) { ProxyJob *pj = pjv; - Editing *ed = SEQ_editing_get(pj->scene, false); + Editing *ed = SEQ_editing_get(pj->scene); LinkData *link; for (link = pj->queue.first; link; link = link->next) { diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 0c07a25e2e2..6c4502a3608 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -1921,7 +1921,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 = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); ListBase *seqbasep; if (ed == NULL) { diff --git a/source/blender/sequencer/intern/sequencer.c b/source/blender/sequencer/intern/sequencer.c index a62b76cd832..bf5942090c9 100644 --- a/source/blender/sequencer/intern/sequencer.c +++ b/source/blender/sequencer/intern/sequencer.c @@ -240,11 +240,8 @@ void seq_free_sequence_recurse(Scene *scene, seq_sequence_free_ex(scene, seq, false, do_id_user, do_clean_animdata); } -Editing *SEQ_editing_get(Scene *scene, bool alloc) +Editing *SEQ_editing_get(const Scene *scene) { - if (alloc) { - SEQ_editing_ensure(scene); - } return scene->ed; } diff --git a/source/blender/sequencer/intern/strip_edit.c b/source/blender/sequencer/intern/strip_edit.c index 820a73cb8d7..cfac243e68f 100644 --- a/source/blender/sequencer/intern/strip_edit.c +++ b/source/blender/sequencer/intern/strip_edit.c @@ -227,7 +227,7 @@ bool SEQ_edit_move_strip_to_meta(Scene *scene, const char **error_str) { /* Find the appropriate seqbase */ - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, src_seq); if (dst_seqm->type != SEQ_TYPE_META) { diff --git a/source/blender/sequencer/intern/strip_relations.c b/source/blender/sequencer/intern/strip_relations.c index b840b19f244..46fdd2c3d14 100644 --- a/source/blender/sequencer/intern/strip_relations.c +++ b/source/blender/sequencer/intern/strip_relations.c @@ -134,7 +134,7 @@ static bool seq_relations_find_and_invalidate_metas(Scene *scene, ListBase *seqbase; if (meta_seq == NULL) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); seqbase = &ed->seqbase; } else { @@ -342,7 +342,7 @@ void SEQ_relations_update_changed_seq_and_deps(Scene *scene, int len_change, int ibuf_change) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; if (ed == NULL) { @@ -370,7 +370,7 @@ static void sequencer_all_free_anim_ibufs(ListBase *seqbase, int timeline_frame) /* Unused */ void SEQ_relations_free_all_anim_ibufs(Scene *scene, int timeline_frame) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return; } @@ -401,7 +401,7 @@ static Sequence *sequencer_check_scene_recursion(Scene *scene, ListBase *seqbase bool SEQ_relations_check_scene_recursion(Scene *scene, ReportList *reports) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return false; } diff --git a/source/blender/sequencer/intern/strip_select.c b/source/blender/sequencer/intern/strip_select.c index 7cdd756e2d9..8927e092864 100644 --- a/source/blender/sequencer/intern/strip_select.c +++ b/source/blender/sequencer/intern/strip_select.c @@ -34,7 +34,7 @@ Sequence *SEQ_select_active_get(Scene *scene) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return NULL; @@ -45,7 +45,7 @@ Sequence *SEQ_select_active_get(Scene *scene) void SEQ_select_active_set(Scene *scene, Sequence *seq) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return; @@ -56,7 +56,7 @@ void SEQ_select_active_set(Scene *scene, Sequence *seq) int SEQ_select_active_get_pair(Scene *scene, Sequence **r_seq_act, Sequence **r_seq_other) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); *r_seq_act = SEQ_select_active_get(scene); diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c index b73ac631693..fd6c0805c23 100644 --- a/source/blender/sequencer/intern/strip_time.c +++ b/source/blender/sequencer/intern/strip_time.c @@ -249,7 +249,7 @@ void SEQ_time_update_sequence(Scene *scene, Sequence *seq) seq_time_update_meta_strip(scene, seq); } - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); MetaStack *ms = SEQ_meta_stack_active_get(ed); if (ms != NULL) { SEQ_time_update_meta_strip_range(scene, ms->parseq); @@ -266,7 +266,7 @@ int SEQ_time_find_next_prev_edit(Scene *scene, const bool do_center, const bool do_unselected) { - Editing *ed = SEQ_editing_get(scene, false); + Editing *ed = SEQ_editing_get(scene); Sequence *seq; int dist, best_dist, best_frame = timeline_frame; diff --git a/source/blender/sequencer/intern/utils.c b/source/blender/sequencer/intern/utils.c index e4eecaf552c..1d3e7e4a223 100644 --- a/source/blender/sequencer/intern/utils.c +++ b/source/blender/sequencer/intern/utils.c @@ -257,7 +257,7 @@ ListBase *SEQ_get_seqbase_from_sequence(Sequence *seq, int *r_offset) } case SEQ_TYPE_SCENE: { if (seq->flag & SEQ_SCENE_STRIPS && seq->scene) { - Editing *ed = SEQ_editing_get(seq->scene, false); + Editing *ed = SEQ_editing_get(seq->scene); if (ed) { seqbase = &ed->seqbase; *r_offset = seq->scene->r.sfra; |