On Sat, 28 Jan 2023 at 05:35, C Hamilton via QGIS-Developer
wrote:
>
> I just received a request to update the Density Analysis plugin density hash
> algorithms so they work with multiple layers and produce one density map
> based off of multiple input layers. In the algorithm I have replaced
> QgsProcessingParameterFeatureSource with QgsProcessingParameterMultipleLayers.
>
> Is there a way to automatically populate as default value of selected layers
> in QgsProcessingParameterMultipleLayers with the selected layers or selected
> groups of layers in the "Layer Panel"? This would be incredibly useful.
You'd (unfortunately -- it's not a trivial change) need to do this via
a custom Processing widget wrapper, so that your parameter gets its
own widget class where you can implement this logic.
Nyall
>
> I am doing this as a QgsProcessingAlgorithm. The layerType to
> QgsProcessingParameterMultipleLayers is QgsProcessing.TypeVectorPoint.
>
> Thanks for your help.
>
> 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
___
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