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

Fix keyframe corruption on project opening (was creating unexpected keyframe at 0)

parent a80ff117
Pipeline #4677 passed with stage
in 23 minutes
...@@ -768,6 +768,8 @@ void KeyframeModel::parseAnimProperty(const QString &prop) ...@@ -768,6 +768,8 @@ void KeyframeModel::parseAnimProperty(const QString &prop)
out = ptr->data(m_index, AssetParameterModel::ParentDurationRole).toInt(); out = ptr->data(m_index, AssetParameterModel::ParentDurationRole).toInt();
ptr->passProperties(mlt_prop); ptr->passProperties(mlt_prop);
useOpacity = ptr->data(m_index, AssetParameterModel::OpacityRole).toBool(); useOpacity = ptr->data(m_index, AssetParameterModel::OpacityRole).toBool();
} else {
qDebug()<<"###################\n\n/// ERROR LOCKING MODEL!!! ";
} }
mlt_prop.set("key", prop.toUtf8().constData()); mlt_prop.set("key", prop.toUtf8().constData());
// This is a fake query to force the animation to be parsed // This is a fake query to force the animation to be parsed
......
...@@ -397,6 +397,8 @@ int Core::getItemIn(const ObjectId &id) ...@@ -397,6 +397,8 @@ int Core::getItemIn(const ObjectId &id)
case ObjectType::TimelineClip: case ObjectType::TimelineClip:
if (m_mainWindow->getCurrentTimeline()->controller()->getModel()->isClip(id.second)) { if (m_mainWindow->getCurrentTimeline()->controller()->getModel()->isClip(id.second)) {
return m_mainWindow->getCurrentTimeline()->controller()->getModel()->getClipIn(id.second); return m_mainWindow->getCurrentTimeline()->controller()->getModel()->getClipIn(id.second);
} else {
qDebug()<<"// ERROR QUERYING NON CLIP PROPERTIES\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!";
} }
break; break;
case ObjectType::TimelineComposition: case ObjectType::TimelineComposition:
......
...@@ -111,9 +111,9 @@ int ClipModel::construct(const std::shared_ptr<TimelineModel> &parent, const QSt ...@@ -111,9 +111,9 @@ int ClipModel::construct(const std::shared_ptr<TimelineModel> &parent, const QSt
} }
auto result = binClip->giveMasterAndGetTimelineProducer(id, producer, state); auto result = binClip->giveMasterAndGetTimelineProducer(id, producer, state);
std::shared_ptr<ClipModel> clip(new ClipModel(parent, result.first, binClipId, id, state, speed)); std::shared_ptr<ClipModel> clip(new ClipModel(parent, result.first, binClipId, id, state, speed));
clip->setClipState_lambda(state)(); clip->setClipState_lambda(state);
clip->m_effectStack->importEffects(producer, state, result.second);
parent->registerClip(clip); parent->registerClip(clip);
clip->m_effectStack->importEffects(producer, state, result.second);
clip->m_clipMarkerModel->setReferenceModel(binClip->getMarkerModel(), speed); clip->m_clipMarkerModel->setReferenceModel(binClip->getMarkerModel(), speed);
return id; return id;
} }
......
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