[#7805] VSE: "snap to current frame" doesn't work for startframe/endframe

Added this functionality.
This commit is contained in:
Campbell Barton
2007-12-05 20:54:26 +00:00
parent e756b1cc7d
commit 5d0c829194

View File

@@ -3613,14 +3613,22 @@ void seq_snap(short event)
/* also check metas */
WHILE_SEQ(ed->seqbasep) {
if(seq->flag & SELECT) {
if(sequence_is_free_transformable(seq)) seq->start= CFRA-seq->startofs+seq->startstill;
if (seq->flag & SELECT && sequence_is_free_transformable(seq)) {
if((seq->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL))==0) {
seq->start= CFRA-seq->startofs+seq->startstill;
} else {
if(seq->flag & SEQ_LEFTSEL) {
seq_tx_set_final_left(seq, CFRA);
} else { /* SEQ_RIGHTSEL */
seq_tx_set_final_right(seq, CFRA);
}
transform_grab_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL);
}
calc_sequence(seq);
}
}
END_SEQ
/* test for effects and overlap */
WHILE_SEQ(ed->seqbasep) {
if(seq->flag & SELECT) {