I'm making my first tool script in QGIS LTR (3.22.8). I'm following the answer given here about multiple layer parameters. I'm using the following code:
self.addParameter(
QgsProcessingParameterMultipleLayers(
self.INPUT,
self.tr('Input layers'),
[QgsProcessing.TypeVectorAnyGeometry]
)
)
I get this error:
ScriptEditorDialog.py", line 253, in runAlgorithm alg.initAlgorithm() File "", line 105, in initAlgorithm NameError: name 'QgsProcessingParameterMultipleLayers' is not defined
Why is this? I'm using the Python template, and the method QgsProcessingParameterMultipleLayers
appears in the autocomplete.