[QGIS-Developer] How to Access Renderer Style Info in	Processing Algorithms
    Nyall Dawson 
    nyall.dawson at gmail.com
       
    Thu Aug  6 16:04:47 PDT 2020
    
    
  
On Fri, 7 Aug 2020 at 02:57, C Hamilton <adenaculture at gmail.com> wrote:
>
> How do I access a layer's style information in the processing algorithm. If it was outside processing it would be layer.renderer(). As far as I can tell I cannot access it from a QgsProcessingParameterFeatureSource.
You can't, if it's a feature source. A feature source isn't
necessarily a vector layer, and accordingly doesn't have a renderer.
If you want to write an algorithm which modifies a renderer then the
algorithm should defined a QgsProcessingParameterVectorLayer instead.
Nyall
    
    
More information about the QGIS-Developer
mailing list