diff --git a/enmapboxprocessing/enmapalgorithm.py b/enmapboxprocessing/enmapalgorithm.py index 168900f6..67ea40cd 100644 --- a/enmapboxprocessing/enmapalgorithm.py +++ b/enmapboxprocessing/enmapalgorithm.py @@ -28,7 +28,8 @@ QgsProcessingParameterFileDestination, QgsProcessingParameterFile, QgsProcessingParameterRange, QgsProcessingParameterCrs, QgsProcessingParameterVectorDestination, QgsProcessing, QgsProcessingUtils, QgsProcessingParameterMultipleLayers, QgsProcessingException, - QgsProcessingParameterFolderDestination, QgsProject) + QgsProcessingParameterFolderDestination, QgsProject, QgsProcessingOutputLayerDefinition, + QgsProperty) from enmapbox.typeguard import typechecked @@ -424,6 +425,12 @@ def parameterAsOutputLayer( if filename == '': filename = parameters.get(name, '') + + if isinstance(filename, QgsProcessingOutputLayerDefinition): + sink: QgsProperty = filename.sink + filename = sink.toVariant()['val'] + assert isinstance(filename, str) + if filename == '': return None if not isabs(filename):