added smooth keyframes

This commit is contained in:
itsmattkc
2018-11-08 22:23:16 +11:00
parent 2e3c1b2933
commit adf667bb69
4 changed files with 57 additions and 5 deletions
+8
View File
@@ -1259,6 +1259,14 @@ QVariant EffectField::validate_keyframe_data(double timecode, bool async) {
double progress;
get_keyframe_data(timecode, before_keyframe, after_keyframe, progress);
int kf_type = (progress < 0.5) ? parent_row->keyframe_types.at(before_keyframe) : parent_row->keyframe_types.at(after_keyframe);
if (kf_type == KEYFRAME_TYPE_SMOOTH) {
double b = 4;
double c = 1.313;
double x = (b * progress) - (b*0.5);
progress = (c*(qPow(M_E, x)/(qPow(M_E, x) + 1)))-((c-1)*0.5);
}
const QVariant& before_data = keyframe_data.at(before_keyframe);
switch (type) {
case EFFECT_FIELD_DOUBLE: