[Bf-blender-cvs] [dda7e3b6956] master: VSE Effects: Wipe box: fix compilation errors

Aaron Carlisle noreply at git.blender.org
Fri Apr 20 01:01:53 CEST 2018


Commit: dda7e3b69565c5701207a640201a1c8052f76743
Author: Aaron Carlisle
Date:   Thu Apr 19 18:41:06 2018 -0400
Branches: master
https://developer.blender.org/rBdda7e3b69565c5701207a640201a1c8052f76743

VSE Effects: Wipe box: fix compilation errors

This is still broken I cant tell if it is the fact that the in_band
funtion does not work properally or an issue in the box algorithm, or
both.

It seems like the calculation of the size of the box while roatated
needs to be fixed also.

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

M	source/blender/blenkernel/intern/seqeffects.c

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

diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 49f120de250..176d1224979 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -1767,12 +1767,13 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
 			if (output != output) output = 1;
 			if (wipe->forward) output = 1 - output;
 			break;
-			/* BOX WIPE IS NOT WORKING YET */
+      /* BOX WIPE IS NOT WORKING YET */
 			/* case DO_CROSS_WIPE: */
 			/* BOX WIPE IS NOT WORKING YET */
 #if 0
 		case DO_BOX_WIPE: 
-			if (invert) facf0 = 1 - facf0;
+      if (!wipe->forward)
+        facf0 = 1.0f - facf0;  /* Go the other direction */
 
 			width = (int)(wipe->edgeWidth * ((xo + yo) / 2.0));
 			hwidth = (float)width / 2.0;
@@ -1790,22 +1791,23 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
 
 			if (b2 < b1 && b2 < b3) {
 				if (hwidth < pointdist)
-					output = in_band(wipezone, hwidth, hyp, facf0, 0, 1);
+					output = in_band(hwidth, hyp, 0, 1);
 			}
 			else if (b2 > b1 && b2 > b3) {
 				if (hwidth < pointdist)
-					output = in_band(wipezone, hwidth, hyp2, facf0, 0, 1);
+					output = in_band(hwidth, hyp2, 0, 1);
 			}
 			else {
 				if (hyp < hwidth && hyp2 > hwidth)
-					output = in_band(wipezone, hwidth, hyp, facf0, 1, 1);
+					output = in_band(hwidth, hyp, 1, 1);
 				else if (hyp > hwidth && hyp2 < hwidth)
-					output = in_band(wipezone, hwidth, hyp2, facf0, 1, 1);
+					output = in_band(hwidth, hyp2, 1, 1);
 				else
-					output = in_band(wipezone, hwidth, hyp2, facf0, 1, 1) * in_band(wipezone, hwidth, hyp, facf0, 1, 1);
+					output = in_band(hwidth, hyp2, 1, 1) * in_band(hwidth, hyp, 1, 1);
 			}
 
-			if (invert) facf0 = 1 - facf0;
+      if (!wipe->forward)
+        facf0 = 1.0f - facf0;  /* Go the other direction */
 			angle = -1 / angle;
 			b1 = posy / 2 - (-angle) * posx / 2;
 			b3 = (yo - posy / 2) - (-angle) * (xo - posx / 2);
@@ -1816,19 +1818,19 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
 
 			if (b2 < b1 && b2 < b3) {
 				if (hwidth < pointdist)
-					output *= in_band(wipezone, hwidth, hyp, facf0, 0, 1);
+					output *= in_band(hwidth, hyp, 0, 1);
 			}
 			else if (b2 > b1 && b2 > b3) {
 				if (hwidth < pointdist)
-					output *= in_band(wipezone, hwidth, hyp2, facf0, 0, 1);
+					output *= in_band(hwidth, hyp2, 0, 1);
 			}
 			else {
 				if (hyp < hwidth && hyp2 > hwidth)
-					output *= in_band(wipezone, hwidth, hyp, facf0, 1, 1);
+					output *= in_band(hwidth, hyp, 1, 1);
 				else if (hyp > hwidth && hyp2 < hwidth)
-					output *= in_band(wipezone, hwidth, hyp2, facf0, 1, 1);
+					output *= in_band(hwidth, hyp2, 1, 1);
 				else
-					output *= in_band(wipezone, hwidth, hyp2, facf0, 1, 1) * in_band(wipezone, hwidth, hyp, facf0, 1, 1);
+					output *= in_band(hwidth, hyp2, 1, 1) * in_band(hwidth, hyp, 1, 1);
 			}
 
 			break;



More information about the Bf-blender-cvs mailing list