[QGIS-Developer] PyQGIS: how to retrieve symbolLayers in renderPass order

Tom Chadwin tom.chadwin at nnpa.org.uk
Sat May 13 03:49:02 PDT 2017

In the absence of such a method, I'm doing this:

symbolLayers = {}
for i in xrange(symbol.symbolLayerCount()):
    sl = symbol.symbolLayer(i)
    if renderer.usingSymbolLevels():
        k = sl.renderingPass()
        k = i
    symbolLayers[k] = sl
stackedSLs = sorted(symbolLayers.iterkeys())

I think it works:


If anyone has a better method, do let me know.


Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
View this message in context: http://osgeo-org.1560.x6.nabble.com/PyQGIS-how-to-retrieve-symbolLayers-in-renderPass-order-tp5320327p5320427.html
Sent from the QGIS - Developer mailing list archive at Nabble.com.

More information about the QGIS-Developer mailing list