Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 2,156 Lines • ▼ Show 20 Lines | static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Editing *ed = BKE_sequencer_editing_get(scene, false); | Editing *ed = BKE_sequencer_editing_get(scene, false); | ||||
| ListBase nseqbase = {NULL, NULL}; | ListBase nseqbase = {NULL, NULL}; | ||||
| if (ed == NULL) | if (ed == NULL) | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_CONTEXT); | BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_CONTEXT, 0); | ||||
| if (nseqbase.first) { | if (nseqbase.first) { | ||||
| Sequence *seq = nseqbase.first; | Sequence *seq = nseqbase.first; | ||||
| /* rely on the nseqbase list being added at the end */ | /* rely on the nseqbase list being added at the end */ | ||||
| BLI_movelisttolist(ed->seqbasep, &nseqbase); | BLI_movelisttolist(ed->seqbasep, &nseqbase); | ||||
| for (; seq; seq = seq->next) | for (; seq; seq = seq->next) | ||||
| BKE_sequencer_recursive_apply(seq, apply_unique_name_cb, scene); | BKE_sequencer_recursive_apply(seq, apply_unique_name_cb, scene); | ||||
| ▲ Show 20 Lines • Show All 1,021 Lines • ▼ Show 20 Lines | static int sequencer_copy_exec(bContext *C, wmOperator *op) | ||||
| BKE_sequencer_free_clipboard(); | BKE_sequencer_free_clipboard(); | ||||
| if (BKE_sequence_base_isolated_sel_check(ed->seqbasep) == false) { | if (BKE_sequence_base_isolated_sel_check(ed->seqbasep) == false) { | ||||
| BKE_report(op->reports, RPT_ERROR, "Please select all related strips"); | BKE_report(op->reports, RPT_ERROR, "Please select all related strips"); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_UNIQUE_NAME); | BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_UNIQUE_NAME, 0); | ||||
| /* To make sure the copied strips have unique names between each other add | /* To make sure the copied strips have unique names between each other add | ||||
| * them temporarily to the end of the original seqbase. (bug 25932) | * them temporarily to the end of the original seqbase. (bug 25932) | ||||
| */ | */ | ||||
| if (nseqbase.first) { | if (nseqbase.first) { | ||||
| Sequence *seq, *first_seq = nseqbase.first; | Sequence *seq, *first_seq = nseqbase.first; | ||||
| BLI_movelisttolist(ed->seqbasep, &nseqbase); | BLI_movelisttolist(ed->seqbasep, &nseqbase); | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| Editing *ed = BKE_sequencer_editing_get(scene, true); /* create if needed */ | Editing *ed = BKE_sequencer_editing_get(scene, true); /* create if needed */ | ||||
| ListBase nseqbase = {NULL, NULL}; | ListBase nseqbase = {NULL, NULL}; | ||||
| int ofs; | int ofs; | ||||
| Sequence *iseq, *iseq_first; | Sequence *iseq, *iseq_first; | ||||
| ED_sequencer_deselect_all(scene); | ED_sequencer_deselect_all(scene); | ||||
| ofs = scene->r.cfra - seqbase_clipboard_frame; | ofs = scene->r.cfra - seqbase_clipboard_frame; | ||||
| BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, &seqbase_clipboard, SEQ_DUPE_UNIQUE_NAME); | BKE_sequence_base_dupli_recursive(scene, NULL, &nseqbase, &seqbase_clipboard, SEQ_DUPE_UNIQUE_NAME, 0); | ||||
| /* transform pasted strips before adding */ | /* transform pasted strips before adding */ | ||||
| if (ofs) { | if (ofs) { | ||||
| for (iseq = nseqbase.first; iseq; iseq = iseq->next) { | for (iseq = nseqbase.first; iseq; iseq = iseq->next) { | ||||
| BKE_sequence_translate(scene, iseq, ofs); | BKE_sequence_translate(scene, iseq, ofs); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 689 Lines • Show Last 20 Lines | |||||