Frame accurate snap#1875
Closed
Proggerdogger wants to merge 1 commit into
Closed
Conversation
On my quest to fix shotcut bugs I noticed that often snapping would not snap to the edge of a clip but slightly inside of it. I fixed this by rounding snap targets to whole frames (as every clip is a certain number of whole frames you never want to snap onto a decimal place). ## Reproduce 1. New project, magnet/snap on. 2. Put two clips on the same track with a 1-frame gap (or a project where a tiny blank sits between them). 3. Zoom the timeline all the way out (very small scale / minimum zoom). 4. Drag the right clip left until it snaps to the left clip. 5. Zoom all the way in at the join. Before: the join is 1 frame short or overlapped, or a transition appears on drop. After: the clips abut on the same frame (no gap, no 1-frame overlap). Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Superseded by #1876 (false magnets PR already includes frame-accurate snap). Closing this duplicate Track.js change to avoid merge conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On my quest to fix shotcut bugs I noticed that often snapping would not snap to the edge of a clip but slightly inside of it. I fixed this by rounding snap targets to whole frames (as every clip is a certain number of whole frames you never want to snap onto a decimal place).
Reproduce
Before: the join is 1 frame short or overlapped, or a transition appears on drop.
After: the clips abut on the same frame (no gap, no 1-frame overlap).
Made with Cursor