Commit aca44719 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix timeline keyframe position for opacity for affine and other non qtblend effects

parent 7570c1e2
......@@ -468,6 +468,11 @@ QVariant KeyframeModel::data(const QModelIndex &index, int role) const
if (!ok) {
qDebug() << "QLocale: Could not convert animated rect opacity" << data;
}
if (auto ptr = m_model.lock()) {
if (ptr->getAssetId() != QLatin1String("qtblend")) {
converted /= 100.;
}
}
return converted;
}
double val = it->second.second.toDouble();
......
......@@ -221,8 +221,14 @@ bool KeyframeModelList::updateKeyframe(GenTime oldPos, GenTime pos, const QVaria
if (m_parameters.at(m_inTimelineIndex) == param) {
if (isRectParam) {
if (normalizedVal.isValid()) {
double newValue = normalizedVal.toDouble();
if (auto ptr = m_model.lock()) {
if (ptr->getAssetId() != QLatin1String("qtblend")) {
newValue *= 100.;
}
}
value = param->getInterpolatedValue(oldPos);
value = param->updateInterpolated(value, normalizedVal.toDouble());
value = param->updateInterpolated(value, newValue);
}
} else {
value = normalizedVal;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment