VSE: Implement Snapping to Markers #120450
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120450
Loading…
Reference in New Issue
No description provided.
Delete Branch "linen/blender:vse-markers-snap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This patch adds the ability to snap strips to markers. Previously, there
only existed options to snap to hold offsets and the current frame.
This snap type works identically to other snapping options by checking
for the relevant bit (here
SEQ_SNAP_TO_MARKERS
) and adding the markerframe numbers to
snap_data->target_snap_points
withinseq_snap_target_points_build()
.To enable
seq_get_snap_target_points_count()
to have access to markerinformation, the current Scene object is now passed to the function.
This may be implemented another way if desired.
@ -153,3 +153,3 @@
}
static int seq_get_snap_target_points_count(short snap_mode,
static int seq_get_snap_target_points_count(Scene *scene,
Minor: could this be
const Scene *
?I'm in agreement with this suggestion. I modeled the function parameters off of
seq_snap_target_points_build()
and theScene *
there is notconst
even though it probably could be as well. Let's wait and see what @iss has to say on the matter.The policy is: If it can be
const
, it should be. It is older code, so at the time it either wasn't policy, or I didn't notice...Sounds good! I have made it
const
.Looks good to me (but, I know nothing about VSE editing code, so not sure if my opinion is valid :))
Thanks for patch! Code seems mostly fine, I was thinking whether it would not be better to draw thick dashed line in this case. Not sure if that would be obvious, or even necessary to be able to distinguish these snap targets. Would leave that up to you.
@ -2586,3 +2586,3 @@
SequencerToolSettings *sequencer_tool_settings = SEQ_tool_settings_ensure(scene);
sequencer_tool_settings->snap_mode = SEQ_SNAP_TO_STRIPS | SEQ_SNAP_TO_CURRENT_FRAME |
SEQ_SNAP_TO_STRIP_HOLD;
SEQ_SNAP_TO_STRIP_HOLD | SEQ_SNAP_TO_MARKERS;
Adding this bit here will only affect files saved with blender version before 3.0.0 (subversion 7).
You should add new
if (!MAIN_VERSION_FILE_ATLEAST
condition toversioning_400.cc
file and bump subversion inBKE_blender_version.h
file. Then modifysequencer_tool_settings->snap_mode
in new condition.It seems fine as it is, I'm generally able to distinguish between snapping to a given marker and, say, a nearby strip without any issues. But if you strongly think otherwise when you test it later on, do let me know.
@blender-bot build