[Bf-blender-cvs] [28ad680ff06] master: Fix T90836: Strip snaps to empty space

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


Commit: 28ad680ff06677778e85204e00bafb789402491b
Author: Richard Antalik
Date:   Mon Oct 25 04:24:41 2021 +0200
Branches: master
https://developer.blender.org/rB28ad680ff06677778e85204e00bafb789402491b

Fix T90836: Strip snaps to empty space

This was caused by snap to hold offset feature, which calculates strip
content boundary, but it can be outside of strip boundary.

Clamp content start and end values so they are always inside of strip.

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

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 2acdf5cfd9c..d752e26088e 100644
--- a/source/blender/editors/transform/transform_snap_sequencer.c
+++ b/source/blender/editors/transform/transform_snap_sequencer.c
@@ -227,6 +227,10 @@ static void seq_snap_target_points_build(const TransInfo *t,
           content_end = seq->enddisp;
         }
       }
+
+      CLAMP(content_start, seq->startdisp, seq->enddisp);
+      CLAMP(content_end, seq->startdisp, seq->enddisp);
+
       snap_data->target_snap_points[i] = content_start;
       snap_data->target_snap_points[i + 1] = content_end;
       i += 2;



More information about the Bf-blender-cvs mailing list