diff --git a/openbr/plugins/meta.cpp b/openbr/plugins/meta.cpp index a30809f..840efdd 100644 --- a/openbr/plugins/meta.cpp +++ b/openbr/plugins/meta.cpp @@ -32,22 +32,23 @@ static TemplateList Expanded(const TemplateList &templates) { TemplateList expanded; foreach (const Template &t, templates) { + const bool enrollAll = t.file.get("enrollAll"); if (t.isEmpty()) { - if (!t.file.get("enrollAll", false)) + if (!enrollAll) expanded.append(t); continue; } - const bool fte = t.file.get("FTE", false); - QList points = t.file.points(); - QList rects = t.file.rects(); + const bool fte = t.file.get("FTE"); + const QList points = t.file.points(); + const QList rects = t.file.rects(); if (points.size() % t.size() != 0) qFatal("Uneven point count."); if (rects.size() % t.size() != 0) qFatal("Uneven rect count."); const int pointStep = points.size() / t.size(); const int rectStep = rects.size() / t.size(); for (int i=0; i("enrollAll", false)) { + if (!fte || !enrollAll) { expanded.append(Template(t.file, t[i])); expanded.last().file.setRects(rects.mid(i*rectStep, rectStep)); expanded.last().file.setPoints(points.mid(i*pointStep, pointStep));