[Bf-blender-cvs] [4266538ab98] master: Fix T90835: Strip snaps to first and second frame

Richard Antalik noreply at git.blender.org
Mon Oct 25 04:46:31 CEST 2021


Commit: 4266538ab980fc475a6fd295892b1ad48ee2b7dd
Author: Richard Antalik
Date:   Mon Oct 25 04:33:43 2021 +0200
Branches: master
https://developer.blender.org/rB4266538ab980fc475a6fd295892b1ad48ee2b7dd

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.

===================================================================

M	source/blender/editors/transform/transform_snap_sequencer.c

===================================================================

diff --git a/source/blender/editors/transform/transform_snap_sequencer.c b/source/blender/editors/transform/transform_snap_sequencer.c
index d752e26088e..7bcf6812ce9 100644
--- a/source/blender/editors/transform/transform_snap_sequencer.c
+++ b/source/blender/editors/transform/transform_snap_sequencer.c
@@ -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);



More information about the Bf-blender-cvs mailing list