Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | for (seq = ed->seqbasep->first; seq; seq = seq->next) { | ||||
| if (seq->flag & SELECT && !(seq->depth == 0 && seq->flag & SEQ_LOCK) && | if (seq->flag & SELECT && !(seq->depth == 0 && seq->flag & SEQ_LOCK) && | ||||
| SEQ_transform_sequence_can_be_translated(seq)) { | SEQ_transform_sequence_can_be_translated(seq)) { | ||||
| if ((seq->flag & (SEQ_LEFTSEL + SEQ_RIGHTSEL)) == 0) { | if ((seq->flag & (SEQ_LEFTSEL + SEQ_RIGHTSEL)) == 0) { | ||||
| SEQ_transform_translate_sequence( | SEQ_transform_translate_sequence( | ||||
| scene, seq, (snap_frame - seq->startofs + seq->startstill) - seq->start); | scene, seq, (snap_frame - seq->startofs + seq->startstill) - seq->start); | ||||
| } | } | ||||
| else { | else { | ||||
| if (seq->flag & SEQ_LEFTSEL) { | if (seq->flag & SEQ_LEFTSEL) { | ||||
| SEQ_transform_set_left_handle_frame(seq, snap_frame); | SEQ_transform_set_left_handle_frame(scene, seq, snap_frame); | ||||
| } | } | ||||
| else { /* SEQ_RIGHTSEL */ | else { /* SEQ_RIGHTSEL */ | ||||
| SEQ_transform_set_right_handle_frame(seq, snap_frame); | SEQ_transform_set_right_handle_frame(scene, seq, snap_frame); | ||||
| } | } | ||||
| SEQ_transform_handle_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL); | SEQ_transform_handle_xlimits( | ||||
| SEQ_transform_fix_single_image_seq_offsets(seq); | scene, seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL); | ||||
| SEQ_transform_fix_single_image_seq_offsets(scene, seq); | |||||
| } | } | ||||
| SEQ_time_update_sequence(scene, seq); | SEQ_time_update_sequence(scene, seq); | ||||
| } | } | ||||
| } | } | ||||
| /* Test for effects and overlap. | /* Test for effects and overlap. | ||||
| * Don't use SEQ_CURRENT_BEGIN since that would be recursive. */ | * Don't use SEQ_CURRENT_BEGIN since that would be recursive. */ | ||||
| for (seq = ed->seqbasep->first; seq; seq = seq->next) { | for (seq = ed->seqbasep->first; seq; seq = seq->next) { | ||||
| ▲ Show 20 Lines • Show All 1,466 Lines • ▼ Show 20 Lines | if ((seq->flag & SELECT) && (seq->type == SEQ_TYPE_IMAGE) && (seq->len > 1)) { | ||||
| Sequence *seq_next; | Sequence *seq_next; | ||||
| /* Remove seq so overlap tests don't conflict, | /* Remove seq so overlap tests don't conflict, | ||||
| * see seq_free_sequence below for the real freeing. */ | * see seq_free_sequence below for the real freeing. */ | ||||
| BLI_remlink(ed->seqbasep, seq); | BLI_remlink(ed->seqbasep, seq); | ||||
| /* if (seq->ipo) id_us_min(&seq->ipo->id); */ | /* if (seq->ipo) id_us_min(&seq->ipo->id); */ | ||||
| /* XXX, remove fcurve and assign to split image strips */ | /* XXX, remove fcurve and assign to split image strips */ | ||||
| start_ofs = timeline_frame = SEQ_transform_get_left_handle_frame(seq, false); | start_ofs = timeline_frame = SEQ_transform_get_left_handle_frame(scene, seq, false); | ||||
| frame_end = SEQ_transform_get_right_handle_frame(seq, false); | frame_end = SEQ_transform_get_right_handle_frame(scene, seq, false); | ||||
| while (timeline_frame < frame_end) { | while (timeline_frame < frame_end) { | ||||
| /* New seq. */ | /* New seq. */ | ||||
| se = SEQ_render_give_stripelem(seq, timeline_frame); | se = SEQ_render_give_stripelem(scene, seq, timeline_frame); | ||||
| seq_new = SEQ_sequence_dupli_recursive( | seq_new = SEQ_sequence_dupli_recursive( | ||||
| scene, scene, ed->seqbasep, seq, SEQ_DUPE_UNIQUE_NAME); | scene, scene, ed->seqbasep, seq, SEQ_DUPE_UNIQUE_NAME); | ||||
| seq_new->start = start_ofs; | seq_new->start = start_ofs; | ||||
| seq_new->type = SEQ_TYPE_IMAGE; | seq_new->type = SEQ_TYPE_IMAGE; | ||||
| seq_new->len = 1; | seq_new->len = 1; | ||||
| seq_new->endstill = step - 1; | seq_new->endstill = step - 1; | ||||
| ▲ Show 20 Lines • Show All 485 Lines • ▼ Show 20 Lines | static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| if (active_seq == NULL) { | if (active_seq == NULL) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (active_seq->strip) { | if (active_seq->strip) { | ||||
| switch (active_seq->type) { | switch (active_seq->type) { | ||||
| case SEQ_TYPE_IMAGE: | case SEQ_TYPE_IMAGE: | ||||
| se = SEQ_render_give_stripelem(active_seq, scene->r.cfra); | se = SEQ_render_give_stripelem(scene, active_seq, scene->r.cfra); | ||||
| break; | break; | ||||
| case SEQ_TYPE_MOVIE: | case SEQ_TYPE_MOVIE: | ||||
| se = active_seq->strip->stripdata; | se = active_seq->strip->stripdata; | ||||
| break; | break; | ||||
| case SEQ_TYPE_SCENE: | case SEQ_TYPE_SCENE: | ||||
| case SEQ_TYPE_META: | case SEQ_TYPE_META: | ||||
| case SEQ_TYPE_SOUND_RAM: | case SEQ_TYPE_SOUND_RAM: | ||||
| case SEQ_TYPE_SOUND_HD: | case SEQ_TYPE_SOUND_HD: | ||||
| ▲ Show 20 Lines • Show All 218 Lines • ▼ Show 20 Lines | static int sequencer_swap_data_exec(bContext *C, wmOperator *op) | ||||
| Sequence *seq_other; | Sequence *seq_other; | ||||
| const char *error_msg; | const char *error_msg; | ||||
| if (SEQ_select_active_get_pair(scene, &seq_act, &seq_other) == 0) { | if (SEQ_select_active_get_pair(scene, &seq_act, &seq_other) == 0) { | ||||
| BKE_report(op->reports, RPT_ERROR, "Please select two strips"); | BKE_report(op->reports, RPT_ERROR, "Please select two strips"); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (SEQ_edit_sequence_swap(seq_act, seq_other, &error_msg) == 0) { | if (SEQ_edit_sequence_swap(scene, seq_act, seq_other, &error_msg) == 0) { | ||||
| BKE_report(op->reports, RPT_ERROR, error_msg); | BKE_report(op->reports, RPT_ERROR, error_msg); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (seq_act->scene_sound) { | if (seq_act->scene_sound) { | ||||
| BKE_sound_remove_scene_sound(scene, seq_act->scene_sound); | BKE_sound_remove_scene_sound(scene, seq_act->scene_sound); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 655 Lines • ▼ Show 20 Lines | static int sequencer_strip_transform_fit_exec(bContext *C, wmOperator *op) | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| const Editing *ed = SEQ_editing_get(scene, false); | const Editing *ed = SEQ_editing_get(scene, false); | ||||
| Sequence *seq; | Sequence *seq; | ||||
| const eSeqImageFitMethod fit_method = RNA_enum_get(op->ptr, "fit_method"); | const eSeqImageFitMethod fit_method = RNA_enum_get(op->ptr, "fit_method"); | ||||
| for (seq = ed->seqbasep->first; seq; seq = seq->next) { | for (seq = ed->seqbasep->first; seq; seq = seq->next) { | ||||
| if (seq->flag & SELECT && seq->type != SEQ_TYPE_SOUND_RAM) { | if (seq->flag & SELECT && seq->type != SEQ_TYPE_SOUND_RAM) { | ||||
| const int timeline_frame = CFRA; | const int timeline_frame = CFRA; | ||||
| StripElem *strip_elem = SEQ_render_give_stripelem(seq, timeline_frame); | StripElem *strip_elem = SEQ_render_give_stripelem(scene, seq, timeline_frame); | ||||
| if (strip_elem == NULL) { | if (strip_elem == NULL) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| SEQ_set_scale_to_fit(seq, | SEQ_set_scale_to_fit(seq, | ||||
| strip_elem->orig_width, | strip_elem->orig_width, | ||||
| strip_elem->orig_height, | strip_elem->orig_height, | ||||
| Show All 33 Lines | |||||