Files
test2/source
Christoph Lendenfeld bd305c8d18 Fix #110108: NLA absolute snapping
Before this patch the following snapping options were broken

* snap to markers
* snap to seconds with "Absolute Time Snap" turned on
* technically also snap to Frames with "Absolute Time Snap"
turned on (but made no real difference)

The issue was that each end of the strip would snap individually.
Potentially collapsing the strip.
This would happen e.g. when snapping to markers but with only 1 marker present.

This PR fixes the issue by finding out the closest snap offset and
shifting the strip as a whole by that amount.
That means either the start or the end of the strip will snap to the target.
By doing it that way the length of the strip is never changed by snapping.

This means when snapping to Seconds with "Absolute Time Snap" turned on,
the start of the strip might not be on a full second when the end is.

Pull Request: https://projects.blender.org/blender/blender/pulls/111984
2023-09-15 09:52:40 +02:00
..