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

Fix automask bugs (initial zone incorrect and not displayed on monitor)

parent 7e5dabd4
Pipeline #3867 passed with stage
in 13 minutes and 42 seconds
......@@ -3,7 +3,7 @@
<name>Auto Mask</name>
<description>Hide a selected zone and follow its movements</description>
<author>Zachary Drew</author>
<parameter type="geometry" name="geometry" default="50%,50%:50%x50%" fixed="1" opacity="false">
<parameter type="geometry" name="geometry" default="50% 50% 50% 50%" fixed="1" opacity="false">
<name>Geometry</name>
</parameter>
<parameter type="constant" name="motion_est.macroblock_width" max="100" min="1" default="16" suffix="pixels">
......
......@@ -41,7 +41,8 @@ GeometryEditWidget::GeometryEditWidget(std::shared_ptr<AssetParameterModel> mode
const QString value = m_model->data(m_index, AssetParameterModel::ValueRole).toString().simplified();
int start = m_model->data(m_index, AssetParameterModel::ParentInRole).toInt();
int end = start + m_model->data(m_index, AssetParameterModel::ParentDurationRole).toInt();
Mlt::Geometry geometry(value.toUtf8().data(), end, frameSize.width(), frameSize.height());
QSize profileSize = pCore->getCurrentFrameSize();
Mlt::Geometry geometry(value.toUtf8().data(), end, profileSize.width(), profileSize.height());
Mlt::GeometryItem item;
QRect rect;
if (geometry.fetch(&item, 0) == 0) {
......
......@@ -175,6 +175,7 @@ GeometryWidget::GeometryWidget(Monitor *monitor, QPair<int, int> range, const QR
layout->addLayout(horLayout2);
slotUpdateGeometryRect(rect);
adjustSizeValue();
slotAdjustRectKeyframeValue();
}
void GeometryWidget::slotAdjustToSource()
......@@ -377,9 +378,7 @@ void GeometryWidget::slotUpdateGeometryRect(const QRect r)
m_spinWidth->blockSignals(false);
m_spinHeight->blockSignals(false);
m_monitor->setUpEffectGeometry(r);
// slotAdjustRectKeyframeValue();
emit valueChanged(getValue());
// setupMonitor();
}
void GeometryWidget::setValue(const QRect r, double opacity)
......
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