[Bf-blender-cvs] [4abbf6d82b1] master: Fix T90967: Snapping not working with single strip

Richard Antalik noreply at git.blender.org
Tue Sep 7 23:43:54 CEST 2021


Commit: 4abbf6d82b190e1f67e180bf4330e51a53267144
Author: Richard Antalik
Date:   Tue Sep 7 23:39:50 2021 +0200
Branches: master
https://developer.blender.org/rB4abbf6d82b190e1f67e180bf4330e51a53267144

Fix T90967: Snapping not working with single strip

Even if `snap_targets` `SeqCollection` is empty, there can be static
snap points defined, so don't condition snapping on non-zero target
count.

Differential Revision: https://developer.blender.org/D12400

===================================================================

M	source/blender/editors/transform/transform_snap_sequencer.c

===================================================================

diff --git a/source/blender/editors/transform/transform_snap_sequencer.c b/source/blender/editors/transform/transform_snap_sequencer.c
index a54149912a9..e82a00bcc77 100644
--- a/source/blender/editors/transform/transform_snap_sequencer.c
+++ b/source/blender/editors/transform/transform_snap_sequencer.c
@@ -260,7 +260,7 @@ TransSeqSnapData *transform_snap_sequencer_data_alloc(const TransInfo *t)
   SeqCollection *snap_sources = SEQ_query_selected_strips(seqbase);
   SeqCollection *snap_targets = query_snap_targets(t, snap_sources);
 
-  if (SEQ_collection_len(snap_sources) == 0 || SEQ_collection_len(snap_targets) == 0) {
+  if (SEQ_collection_len(snap_sources) == 0) {
     SEQ_collection_free(snap_targets);
     SEQ_collection_free(snap_sources);
     MEM_freeN(snap_data);



More information about the Bf-blender-cvs mailing list