Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

First steps towards opening older project files

parent 5fc470e9
......@@ -11,4 +11,7 @@ webvfx
affine
mix
region
luma
# luma should not be shown directly as a transition, but can be used in xml,
# so we should find a way to hide it from GUI without really blacklisting
#luma
......@@ -4,6 +4,7 @@ frei0r_cairoblend.xml
frei0r_cairoaffineblend.xml
wipe.xml
qtblend.xml
dissolve.xml
DESTINATION ${DATA_INSTALL_DIR}/kdenlive/transitions)
......
<!DOCTYPE kpartgui>
<transition tag="luma" id="dissolve">
<name>Dissolve</name>
<description>Fade out one video while fading in the other video.</description>
<parameter type="bool" name="reverse" default="0">
<name>Reverse</name>
</parameter>
</transition>
......@@ -1683,13 +1683,16 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
}
}
if (version < 0.96) {
// Check image sequences with buggy begin frame number
QDomNodeList producers = m_doc.elementsByTagName(QStringLiteral("producer"));
int max = producers.count();
for (int i = 0; i < max; ++i) {
QDomElement prod = producers.at(i).toElement();
if (prod.isNull()) continue;
// Move to new kdenlive:id format
const QString id = prod.attribute(QStringLiteral("id")).section(QLatin1Char('_'), 0, 0);
EffectsList::setProperty(prod, QStringLiteral("kdenlive:id"), id);
const QString service = EffectsList::property(prod, QStringLiteral("mlt_service"));
// Check image sequences with buggy begin frame number
if (service == QLatin1String("pixbuf") || service == QLatin1String("qimage")) {
QString resource = EffectsList::property(prod, QStringLiteral("resource"));
if (resource.contains(QStringLiteral("?begin:"))) {
......
......@@ -2880,7 +2880,6 @@ void MainWindow::slotClipInTimeline(const QString &clipId, QList <int> ids)
QList<QAction *> actionList;
for (int i = 0; i < ids.count(); ++i) {
QString track = getMainTimeline()->controller()->getTrackNameFromIndex(pCore->getItemTrack(ObjectId(ObjectType::TimelineClip, ids.at(i))));
qDebug()<<"// TK NAME FOR: "<<ids.at(i)<<" = "<<track;
QString start = pCore->currentDoc()->timecode().getTimecodeFromFrames(pCore->getItemIn(ObjectId(ObjectType::TimelineClip, ids.at(i))));
int j = 0;
QAction *a = new QAction(track + QStringLiteral(": ") + start, inTimelineMenu);
......
......@@ -50,7 +50,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
QLatin1String("black_track")};
bool ok = true;
qDebug() << "//////////////////////\nTrying to construct" << tractor.count() << "tracks.\n////////////////////////////////7";
qDebug() << "//////////////////////\nTrying to construct" << tractor.count() << "tracks.\n////////////////////////////////";
for (int i = 0; i < tractor.count() && ok; i++) {
std::unique_ptr<Mlt::Producer> track(tractor.track(i));
QString playlist_name = track->get("id");
......@@ -100,7 +100,11 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
if (service->type() == transition_type) {
Mlt::Transition t((mlt_transition)service->get_service());
int compoId;
QString id(t.get("mlt_service"));
QString id(t.get("kdenlive_id"));
if (id.isEmpty()) {
qDebug()<<"// Warning, this should not happen, transition without id: "<<t.get("id")<<" = "<<t.get("mlt_service");
id = t.get("mlt_service");
}
QString internal(t.get("internal_added"));
if (internal.isEmpty()) {
ok = timeline->requestCompositionInsertion(id, timeline->getTrackIndexFromPosition(t.get_b_track() - 1), t.get_a_track(), t.get_in(), t.get_length(), compoId, undo, redo);
......@@ -165,13 +169,13 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
switch (clip->type()) {
case unknown_type:
case producer_type: {
QString binId = clip->get("kdenlive:id");
QString binId = clip->parent().get("kdenlive:id");
bool ok = false;
if (pCore->bin()->getBinClip(binId)) {
int cid = ClipModel::construct(timeline, binId, clip);
ok = timeline->requestClipMove(cid, tid, position, true, undo, redo);
} else {
qDebug() << "// Cannot find bin clip: " << binId;
qDebug() << "// Cannot find bin clip: " << binId<<" - "<< clip->get("id");
}
if (!ok) {
qDebug() << "ERROR : failed to insert clip in track" << tid << "position" << position;
......
......@@ -131,6 +131,7 @@ Mlt::Transition *TransitionsRepository::getTransition(const QString &transitionI
QString service_name = m_assets.at(transitionId).mltId;
// We create the Mlt element from its name
Mlt::Transition *transition = new Mlt::Transition(pCore->getCurrentProfile()->profile(), service_name.toLatin1().constData(), nullptr);
transition->set("kdenlive_id", transitionId.toUtf8().constData());
return transition;
}
......
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