diff options
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_add.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_add.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 962c4e4c59d..37dfcdbc765 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -43,7 +43,6 @@ #include "BKE_mask.h" #include "BKE_movieclip.h" #include "BKE_report.h" -#include "BKE_sequencer.h" #include "WM_api.h" #include "WM_types.h" @@ -51,6 +50,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "SEQ_sequencer.h" + /* For menu, popup, icons, etc. */ #include "ED_screen.h" #include "ED_sequencer.h" @@ -147,7 +148,7 @@ static int sequencer_generic_invoke_xy_guess_channel(bContext *C, int type) Sequence *seq; Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, true); - int cfra = (int)CFRA; + int timeline_frame = (int)CFRA; int proximity = INT_MAX; if (!ed || !ed->seqbasep) { @@ -155,10 +156,10 @@ static int sequencer_generic_invoke_xy_guess_channel(bContext *C, int type) } for (seq = ed->seqbasep->first; seq; seq = seq->next) { - if ((type == -1 || seq->type == type) && (seq->enddisp < cfra) && - (cfra - seq->enddisp < proximity)) { + if ((type == -1 || seq->type == type) && (seq->enddisp < timeline_frame) && + (timeline_frame - seq->enddisp < proximity)) { tgt = seq; - proximity = cfra - seq->enddisp; + proximity = timeline_frame - seq->enddisp; } } @@ -172,17 +173,17 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, i { Scene *scene = CTX_data_scene(C); - int cfra = (int)CFRA; + int timeline_frame = (int)CFRA; /* Effect strips don't need a channel initialized from the mouse. */ if (!(flag & SEQPROP_NOCHAN) && RNA_struct_property_is_set(op->ptr, "channel") == 0) { RNA_int_set(op->ptr, "channel", sequencer_generic_invoke_xy_guess_channel(C, type)); } - RNA_int_set(op->ptr, "frame_start", cfra); + RNA_int_set(op->ptr, "frame_start", timeline_frame); if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end") == 0) { - RNA_int_set(op->ptr, "frame_end", cfra + 25); // XXX arbitrary but ok for now. + RNA_int_set(op->ptr, "frame_end", timeline_frame + 25); /* XXX arbitrary but ok for now. */ } if (!(flag & SEQPROP_NOPATHS)) { @@ -314,7 +315,7 @@ static bool seq_effect_add_properties_poll(const bContext *UNUSED(C), /* Hide start/end frames for effect strips that are locked to their parents' location. */ if (BKE_sequence_effect_get_num_inputs(type) != 0) { - if ((STREQ(prop_id, "frame_start")) || (STREQ(prop_id, "frame_end"))) { + if (STR_ELEM(prop_id, "frame_start", "frame_end")) { return false; } } @@ -638,8 +639,7 @@ static bool sequencer_add_draw_check_fn(PointerRNA *UNUSED(ptr), { const char *prop_id = RNA_property_identifier(prop); - return !(STREQ(prop_id, "filepath") || STREQ(prop_id, "directory") || - STREQ(prop_id, "filename")); + return !(STR_ELEM(prop_id, "filepath", "directory", "filename")); } static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) @@ -724,7 +724,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES | WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY, FILE_DEFAULTDISPLAY, - FILE_SORT_ALPHA); + FILE_SORT_DEFAULT); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); RNA_def_boolean(ot->srna, "sound", true, "Sound", "Load sound with the movie"); RNA_def_boolean(ot->srna, @@ -779,7 +779,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES | WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY, FILE_DEFAULTDISPLAY, - FILE_SORT_ALPHA); + FILE_SORT_DEFAULT); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory"); RNA_def_boolean(ot->srna, "mono", false, "Mono", "Merge all the sound's channels into one"); @@ -902,7 +902,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) } } - BKE_sequence_init_colorspace(seq); + SEQ_render_init_colorspace(seq); BKE_sequence_calc_disp(scene, seq); BKE_sequencer_sort(scene); @@ -971,7 +971,7 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot) WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILES | WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY, FILE_DEFAULTDISPLAY, - FILE_SORT_ALPHA); + FILE_SORT_DEFAULT); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME | SEQPROP_ENDFRAME); RNA_def_boolean(ot->srna, |