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

Fix position and zoom effect and affine composition broken with switch to MLT7.

Fixes #1150
parent 9b828c4b
......@@ -3,7 +3,7 @@
<name>Position and Zoom</name>
<description>Adjust size and position of clip</description>
<author>Charles Yates</author>
<parameter type="animatedrect" name="transition.geometry" default="0 0 %width %height" opacity="false">
<parameter type="animatedrect" name="transition.rect" default="0 0 %width %height" opacity="false">
<name>Rectangle</name>
</parameter>
<parameter type="bool" name="transition.distort" default="0">
......
......@@ -3,7 +3,7 @@
<name context="Affine Transform Transition Name">Transform</name>
<description>Perform an affine transform on for compositing.</description>
<author>Charles Yates</author>
<parameter type="animatedrect" name="geometry" default="0 0 %width %height 100">
<parameter type="animatedrect" name="rect" default="0 0 %width %height 100">
<name>Rectangle</name>
</parameter>
<parameter type="keyframe" name="rotate_x" max="1800" min="-1800" default="0" factor="10" notintimeline="1">
......
......@@ -1742,7 +1742,8 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
}
}
if (version < 1.01) {
// Upgrade wipe composition (replace old mlt geometry with mlt rect
// Upgrade wipe composition replace old mlt geometry with mlt rect
// Upgrade affine effect and transition (geometry parameter renamed to rect)
// Warn about deprecated automask
// Some tracks were added, adjust compositions
QDomNodeList transitions = m_doc.elementsByTagName(QStringLiteral("transition"));
......@@ -1757,6 +1758,17 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
Xml::setXmlProperty(t, QStringLiteral("geometry"), QStringLiteral("0=0% 0% 100% 100% 0%;-1=0% 0% 100% 100% 100%"));
}
}
else if (Xml::getXmlProperty(t, QStringLiteral("kdenlive_id")) == QLatin1String("affine")) {
Xml::renameXmlProperty(t, QStringLiteral("geometry"), QStringLiteral("rect"));
}
}
QDomNodeList effects = m_doc.elementsByTagName(QStringLiteral("filter"));
max = effects.count();
for (int i = 0; i < max; ++i) {
QDomElement t = effects.at(i).toElement();
if (Xml::getXmlProperty(t, QStringLiteral("kdenlive_id")) == QLatin1String("pan_zoom")) {
Xml::renameXmlProperty(t, QStringLiteral("transition.geometry"), QStringLiteral("transition.rect"));
}
}
}
m_modified = true;
......
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