X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprojectlist.cpp;h=42a93190d0add61a22b9cb39d694811a4b0bd9eb;hb=8e035c977776259f445bed1cbc688a17caba1d67;hp=231e6e4f7a78e4ffeb76f31de44d0febe862cbc8;hpb=2f1e393bc3268c563c31ccd1be999e021c0de14f;p=kdenlive diff --git a/src/projectlist.cpp b/src/projectlist.cpp index 231e6e4f..42a93190 100644 --- a/src/projectlist.cpp +++ b/src/projectlist.cpp @@ -3516,6 +3516,10 @@ void ProjectList::startClipFilterJob(const QString &filterName, const QString &c extraParams.insert("projecttreefilter", "1"); QString keyword("%count"); extraParams.insert("resultmessage", i18n("Found %1 scenes.", keyword)); + if (ui.zone_only->isChecked()) { + // We want to create markers + extraParams.insert("zoneonly", "1"); + } if (ui.add_markers->isChecked()) { // We want to create markers extraParams.insert("addmarkers", QString::number(ui.marker_type->currentIndex())); @@ -3556,6 +3560,13 @@ void ProjectList::processClipJob(QStringList ids, const QString&destination, boo ProjectItem *item = getItemById(id); if (!item) continue; QStringList jobArgs; + if (extraParams.contains("zoneonly")) { + // Analyse clip zone only, remove in / out and replace with zone + preParams.takeFirst(); + preParams.takeFirst(); + QPoint zone = item->referencedClip()->zone(); + jobArgs << QString::number(zone.x()) << QString::number(zone.y()); + } jobArgs << preParams; if (ids.count() == 1) { jobArgs << consumer + ':' + destination; @@ -3647,6 +3658,7 @@ void ProjectList::slotGotFilterJobResults(QString id, int , int , stringMap resu } bool dataProcessed = false; QString key = filterInfo.value("key"); + int offset = filterInfo.value("offset").toInt(); QStringList value = results.value(key).split(';', QString::SkipEmptyParts); kDebug()<<"// RESULT; "<childCount() == 0) @@ -3686,7 +3698,7 @@ void ProjectList::slotGotFilterJobResults(QString id, int , int , stringMap resu int newPos = pos.section("=", 0, 0).toInt(); // Don't use scenes shorter than 1 second if (newPos - cutPos < 24) continue; - CommentedTime m(GenTime(newPos, m_fps), QString::number(index), markersType); + CommentedTime m(GenTime(newPos + offset, m_fps), QString::number(index), markersType); markersList << m; index++; cutPos = newPos;