This commit changes the sweep effect to be called 'Wipe' in both UI and in backend variable naming.
This commit is contained in:
parent
d1bbaf18ca
commit
248404e7a2
@ -1050,8 +1050,8 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
|
|||||||
if(seq->plugin) writestruct(wd, DATA, "PluginSeq", 1, seq->plugin);
|
if(seq->plugin) writestruct(wd, DATA, "PluginSeq", 1, seq->plugin);
|
||||||
if(seq->effectdata) {
|
if(seq->effectdata) {
|
||||||
switch(seq->type){
|
switch(seq->type){
|
||||||
case SEQ_SWEEP:
|
case SEQ_WIPE:
|
||||||
writestruct(wd, DATA, "SweepVars", 1, seq->effectdata);
|
writestruct(wd, DATA, "WipeVars", 1, seq->effectdata);
|
||||||
break;
|
break;
|
||||||
case SEQ_GLOW:
|
case SEQ_GLOW:
|
||||||
writestruct(wd, DATA, "GlowVars", 1, seq->effectdata);
|
writestruct(wd, DATA, "GlowVars", 1, seq->effectdata);
|
||||||
|
@ -95,13 +95,13 @@ void do_mul_effect(float facf0, float facf1,
|
|||||||
int x, int y,
|
int x, int y,
|
||||||
unsigned int *rect1, unsigned int *rect2,
|
unsigned int *rect1, unsigned int *rect2,
|
||||||
unsigned int *out);
|
unsigned int *out);
|
||||||
/* Sweep effect */
|
/* Wipe effect */
|
||||||
enum {DO_SINGLE_WIPE, DO_DOUBLE_WIPE, DO_BOX_WIPE, DO_CROSS_WIPE,
|
enum {DO_SINGLE_WIPE, DO_DOUBLE_WIPE, DO_BOX_WIPE, DO_CROSS_WIPE,
|
||||||
DO_IRIS_WIPE,DO_CLOCK_WIPE};
|
DO_IRIS_WIPE,DO_CLOCK_WIPE};
|
||||||
float in_band(float width,float dist, float perc,int side,int dir);
|
float in_band(float width,float dist, float perc,int side,int dir);
|
||||||
float check_zone(int x, int y, int xo, int yo, struct Sequence *seq, float facf0);
|
float check_zone(int x, int y, int xo, int yo, struct Sequence *seq, float facf0);
|
||||||
void init_sweep_effect(struct Sequence *seq);
|
void init_wipe_effect(struct Sequence *seq);
|
||||||
void do_sweep_effect(struct Sequence *seq, float facf0, float facf1, int x, int y, unsigned int *rect1, unsigned int *rect2, unsigned int *out);
|
void do_wipe_effect(struct Sequence *seq, float facf0, float facf1, int x, int y, unsigned int *rect1, unsigned int *rect2, unsigned int *out);
|
||||||
|
|
||||||
/* Glow effect */
|
/* Glow effect */
|
||||||
enum {
|
enum {
|
||||||
|
@ -139,13 +139,13 @@ typedef struct Editing {
|
|||||||
} Editing;
|
} Editing;
|
||||||
|
|
||||||
/* ************* Effect Variable Structs ********* */
|
/* ************* Effect Variable Structs ********* */
|
||||||
typedef struct SweepVars {
|
typedef struct WipeVars {
|
||||||
float edgeWidth,angle;
|
float edgeWidth,angle;
|
||||||
short forward,spad1,spad2,spad3;
|
short forward,spad1,spad2,spad3;
|
||||||
int ipad1;
|
int ipad1;
|
||||||
float fpad1,fpad2;
|
float fpad1,fpad2;
|
||||||
short sweeptype;
|
short wipetype;
|
||||||
} SweepVars;
|
} WipeVars;
|
||||||
|
|
||||||
typedef struct GlowVars {
|
typedef struct GlowVars {
|
||||||
float fMini; /* Minimum intensity to trigger a glow */
|
float fMini; /* Minimum intensity to trigger a glow */
|
||||||
@ -183,7 +183,7 @@ typedef struct GlowVars {
|
|||||||
#define SEQ_MUL 14
|
#define SEQ_MUL 14
|
||||||
#define SEQ_OVERDROP 15
|
#define SEQ_OVERDROP 15
|
||||||
#define SEQ_PLUGIN 24
|
#define SEQ_PLUGIN 24
|
||||||
#define SEQ_SWEEP 25
|
#define SEQ_WIPE 25
|
||||||
#define SEQ_GLOW 26
|
#define SEQ_GLOW 26
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -120,7 +120,7 @@ static char *give_seqname(Sequence *seq)
|
|||||||
else if(seq->type==SEQ_ALPHAOVER) return "ALPHAOVER";
|
else if(seq->type==SEQ_ALPHAOVER) return "ALPHAOVER";
|
||||||
else if(seq->type==SEQ_ALPHAUNDER) return "ALPHAUNDER";
|
else if(seq->type==SEQ_ALPHAUNDER) return "ALPHAUNDER";
|
||||||
else if(seq->type==SEQ_OVERDROP) return "OVER DROP";
|
else if(seq->type==SEQ_OVERDROP) return "OVER DROP";
|
||||||
else if(seq->type==SEQ_SWEEP) return "SWEEP";
|
else if(seq->type==SEQ_WIPE) return "WIPE";
|
||||||
else if(seq->type==SEQ_GLOW) return "GLOW";
|
else if(seq->type==SEQ_GLOW) return "GLOW";
|
||||||
else if(seq->type==SEQ_PLUGIN) {
|
else if(seq->type==SEQ_PLUGIN) {
|
||||||
if(seq->plugin && seq->plugin->doit) return seq->plugin->pname;
|
if(seq->plugin && seq->plugin->doit) return seq->plugin->pname;
|
||||||
@ -166,7 +166,7 @@ static unsigned int seq_color(Sequence *seq)
|
|||||||
return 0x9080A0;
|
return 0x9080A0;
|
||||||
case SEQ_OVERDROP:
|
case SEQ_OVERDROP:
|
||||||
return 0x5080B0;
|
return 0x5080B0;
|
||||||
case SEQ_SWEEP:
|
case SEQ_WIPE:
|
||||||
return 0x2080B0;
|
return 0x2080B0;
|
||||||
case SEQ_GLOW:
|
case SEQ_GLOW:
|
||||||
return 0x0080B0;
|
return 0x0080B0;
|
||||||
@ -710,21 +710,21 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES
|
|||||||
uiDefBut(block, LABEL, 0, "Type: Effect", 10,140,150,20, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Type: Effect", 10,140,150,20, 0, 0, 0, 0, 0, "");
|
||||||
uiDefBut(block, TEX, 0, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, "");
|
uiDefBut(block, TEX, 0, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, "");
|
||||||
|
|
||||||
if(last_seq->type==SEQ_SWEEP){
|
if(last_seq->type==SEQ_WIPE){
|
||||||
SweepVars *sweep = (SweepVars *)last_seq->effectdata;
|
WipeVars *wipe = (WipeVars *)last_seq->effectdata;
|
||||||
char formatstring[1024];
|
char formatstring[1024];
|
||||||
strcpy(formatstring, "Transition Type %t|Single Wipe%x0|Double Wipe %x1|Iris Wipe %x4|Clock Wipe %x5");
|
strcpy(formatstring, "Transition Type %t|Single Wipe%x0|Double Wipe %x1|Iris Wipe %x4|Clock Wipe %x5");
|
||||||
uiDefButS(block, MENU,SEQ_BUT_EFFECT | B_NOP, formatstring, 10,90,220,22, &sweep->sweeptype, 0, 0, 0, 0, "What type of sweep should be performed");
|
uiDefButS(block, MENU,SEQ_BUT_EFFECT | B_NOP, formatstring, 10,90,220,22, &wipe->wipetype, 0, 0, 0, 0, "What type of wipe should be performed");
|
||||||
uiDefButF(block, NUM,SEQ_BUT_EFFECT| B_NOP,"Blur:", 10,65,220,22, &sweep->edgeWidth,0.0,1.0, 1, 2, "The percent width of the blur edge");
|
uiDefButF(block, NUM,SEQ_BUT_EFFECT| B_NOP,"Blur:", 10,65,220,22, &wipe->edgeWidth,0.0,1.0, 1, 2, "The percent width of the blur edge");
|
||||||
switch(sweep->sweeptype){ /*Skip Types that do not require angle*/
|
switch(wipe->wipetype){ /*Skip Types that do not require angle*/
|
||||||
case DO_IRIS_WIPE:
|
case DO_IRIS_WIPE:
|
||||||
case DO_CLOCK_WIPE:
|
case DO_CLOCK_WIPE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
uiDefButF(block, NUM,SEQ_BUT_EFFECT| B_NOP,"Angle:", 10,40,220,22, &sweep->angle,-90.0,90.0, 1, 2, "The Angle of the Edge");
|
uiDefButF(block, NUM,SEQ_BUT_EFFECT| B_NOP,"Angle:", 10,40,220,22, &wipe->angle,-90.0,90.0, 1, 2, "The Angle of the Edge");
|
||||||
}
|
}
|
||||||
uiDefButS(block, TOG,SEQ_BUT_EFFECT| B_NOP,"Wipe In", 10,15,220,22, &sweep->forward,0,0, 0, 0, "Controls Primary Direction of Sweep");
|
uiDefButS(block, TOG,SEQ_BUT_EFFECT| B_NOP,"Wipe In", 10,15,220,22, &wipe->forward,0,0, 0, 0, "Controls Primary Direction of Wipe");
|
||||||
}
|
}
|
||||||
else if(last_seq->type==SEQ_GLOW){
|
else if(last_seq->type==SEQ_GLOW){
|
||||||
GlowVars *glow = (GlowVars *)last_seq->effectdata;
|
GlowVars *glow = (GlowVars *)last_seq->effectdata;
|
||||||
|
@ -836,7 +836,7 @@ static int event_to_efftype(int event)
|
|||||||
if(event==8) return SEQ_ALPHAUNDER;
|
if(event==8) return SEQ_ALPHAUNDER;
|
||||||
if(event==9) return SEQ_OVERDROP;
|
if(event==9) return SEQ_OVERDROP;
|
||||||
if(event==10) return SEQ_PLUGIN;
|
if(event==10) return SEQ_PLUGIN;
|
||||||
if(event==13) return SEQ_SWEEP;
|
if(event==13) return SEQ_WIPE;
|
||||||
if(event==14) return SEQ_GLOW;
|
if(event==14) return SEQ_GLOW;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -901,8 +901,8 @@ static int add_seq_effect(int type)
|
|||||||
seq->type= event_to_efftype(type);
|
seq->type= event_to_efftype(type);
|
||||||
|
|
||||||
/* Allocate variable structs for effects with settings */
|
/* Allocate variable structs for effects with settings */
|
||||||
if(seq->type==SEQ_SWEEP){
|
if(seq->type==SEQ_WIPE){
|
||||||
init_sweep_effect(seq);
|
init_wipe_effect(seq);
|
||||||
}
|
}
|
||||||
else if(seq->type==SEQ_GLOW){
|
else if(seq->type==SEQ_GLOW){
|
||||||
init_glow_effect(seq);
|
init_glow_effect(seq);
|
||||||
@ -1004,7 +1004,7 @@ void add_sequence(int type)
|
|||||||
case SEQ_OVERDROP:
|
case SEQ_OVERDROP:
|
||||||
event = 9;
|
event = 9;
|
||||||
break;
|
break;
|
||||||
case SEQ_SWEEP:
|
case SEQ_WIPE:
|
||||||
event = 13;
|
event = 13;
|
||||||
break;
|
break;
|
||||||
case SEQ_GLOW:
|
case SEQ_GLOW:
|
||||||
@ -1016,7 +1016,7 @@ void add_sequence(int type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
event= pupmenu("Add Sequence Strip%t|Images%x1|Movie%x102|Audio%x103|Scene%x101|Plugin%x10|Cross%x2|Gamma Cross%x3|Add%x4|Sub%x5|Mul%x6|Alpha Over%x7|Alpha Under%x8|Alpha Over Drop%x9|Sweep%x13|Glow%x14");
|
event= pupmenu("Add Sequence Strip%t|Images%x1|Movie%x102|Audio%x103|Scene%x101|Plugin%x10|Cross%x2|Gamma Cross%x3|Add%x4|Sub%x5|Mul%x6|Alpha Over%x7|Alpha Under%x8|Alpha Over Drop%x9|Wipe%x13|Glow%x14");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(event<1) return;
|
if(event<1) return;
|
||||||
@ -1113,7 +1113,7 @@ void change_sequence(void)
|
|||||||
if(last_seq==0) return;
|
if(last_seq==0) return;
|
||||||
|
|
||||||
if(last_seq->type & SEQ_EFFECT) {
|
if(last_seq->type & SEQ_EFFECT) {
|
||||||
event= pupmenu("Change Effect%t|Switch A <-> B %x1|Switch B <-> C %x10|Plugin%x11|Recalculate%x12|Cross%x2|Gamma Cross%x3|Add%x4|Sub%x5|Mul%x6|Alpha Over%x7|Alpha Under%x8|Alpha Over Drop%x9|Sweep%x13|Glow%x14");
|
event= pupmenu("Change Effect%t|Switch A <-> B %x1|Switch B <-> C %x10|Plugin%x11|Recalculate%x12|Cross%x2|Gamma Cross%x3|Add%x4|Sub%x5|Mul%x6|Alpha Over%x7|Alpha Under%x8|Alpha Over Drop%x9|Wipe%x13|Glow%x14");
|
||||||
if(event>0) {
|
if(event>0) {
|
||||||
if(event==1) {
|
if(event==1) {
|
||||||
SWAP(Sequence *, last_seq->seq1, last_seq->seq2);
|
SWAP(Sequence *, last_seq->seq1, last_seq->seq2);
|
||||||
@ -1132,8 +1132,8 @@ void change_sequence(void)
|
|||||||
last_seq->type= event_to_efftype(event);
|
last_seq->type= event_to_efftype(event);
|
||||||
|
|
||||||
switch(last_seq->type){
|
switch(last_seq->type){
|
||||||
case SEQ_SWEEP:
|
case SEQ_WIPE:
|
||||||
init_sweep_effect(last_seq);
|
init_wipe_effect(last_seq);
|
||||||
break;
|
break;
|
||||||
case SEQ_GLOW:
|
case SEQ_GLOW:
|
||||||
init_glow_effect(last_seq);
|
init_glow_effect(last_seq);
|
||||||
|
@ -207,7 +207,7 @@ static void do_seq_addmenu_effectmenu(void *arg, int event)
|
|||||||
add_sequence(SEQ_PLUGIN);
|
add_sequence(SEQ_PLUGIN);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
add_sequence(SEQ_SWEEP);
|
add_sequence(SEQ_WIPE);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
add_sequence(SEQ_GLOW);
|
add_sequence(SEQ_GLOW);
|
||||||
@ -231,7 +231,7 @@ static uiBlock *seq_addmenu_effectmenu(void *arg_unused)
|
|||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Over", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Over", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Under", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Under", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Over Drop", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Over Drop", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Sweep", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Wipe", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Glow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 10, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Glow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 10, "");
|
||||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Plugin...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Plugin...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
|
||||||
|
@ -994,10 +994,10 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
float halfx = xo/2;
|
float halfx = xo/2;
|
||||||
float halfy = yo/2;
|
float halfy = yo/2;
|
||||||
float widthf,output=0;
|
float widthf,output=0;
|
||||||
SweepVars *sweep = (SweepVars *)seq->effectdata;
|
WipeVars *wipe = (WipeVars *)seq->effectdata;
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
angle = sweep->angle;
|
angle = wipe->angle;
|
||||||
if(angle < 0){
|
if(angle < 0){
|
||||||
x = xo-x;
|
x = xo-x;
|
||||||
//y = yo-y
|
//y = yo-y
|
||||||
@ -1005,16 +1005,16 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
angle = pow(fabs(angle)/45,log(xo)/log(2));
|
angle = pow(fabs(angle)/45,log(xo)/log(2));
|
||||||
|
|
||||||
posy = facf0 * yo;
|
posy = facf0 * yo;
|
||||||
if(sweep->forward){
|
if(wipe->forward){
|
||||||
posx = facf0 * xo;
|
posx = facf0 * xo;
|
||||||
posy = facf0 * yo;
|
posy = facf0 * yo;
|
||||||
} else{
|
} else{
|
||||||
posx = xo - facf0 * xo;
|
posx = xo - facf0 * xo;
|
||||||
posy = yo - facf0 * yo;
|
posy = yo - facf0 * yo;
|
||||||
}
|
}
|
||||||
switch (sweep->sweeptype) {
|
switch (wipe->wipetype) {
|
||||||
case DO_SINGLE_WIPE:
|
case DO_SINGLE_WIPE:
|
||||||
width = (int)(sweep->edgeWidth*((xo+yo)/2.0));
|
width = (int)(wipe->edgeWidth*((xo+yo)/2.0));
|
||||||
hwidth = (float)width/2.0;
|
hwidth = (float)width/2.0;
|
||||||
|
|
||||||
if (angle == 0.0)angle = 0.000001;
|
if (angle == 0.0)angle = 0.000001;
|
||||||
@ -1026,7 +1026,7 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
b1 = b2;
|
b1 = b2;
|
||||||
b2 = temp1;
|
b2 = temp1;
|
||||||
}
|
}
|
||||||
if(sweep->forward){
|
if(wipe->forward){
|
||||||
if(b1 < b2)
|
if(b1 < b2)
|
||||||
output = in_band(width,hyp,facf0,1,1);
|
output = in_band(width,hyp,facf0,1,1);
|
||||||
else
|
else
|
||||||
@ -1042,9 +1042,9 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
|
|
||||||
|
|
||||||
case DO_DOUBLE_WIPE:
|
case DO_DOUBLE_WIPE:
|
||||||
if(!sweep->forward)facf0 = 1-facf0; // Go the other direction
|
if(!wipe->forward)facf0 = 1-facf0; // Go the other direction
|
||||||
|
|
||||||
width = (int)(sweep->edgeWidth*((xo+yo)/2.0)); // calculate the blur width
|
width = (int)(wipe->edgeWidth*((xo+yo)/2.0)); // calculate the blur width
|
||||||
hwidth = (float)width/2.0;
|
hwidth = (float)width/2.0;
|
||||||
if (angle == 0)angle = 0.000001;
|
if (angle == 0)angle = 0.000001;
|
||||||
b1 = posy/2 - (-angle)*posx/2;
|
b1 = posy/2 - (-angle)*posx/2;
|
||||||
@ -1074,7 +1074,7 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
else
|
else
|
||||||
output = in_band(hwidth,hyp2,facf0,1,1) * in_band(hwidth,hyp,facf0,1,1);
|
output = in_band(hwidth,hyp2,facf0,1,1) * in_band(hwidth,hyp,facf0,1,1);
|
||||||
}
|
}
|
||||||
if(!sweep->forward)output = 1-output;
|
if(!wipe->forward)output = 1-output;
|
||||||
break;
|
break;
|
||||||
case DO_CLOCK_WIPE:
|
case DO_CLOCK_WIPE:
|
||||||
/*
|
/*
|
||||||
@ -1084,10 +1084,10 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
temp4: angle of high side of blur
|
temp4: angle of high side of blur
|
||||||
*/
|
*/
|
||||||
output = 1-facf0;
|
output = 1-facf0;
|
||||||
widthf = sweep->edgeWidth*2*3.14159;
|
widthf = wipe->edgeWidth*2*3.14159;
|
||||||
temp1 = 2 * 3.14159 * facf0;
|
temp1 = 2 * 3.14159 * facf0;
|
||||||
|
|
||||||
if(sweep->forward){
|
if(wipe->forward){
|
||||||
temp1 = 2*3.14159-temp1;
|
temp1 = 2*3.14159-temp1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1102,7 +1102,7 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
else if(x >= 0 && y <= 0)
|
else if(x >= 0 && y <= 0)
|
||||||
temp2 = 2*3.14159 - temp2;
|
temp2 = 2*3.14159 - temp2;
|
||||||
|
|
||||||
if(sweep->forward){
|
if(wipe->forward){
|
||||||
temp3 = temp1-(widthf/2)*facf0;
|
temp3 = temp1-(widthf/2)*facf0;
|
||||||
temp4 = temp1+(widthf/2)*(1-facf0);
|
temp4 = temp1+(widthf/2)*(1-facf0);
|
||||||
}
|
}
|
||||||
@ -1125,7 +1125,7 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
}
|
}
|
||||||
if(output != output)
|
if(output != output)
|
||||||
output = 1;
|
output = 1;
|
||||||
if(sweep->forward)
|
if(wipe->forward)
|
||||||
output = 1 - output;
|
output = 1 - output;
|
||||||
break;
|
break;
|
||||||
/* BOX WIPE IS NOT WORKING YET */
|
/* BOX WIPE IS NOT WORKING YET */
|
||||||
@ -1134,7 +1134,7 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
/* case DO_BOX_WIPE:
|
/* case DO_BOX_WIPE:
|
||||||
if(invert)facf0 = 1-facf0;
|
if(invert)facf0 = 1-facf0;
|
||||||
|
|
||||||
width = (int)(sweep->edgeWidth*((xo+yo)/2.0));
|
width = (int)(wipe->edgeWidth*((xo+yo)/2.0));
|
||||||
hwidth = (float)width/2.0;
|
hwidth = (float)width/2.0;
|
||||||
if (angle == 0)angle = 0.000001;
|
if (angle == 0)angle = 0.000001;
|
||||||
b1 = posy/2 - (-angle)*posx/2;
|
b1 = posy/2 - (-angle)*posx/2;
|
||||||
@ -1195,10 +1195,10 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
if(xo > yo) yo = xo;
|
if(xo > yo) yo = xo;
|
||||||
else xo = yo;
|
else xo = yo;
|
||||||
|
|
||||||
if(!sweep->forward)
|
if(!wipe->forward)
|
||||||
facf0 = 1-facf0;
|
facf0 = 1-facf0;
|
||||||
|
|
||||||
width = (int)(sweep->edgeWidth*((xo+yo)/2.0));
|
width = (int)(wipe->edgeWidth*((xo+yo)/2.0));
|
||||||
hwidth = (float)width/2.0;
|
hwidth = (float)width/2.0;
|
||||||
|
|
||||||
temp1 = (halfx-(halfx)*facf0);
|
temp1 = (halfx-(halfx)*facf0);
|
||||||
@ -1210,7 +1210,7 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
else
|
else
|
||||||
output = in_band(hwidth,fabs(temp2-pointdist),facf0,1,1);
|
output = in_band(hwidth,fabs(temp2-pointdist),facf0,1,1);
|
||||||
|
|
||||||
if(!sweep->forward)
|
if(!wipe->forward)
|
||||||
output = 1-output;
|
output = 1-output;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -1220,13 +1220,13 @@ float check_zone(int x, int y, int xo, int yo, Sequence *seq, float facf0) {
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_sweep_effect(Sequence *seq)
|
void init_wipe_effect(Sequence *seq)
|
||||||
{
|
{
|
||||||
if(seq->effectdata)MEM_freeN(seq->effectdata);
|
if(seq->effectdata)MEM_freeN(seq->effectdata);
|
||||||
seq->effectdata = MEM_callocN(sizeof(struct SweepVars), "sweepvars");
|
seq->effectdata = MEM_callocN(sizeof(struct WipeVars), "wipevars");
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_sweep_effect(Sequence *seq, float facf0, float facf1, int x, int y, unsigned int *rect1, unsigned int *rect2, unsigned int *out)
|
void do_wipe_effect(Sequence *seq, float facf0, float facf1, int x, int y, unsigned int *rect1, unsigned int *rect2, unsigned int *out)
|
||||||
{
|
{
|
||||||
int xo, yo;
|
int xo, yo;
|
||||||
char *rt1, *rt2, *rt;
|
char *rt1, *rt2, *rt;
|
||||||
@ -1598,7 +1598,7 @@ void do_effect(int cfra, Sequence *seq, StripElem *se)
|
|||||||
fac= seq->facf0;
|
fac= seq->facf0;
|
||||||
facf= seq->facf1;
|
facf= seq->facf1;
|
||||||
}
|
}
|
||||||
else if ( seq->type==SEQ_CROSS || seq->type==SEQ_GAMCROSS || seq->type==SEQ_PLUGIN || seq->type==SEQ_SWEEP) {
|
else if ( seq->type==SEQ_CROSS || seq->type==SEQ_GAMCROSS || seq->type==SEQ_PLUGIN || seq->type==SEQ_WIPE) {
|
||||||
fac= (float)(cfra - seq->startdisp);
|
fac= (float)(cfra - seq->startdisp);
|
||||||
facf= (float)(fac+0.5);
|
facf= (float)(fac+0.5);
|
||||||
fac /= seq->len;
|
fac /= seq->len;
|
||||||
@ -1636,8 +1636,8 @@ void do_effect(int cfra, Sequence *seq, StripElem *se)
|
|||||||
case SEQ_ALPHAUNDER:
|
case SEQ_ALPHAUNDER:
|
||||||
do_alphaunder_effect(fac, facf, x, y, se1->ibuf->rect, se2->ibuf->rect, se->ibuf->rect);
|
do_alphaunder_effect(fac, facf, x, y, se1->ibuf->rect, se2->ibuf->rect, se->ibuf->rect);
|
||||||
break;
|
break;
|
||||||
case SEQ_SWEEP:
|
case SEQ_WIPE:
|
||||||
do_sweep_effect(seq, fac, facf, x, y, se1->ibuf->rect, se2->ibuf->rect, se->ibuf->rect);
|
do_wipe_effect(seq, fac, facf, x, y, se1->ibuf->rect, se2->ibuf->rect, se->ibuf->rect);
|
||||||
break;
|
break;
|
||||||
case SEQ_GLOW:
|
case SEQ_GLOW:
|
||||||
do_glow_effect(seq, fac, facf, x, y, se1->ibuf->rect, se2->ibuf->rect, se->ibuf->rect);
|
do_glow_effect(seq, fac, facf, x, y, se1->ibuf->rect, se2->ibuf->rect, se->ibuf->rect);
|
||||||
|
Loading…
Reference in New Issue
Block a user