Changeset View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 1,399 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->flag &= ~SEQ_OVERLAP; | seq->flag &= ~SEQ_OVERLAP; | ||||
| if (BKE_sequence_test_overlap(ed->seqbasep, seq)) { | if (BKE_sequence_test_overlap(ed->seqbasep, seq)) { | ||||
| BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); | BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); | ||||
| } | } | ||||
| } | } | ||||
| else if (seq->type & SEQ_TYPE_EFFECT) { | else if (seq->type & SEQ_TYPE_EFFECT) { | ||||
| if (seq->seq1 && (seq->seq1->flag & SELECT)) { | if (seq->seq1 && (seq->seq1->flag & SELECT)) { | ||||
| BKE_sequencer_offset_animdata(scene, seq, (snap_frame - seq->startofs + seq->startstill) - seq->start); | |||||
| BKE_sequence_calc(scene, seq); | BKE_sequence_calc(scene, seq); | ||||
| } | } | ||||
| else if (seq->seq2 && (seq->seq2->flag & SELECT)) { | else if (seq->seq2 && (seq->seq2->flag & SELECT)) { | ||||
| BKE_sequencer_offset_animdata(scene, seq, (snap_frame - seq->startofs + seq->startstill) - seq->start); | |||||
| BKE_sequence_calc(scene, seq); | BKE_sequence_calc(scene, seq); | ||||
| } | } | ||||
| else if (seq->seq3 && (seq->seq3->flag & SELECT)) { | else if (seq->seq3 && (seq->seq3->flag & SELECT)) { | ||||
| BKE_sequencer_offset_animdata(scene, seq, (snap_frame - seq->startofs + seq->startstill) - seq->start); | |||||
ISS: `seq->startofs + seq->startstill - seq->start` could be replaced with `seq->startdisp`
also `(a… | |||||
lichtwerkAuthorUnsubmitted Not Done Inline ActionsThis is taken from a few lines above: I wasnt 100% sure to use seq->startdisp since BKE_sequence_calc / BKE_sequence_calc_disp is called again after [so not totally positive this is up-to-date here in all cases -- looks like it should, but was more like "better safe than sorry"] If we change it in this patch, maybe change above as well? lichtwerk: This is taken from a few lines above:
https://developer.blender. | |||||
ISSUnsubmitted Not Done Inline ActionsBKE_sequence_calc shouldn't touch seq->seq1/2/3->anything. seq->startdisp is more readable so I would prefer that. This value must be up to date at least before operator is called. I would just double check before committing. Wouldn't mind changing even that line above. ISS: `BKE_sequence_calc` shouldn't touch `seq->seq1/2/3->anything`.
`seq->startdisp` is more… | |||||
| BKE_sequence_calc(scene, seq); | BKE_sequence_calc(scene, seq); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| BKE_sequencer_sort(scene); | BKE_sequencer_sort(scene); | ||||
| DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); | DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); | ||||
| ▲ Show 20 Lines • Show All 2,792 Lines • Show Last 20 Lines | |||||
seq->startofs + seq->startstill - seq->start could be replaced with seq->startdisp
also (a - b) + c is same as a - b + c
If you don't object to this I will commit with this change