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()
    else:
        k = i
    symbolLayers[k] = sl
stackedSLs = sorted(symbolLayers.iterkeys())

I think it works:

https://github.com/tomchadwin/qgis2web/commit/c5f4d457d32057ab6b6f56abab49d24008d20732

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

Tom



-----
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.
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to