Page MenuHome

Fix VSE snapping issue for single strips
ClosedPublic

Authored by Aditya Y Jeppu (quantimoney) on Sep 4 2021, 7:07 PM.

Details

Summary

snap_sources and snap_targets take only non selected strips, so single strip and when it is selected (when snapping) it returns from transform_snap_sequencer_data_alloc. Freeing of allocated mem done afterwards too in function so just changing condition should be fine here.

Diff Detail

Repository
rB Blender

Event Timeline

Technically this is correct, but if BLI_listbase_count(seqbase) == 0 then SEQ_collection_len(snap_sources) and SEQ_collection_len(snap_targets) must be 0, so then it wouldn't make sense to include them in condition. So better condition would be to just not check if SEQ_collection_len(snap_targets) == 0 is true. If this would cause issues we can inspect snap_data->target_snap_point_count after array is initialized and cancel snapping if there are no targets.

So I will commit what I suggested.

Just a suggestion:
Patch title and description should match commit message, that makes life easier so you can commit directly without edits. When you put Fix T90967: Snap not working with single strip in title, ticket will be closed automatically when patch is committed.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 7 2021, 11:44 PM
This revision was automatically updated to reflect the committed changes.