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

Fix rotoscoping broken in some circumstances on cut clips

parent bbc4d01a
...@@ -698,13 +698,13 @@ QString KeyframeModel::getRotoProperty() const ...@@ -698,13 +698,13 @@ QString KeyframeModel::getRotoProperty() const
{ {
QJsonDocument doc; QJsonDocument doc;
if (auto ptr = m_model.lock()) { if (auto ptr = m_model.lock()) {
int in = 0; // ptr->data(m_index, AssetParameterModel::ParentInRole).toInt(); int in = ptr->data(m_index, AssetParameterModel::ParentInRole).toInt();
int out = ptr->data(m_index, AssetParameterModel::ParentDurationRole).toInt(); int out = in + ptr->data(m_index, AssetParameterModel::ParentDurationRole).toInt();
QMap<QString, QVariant> map; QVariantMap map;
for (const auto &keyframe : m_keyframeList) { 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(); 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