Fix T90835: Strip snaps to first and second frame

This was caused by strips with single frame input like single image
strip or color strip. their length is always 1, and so content length
was calculated to end after first frame.

There was code handling this case, but it was also checking for
`anim_endofs` and `endstill` values. Anim offset values have no effect
on these strips and still frame value was used incorrectly. So these
chacks can be removed completely.
This commit is contained in:
Richard Antalik 2021-10-25 04:33:43 +02:00
parent 28ad680ff0
commit 4266538ab9
Notes: blender-bot 2023-02-14 08:45:09 +01:00
Referenced by issue #90835, VSE: With "Hold offset" snap on, invisible snap-to frame appears one frame from left edge of certain strip types
1 changed files with 2 additions and 6 deletions

View File

@ -220,12 +220,8 @@ static void seq_snap_target_points_build(const TransInfo *t,
int content_end = max_ii(seq->startdisp, seq->start + seq->len);
/* Effects and single image strips produce incorrect content length. Skip these strips. */
if ((seq->type & SEQ_TYPE_EFFECT) != 0 || seq->len == 1) {
if (seq->anim_startofs == 0 && seq->startstill == 0) {
content_start = seq->startdisp;
}
if (seq->anim_endofs == 0 && seq->endstill == 0) {
content_end = seq->enddisp;
}
content_start = seq->startdisp;
content_end = seq->enddisp;
}
CLAMP(content_start, seq->startdisp, seq->enddisp);