Re: [Qgis-user] How to use QgsProcessingLayerPostProcessorInterface?

2021-01-20 Thread David Strip
On 1/20/2021 5:25 PM, Etienne Trimaille wrote: Can you try that? class Renamer(QgsProcessingLayerPostProcessorInterface): instance = None def postProcessLayer(self, layer, context, feedback): layer.setName('DiffLayer')

Re: [Qgis-user] How to use QgsProcessingLayerPostProcessorInterface?

2021-01-20 Thread Etienne Trimaille
Can you try that? class Renamer(QgsProcessingLayerPostProcessorInterface):instance = Nonedef postProcessLayer(self, layer, context, feedback): layer.setName('DiffLayer')@staticmethoddef create() -> 'Renamer':Renamer.instance = Renamer()return Renamer.instance In

[Qgis-user] How to use QgsProcessingLayerPostProcessorInterface?

2021-01-20 Thread qgis-user
I thought QgsProcessingLayerPostProcessorInterface might be a solution to my earlier question about renaming the output layer of Processing script. I derive a class and overload postProcessLayer: class Renamer (QgsProcessingLayerPostProcessorInterface):