[Bf-blender-cvs] [241c1422480] blender-v2.79b-release: Revert "Fix T53430: Cut at the strip end fails w/ endstill"

Campbell Barton noreply at git.blender.org
Mon Mar 19 11:37:51 CET 2018


Commit: 241c1422480e4a34f6b75b5638c6ab6e852ea302
Author: Campbell Barton
Date:   Mon Mar 5 15:11:33 2018 +1100
Branches: blender-v2.79b-release
https://developer.blender.org/rB241c1422480e4a34f6b75b5638c6ab6e852ea302

Revert "Fix T53430: Cut at the strip end fails w/ endstill"

This reverts commit 855799ecc1c5e53d9fbfe520fd5402bc0138f674.

Caused T54200

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

M	source/blender/editors/space_sequencer/sequencer_edit.c

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

diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 17658497d9b..99c5c82eaab 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -694,7 +694,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe)
 		BKE_sequence_calc(scene, seq);
 	}
 
-	if ((seq->startstill) && (cutframe <= seq->start)) {
+	if ((seq->startstill) && (cutframe < seq->start)) {
 		/* don't do funny things with METAs ... */
 		if (seq->type == SEQ_TYPE_META) {
 			skip_dup = true;
@@ -708,15 +708,13 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe)
 		}
 	}
 	/* normal strip */
-	else if ((cutframe >= seq->start) && (cutframe < (seq->start + seq->len))) {
+	else if ((cutframe >= seq->start) && (cutframe <= (seq->start + seq->len))) {
 		seq->endofs = 0;
 		seq->endstill = 0;
 		seq->anim_endofs += (seq->start + seq->len) - cutframe;
 	}
 	/* strips with extended stillframes after */
-	else if (((seq->start + seq->len) == cutframe) ||
-	         (((seq->start + seq->len) < cutframe) && (seq->endstill)))
-	{
+	else if (((seq->start + seq->len) < cutframe) && (seq->endstill)) {
 		seq->endstill -= seq->enddisp - cutframe;
 		/* don't do funny things with METAs ... */
 		if (seq->type == SEQ_TYPE_META) {
@@ -745,7 +743,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe)
 		}
 		
 		/* normal strip */
-		else if ((cutframe >= seqn->start) && (cutframe < (seqn->start + seqn->len))) {
+		else if ((cutframe >= seqn->start) && (cutframe <= (seqn->start + seqn->len))) {
 			seqn->start = cutframe;
 			seqn->startstill = 0;
 			seqn->startofs = 0;
@@ -756,9 +754,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe)
 		}
 		
 		/* strips with extended stillframes after */
-		else if (((seqn->start + seqn->len) == cutframe) ||
-		         (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)))
-		{
+		else if (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)) {
 			seqn->start = cutframe;
 			seqn->startofs = 0;
 			seqn->anim_startofs += ts.len - 1;
@@ -794,7 +790,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe)
 	/* First Strip! */
 	/* strips with extended stillfames before */
 	
-	if ((seq->startstill) && (cutframe <= seq->start)) {
+	if ((seq->startstill) && (cutframe < seq->start)) {
 		/* don't do funny things with METAs ... */
 		if (seq->type == SEQ_TYPE_META) {
 			skip_dup = true;
@@ -808,13 +804,11 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe)
 		}
 	}
 	/* normal strip */
-	else if ((cutframe >= seq->start) && (cutframe < (seq->start + seq->len))) {
+	else if ((cutframe >= seq->start) && (cutframe <= (seq->start + seq->len))) {
 		seq->endofs = (seq->start + seq->len) - cutframe;
 	}
 	/* strips with extended stillframes after */
-	else if (((seq->start + seq->len) == cutframe) ||
-	         (((seq->start + seq->len) < cutframe) && (seq->endstill)))
-	{
+	else if (((seq->start + seq->len) < cutframe) && (seq->endstill)) {
 		seq->endstill -= seq->enddisp - cutframe;
 		/* don't do funny things with METAs ... */
 		if (seq->type == SEQ_TYPE_META) {
@@ -840,9 +834,9 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe)
 			seqn->endofs = ts.endofs;
 			seqn->endstill = ts.endstill;
 		}
-
+		
 		/* normal strip */
-		if ((cutframe >= seqn->start) && (cutframe < (seqn->start + seqn->len))) {
+		else if ((cutframe >= seqn->start) && (cutframe <= (seqn->start + seqn->len))) {
 			seqn->startstill = 0;
 			seqn->startofs = cutframe - ts.start;
 			seqn->endofs = ts.endofs;
@@ -850,9 +844,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe)
 		}
 		
 		/* strips with extended stillframes after */
-		else if (((seqn->start + seqn->len) == cutframe) ||
-		         (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)))
-		{
+		else if (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)) {
 			seqn->start = cutframe - ts.len + 1;
 			seqn->startofs = ts.len - 1;
 			seqn->endstill = ts.enddisp - cutframe - 1;



More information about the Bf-blender-cvs mailing list