Fix rotoscoping broken in some circumstances on cut clips

parent 55be25e0
Pipeline #14845 passed with stage
in 16 minutes and 25 seconds
......@@ -698,13 +698,13 @@ QString KeyframeModel::getRotoProperty() const
{
QJsonDocument doc;
if (auto ptr = m_model.lock()) {
int in = 0; // ptr->data(m_index, AssetParameterModel::ParentInRole).toInt();
int out = ptr->data(m_index, AssetParameterModel::ParentDurationRole).toInt();
QMap<QString, QVariant> map;
int in = ptr->data(m_index, AssetParameterModel::ParentInRole).toInt();
int out = in + ptr->data(m_index, AssetParameterModel::ParentDurationRole).toInt();
QVariantMap map;
for (const auto &keyframe : m_keyframeList) {
map.insert(QString::number(in + keyframe.first.frames(pCore->getCurrentFps())).rightJustified(log10((double)out) + 1, '0'), keyframe.second.second);
map.insert(QString::number(keyframe.first.frames(pCore->getCurrentFps())).rightJustified(log10((double)out) + 1, '0'), keyframe.second.second);
}
doc = QJsonDocument::fromVariant(QVariant(map));
doc = QJsonDocument::fromVariant(map);
}
return doc.toJson();
}
......
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