diff --git a/openbr/plugins/template.cpp b/openbr/plugins/template.cpp index b771c4f..20af15d 100644 --- a/openbr/plugins/template.cpp +++ b/openbr/plugins/template.cpp @@ -162,15 +162,18 @@ class SelectPointsTransform : public UntrainableMetadataTransform { Q_OBJECT Q_PROPERTY(QList indices READ get_indices WRITE set_indices RESET reset_indices STORED false) + Q_PROPERTY(bool invert READ get_invert WRITE set_invert RESET reset_invert STORED false) // keep the points _not_ in the list BR_PROPERTY(QList, indices, QList()) + BR_PROPERTY(bool, invert, false) void projectMetadata(const File &src, File &dst) const { - dst = src; - QList origPoints = src.points(); - dst.clearPoints(); - for (int i = 0; i < indices.size(); i++) - dst.appendPoint(origPoints[indices[i]]); + const QList srcPoints = src.points(); + QList dstPoints; + for (int i=0; i