Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2021-10-25 05:24:41 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-10-25 05:24:41 +0300
commit28ad680ff06677778e85204e00bafb789402491b (patch)
tree106899bb1fafc2cf38cc839064ac0bc1889b4c4e /source/blender/editors/transform/transform_snap_sequencer.c
parent3e75f70acd7d7bb57efd6d07ea05f615d4b12c94 (diff)
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.
Diffstat (limited to 'source/blender/editors/transform/transform_snap_sequencer.c')
-rw-r--r--source/blender/editors/transform/transform_snap_sequencer.c4
1 files changed, 4 insertions, 0 deletions
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;