I am working on making some of my QGIS plugin capabilities into processing algorithms. When defining input parameter characteristics for the GeoAlgorithm I want to do something like this:
self.addParameter(ParameterVector(self.LAYER, 'Line or polygon layer', ParameterVector.VECTOR_TYPE_LINE | ParameterVector.VECTOR_TYPE_POLYGON)) I would like it to accept both a LINE and POLYGON layers. I was guessing that ORing the two together would work. It does not and when I try it I don't see any of my vector layers. If I use ParameterVector.VECTOR_TYPE_LINE or ParameterVector.VECTOR_TYPE_POLYGON alone then I get the respective line or polygon layers listed in my input vector selection drop down. I would use VECTOR_TYPE_ALL, but I don't want points listed. Do I need make two geo algorithms, one of lines and the other for polygons or am I doing something wrong? I am using QGIS 2.18.16 on Windows. Thanks, Calvin
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer