Apply track effects on main playlist and not on tractor.

BUG: 414367
parent 471d0a30
......@@ -42,6 +42,7 @@ TrackModel::TrackModel(const std::weak_ptr<TimelineModel> &parent, int id, const
m_playlists[1].set_profile(*ptr->getProfile());
m_track->insert_track(m_playlists[0], 0);
m_track->insert_track(m_playlists[1], 1);
m_mainPlaylist = std::make_shared<Mlt::Producer>(&m_playlists[0]);
if (!trackName.isEmpty()) {
m_track->set("kdenlive:track_name", trackName.toUtf8().constData());
}
......@@ -52,7 +53,11 @@ TrackModel::TrackModel(const std::weak_ptr<TimelineModel> &parent, int id, const
}
}
m_track->set("kdenlive:trackheight", KdenliveSettings::trackheight());
m_effectStack = EffectStackModel::construct(m_track, {ObjectType::TimelineTrack, m_id}, ptr->m_undoStack);
m_effectStack = EffectStackModel::construct(m_mainPlaylist, {ObjectType::TimelineTrack, m_id}, ptr->m_undoStack);
// TODO
// When we use the second playlist, register it's stask as child of main playlist effectstack
// m_subPlaylist = std::make_shared<Mlt::Producer>(&m_playlists[1]);
// m_effectStack->addService(m_subPlaylist);
QObject::connect(m_effectStack.get(), &EffectStackModel::dataChanged, [&](const QModelIndex &, const QModelIndex &, QVector<int> roles) {
if (auto ptr2 = m_parent.lock()) {
QModelIndex ix = ptr2->makeTrackIndexFromID(m_id);
......
......@@ -277,6 +277,7 @@ private:
// We fake two playlists to allow same track transitions.
std::shared_ptr<Mlt::Tractor> m_track;
std::shared_ptr<Mlt::Producer> m_mainPlaylist;
Mlt::Playlist m_playlists[2];
std::map<int, std::shared_ptr<ClipModel>> m_allClips; /*this is important to keep an
......
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