Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 2,745 Lines • ▼ Show 20 Lines | static int sequencer_separate_images_exec(bContext *C, wmOperator *op) | ||||
| Sequence *seq, *seq_new; | Sequence *seq, *seq_new; | ||||
| Strip *strip_new; | Strip *strip_new; | ||||
| StripElem *se, *se_new; | StripElem *se, *se_new; | ||||
| int start_ofs, cfra, frame_end; | int start_ofs, cfra, frame_end; | ||||
| int step = RNA_int_get(op->ptr, "length"); | int step = RNA_int_get(op->ptr, "length"); | ||||
| seq = ed->seqbasep->first; /* Poll checks this is valid. */ | seq = ed->seqbasep->first; /* Poll checks this is valid. */ | ||||
| BKE_sequencer_prefetch_stop(scene); | |||||
| while (seq) { | while (seq) { | ||||
| if ((seq->flag & SELECT) && (seq->type == SEQ_TYPE_IMAGE) && (seq->len > 1)) { | 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); */ | ||||
| ▲ Show 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | static int sequencer_meta_make_exec(bContext *C, wmOperator *op) | ||||
| Sequence *seq, *seqm, *next, *last_seq = BKE_sequencer_active_get(scene); | Sequence *seq, *seqm, *next, *last_seq = BKE_sequencer_active_get(scene); | ||||
| int channel_max = 1; | int channel_max = 1; | ||||
| 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_sequencer_prefetch_stop(scene); | |||||
| /* Remove all selected from main list, and put in meta. */ | /* Remove all selected from main list, and put in meta. */ | ||||
| seqm = BKE_sequence_alloc(ed->seqbasep, 1, 1, SEQ_TYPE_META); /* Channel number set later. */ | seqm = BKE_sequence_alloc(ed->seqbasep, 1, 1, SEQ_TYPE_META); /* Channel number set later. */ | ||||
| strcpy(seqm->name + 2, "MetaStrip"); | strcpy(seqm->name + 2, "MetaStrip"); | ||||
| seqm->flag = SELECT; | seqm->flag = SELECT; | ||||
| seq = ed->seqbasep->first; | seq = ed->seqbasep->first; | ||||
| while (seq) { | while (seq) { | ||||
| ▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| Editing *ed = BKE_sequencer_editing_get(scene, false); | Editing *ed = BKE_sequencer_editing_get(scene, false); | ||||
| Sequence *seq, *last_seq = BKE_sequencer_active_get(scene); /* last_seq checks (ed == NULL) */ | Sequence *seq, *last_seq = BKE_sequencer_active_get(scene); /* last_seq checks (ed == NULL) */ | ||||
| if (last_seq == NULL || last_seq->type != SEQ_TYPE_META) { | if (last_seq == NULL || last_seq->type != SEQ_TYPE_META) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| BKE_sequencer_prefetch_stop(scene); | |||||
| for (seq = last_seq->seqbase.first; seq != NULL; seq = seq->next) { | for (seq = last_seq->seqbase.first; seq != NULL; seq = seq->next) { | ||||
| BKE_sequence_invalidate_cache_composite(scene, seq); | BKE_sequence_invalidate_cache_composite(scene, seq); | ||||
| } | } | ||||
| /* This moves strips from meta to parent, sating within same edit and no new strips are | /* This moves strips from meta to parent, sating within same edit and no new strips are | ||||
| * allocated. If the UUID was unique already (as it should) it will stay unique. Nn need to | * allocated. If the UUID was unique already (as it should) it will stay unique. Nn need to | ||||
| * re-generate the UUIDs.*/ | * re-generate the UUIDs.*/ | ||||
| BLI_movelisttolist(ed->seqbasep, &last_seq->seqbase); | BLI_movelisttolist(ed->seqbasep, &last_seq->seqbase); | ||||
| ▲ Show 20 Lines • Show All 1,180 Lines • Show Last 20 Lines | |||||