better ]shared transitions, dock tabs, effects panel name

This commit is contained in:
itsmattkc
2018-11-23 19:49:29 +11:00
parent 6ff379956c
commit 4a7abcdeaa
29 changed files with 171 additions and 146 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ CornerPinEffect::CornerPinEffect(Clip *c, const EffectMeta *em) : Effect(c, em)
fragPath = "cornerpin.frag";
}
void CornerPinEffect::process_coords(double timecode, GLTextureCoords &coords) {
void CornerPinEffect::process_coords(double timecode, GLTextureCoords &coords, int data) {
coords.vertexTopLeftX += top_left_x->get_double_value(timecode);
coords.vertexTopLeftY += top_left_y->get_double_value(timecode);
+1 -1
View File
@@ -7,7 +7,7 @@ class CornerPinEffect : public Effect {
Q_OBJECT
public:
CornerPinEffect(Clip* c, const EffectMeta* em);
void process_coords(double timecode, GLTextureCoords& coords);
void process_coords(double timecode, GLTextureCoords& coords, int data);
void process_shader(double timecode, GLTextureCoords& coords);
private:
EffectField* top_left_x;
+6 -4
View File
@@ -6,8 +6,10 @@ CrossDissolveTransition::CrossDissolveTransition(Clip* c, Clip* s, const EffectM
enable_coords = true;
}
void CrossDissolveTransition::process_coords(double progress, GLTextureCoords&) {
float color[4];
glGetFloatv(GL_CURRENT_COLOR, color);
glColor4f(1.0, 1.0, 1.0, color[3]*progress);
void CrossDissolveTransition::process_coords(double progress, GLTextureCoords&, int data) {
if (!(data == TA_CLOSING_TRANSITION && secondary_clip != NULL)) {
float color[4];
glGetFloatv(GL_CURRENT_COLOR, color);
glColor4f(1.0, 1.0, 1.0, color[3]*progress);
}
}
+1 -1
View File
@@ -6,7 +6,7 @@
class CrossDissolveTransition : public Transition {
public:
CrossDissolveTransition(Clip* c, Clip* s, const EffectMeta* em);
void process_coords(double timecode, GLTextureCoords &);
void process_coords(double timecode, GLTextureCoords &, int data);
};
#endif // CROSSDISSOLVETRANSITION_H
@@ -21,12 +21,10 @@ void ExponentialFadeTransition::process_audio(double timecode_start, double time
break;
}*/
switch (type) {
case TRAN_TYPE_OPEN:
case TRAN_TYPE_OPENWLINK:
case TA_OPENING_TRANSITION:
samp *= qPow(timecode_start + (interval * i), 2);
break;
case TRAN_TYPE_CLOSE:
case TRAN_TYPE_CLOSEWLINK:
case TA_CLOSING_TRANSITION:
samp *= qPow(1 - (timecode_start + (interval * i)), 2);
break;
}
+2 -4
View File
@@ -9,12 +9,10 @@ void LinearFadeTransition::process_audio(double timecode_start, double timecode_
qint16 samp = (qint16) (((samples[i+1] & 0xFF) << 8) | (samples[i] & 0xFF));
switch (type) {
case TRAN_TYPE_OPEN:
case TRAN_TYPE_OPENWLINK:
case TA_OPENING_TRANSITION:
samp *= timecode_start + (interval * i);
break;
case TRAN_TYPE_CLOSE:
case TRAN_TYPE_CLOSEWLINK:
case TA_CLOSING_TRANSITION:
samp *= 1 - (timecode_start + (interval * i));
break;
}
@@ -11,12 +11,10 @@ void LogarithmicFadeTransition::process_audio(double timecode_start, double time
qint16 samp = (qint16) (((samples[i+1] & 0xFF) << 8) | (samples[i] & 0xFF));
switch (type) {
case TRAN_TYPE_OPEN:
case TRAN_TYPE_OPENWLINK:
case TA_OPENING_TRANSITION:
samp *= qSqrt(timecode_start + (interval * i));
break;
case TRAN_TYPE_CLOSE:
case TRAN_TYPE_CLOSEWLINK:
case TA_CLOSING_TRANSITION:
samp *= qSqrt(1 - (timecode_start + (interval * i)));
break;
}
+1 -1
View File
@@ -47,7 +47,7 @@ ShakeEffect::ShakeEffect(Clip *c, const EffectMeta *em) : Effect(c, em) {
connect(frequency_val, SIGNAL(changed()), this, SLOT(field_changed()));
}
void ShakeEffect::process_coords(double timecode, GLTextureCoords& coords) {
void ShakeEffect::process_coords(double timecode, GLTextureCoords& coords, int data) {
int lim = RANDOM_VAL_SIZE/6;
double multiplier = intensity_val->get_double_value(timecode)/lim;
+1 -1
View File
@@ -9,7 +9,7 @@ class ShakeEffect : public Effect {
Q_OBJECT
public:
ShakeEffect(Clip* c, const EffectMeta* em);
void process_coords(double timecode, GLTextureCoords& coords);
void process_coords(double timecode, GLTextureCoords& coords, int data);
EffectField* intensity_val;
EffectField* rotation_val;
+1 -1
View File
@@ -114,7 +114,7 @@ void TransformEffect::toggle_uniform_scale(bool enabled) {
scale_y->set_enabled(!enabled);
}
void TransformEffect::process_coords(double timecode, GLTextureCoords& coords) {
void TransformEffect::process_coords(double timecode, GLTextureCoords& coords, int data) {
// position
glTranslatef(position_x->get_double_value(timecode)-(parent_clip->sequence->width/2), position_y->get_double_value(timecode)-(parent_clip->sequence->height/2), 0);
+1 -1
View File
@@ -8,7 +8,7 @@ class TransformEffect : public Effect {
public:
TransformEffect(Clip* c, const EffectMeta* em);
void refresh();
void process_coords(double timecode, GLTextureCoords& coords);
void process_coords(double timecode, GLTextureCoords& coords, int data);
EffectField* position_x;
EffectField* position_y;