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

Drop MLT's composite transition for Slide transition.

Fixes #670
parent 82df289b
<!DOCTYPE kpartgui>
<transition tag="composite" id="slide" type="short">
<transition tag="affine" id="slide" type="short">
<name context="Slide Transition Name">Slide</name>
<description>Slide image from one side to another.</description>
<author>Dan Dennedy</author>
<parameter tag="geometry" type="wipe" default="0=-100% 0% 100% 100%;-1=0% 0% 100% 100%" name="geometry">
<parameter type="wipe" default="0=-100% 0% 100% 100% 100%;-1=0% 0% 100% 100% 100%" name="rect">
<name>Direction</name>
</parameter>
<parameter tag="aligned" default="0" type="bool" name="aligned" >
<name>Align</name>
</parameter>
<parameter tag="progressive" default="1" type="bool" name="progressive" >
<name>Force Progressive Rendering</name>
</parameter>
<parameter tag="deinterlace" default="0" type="bool" name="deinterlace" >
<name>Force Deinterlace Overlay</name>
</parameter>
</transition>
......@@ -3,12 +3,12 @@
<name context="Wipe Transition Name">Wipe</name>
<description>Applies a stationary transition between the current and next frames.</description>
<author>Dan Dennedy</author>
<parameter type="double" name="softness" max="100" min="0" default="0" factor="100">
<name>Softness</name>
</parameter>
<parameter type="urllist" name="luma" paramlist="%lumaPaths" filter="Luma files (*.png *.pgm)" newstuff=":data/kdenlive_wipes.knsrc" optional="1">
<name>Wipe Method</name>
</parameter>
<parameter type="double" name="softness" max="100" min="0" default="0" factor="100">
<name>Softness</name>
</parameter>
<parameter type="bool" name="luma_invert" max="1" min="0" default="0">
<name>Invert</name>
</parameter>
......
......@@ -1874,6 +1874,22 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
}
}
}
// Doc 1.03: Kdenlive 21.08.2
if (version < 1.04) {
// Slide: replace buggy composite transition with affine
QDomNodeList transitions = m_doc.elementsByTagName(QStringLiteral("transition"));
int max = transitions.count();
QStringList changedEffects;
for (int i = 0; i < max; ++i) {
QDomElement t = transitions.at(i).toElement();
QString kdenliveId = Xml::getXmlProperty(t, QStringLiteral("kdenlive_id"));
if (kdenliveId == QLatin1String("slide")) {
// Switch to affine and rect instead of composite and geometry
Xml::renameXmlProperty(t, QStringLiteral("geometry"), QStringLiteral("rect"));
Xml::setXmlProperty(t, QStringLiteral("mlt_service"), QStringLiteral("affine"));
}
}
}
m_modified = true;
return true;
......
......@@ -68,7 +68,7 @@
#include <xlocale.h>
#endif
const double DOCUMENTVERSION = 1.03;
const double DOCUMENTVERSION = 1.04;
KdenliveDoc::KdenliveDoc(const QUrl &url, QString projectFolder, QUndoGroup *undoGroup, const QString &profileName, const QMap<QString, QString> &properties,
const QMap<QString, QString> &metadata, const QPair<int, int> &tracks, int audioChannels, bool *openBackup, MainWindow *parent)
......
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