diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2018-04-20 01:41:06 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2018-04-20 01:44:56 +0300 |
commit | dda7e3b69565c5701207a640201a1c8052f76743 (patch) | |
tree | 77582cb91741b59c21ea8bcb7c92280ec470160b /source/blender/blenkernel | |
parent | e2678d6b7b73366777f85b10dc9bd0cc2ee8181e (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/seqeffects.c | 28 |
1 files changed, 15 insertions, 13 deletions
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; |