On 13/09/2015 11:50, Nyall Dawson wrote: > On 11 September 2015 at 23:53, Hugo Mercier <[email protected]> wrote: > >> Another question: I am trying to access the current atlas geometry from >> a plugin, but fail to do so. >> From the python console, with a atlas in preview mode : >> QgsExpression.specialColumn("$atlasgeometry") -> None >> QgsExpression("$atlasgeometry").evaluate() -> None >> >> However, if I set a layer's label to "$atlasfeatureid", I get the right >> label ... >> >> Is it intended ? I guess that is because the "global" expression >> evaluation has no atlas context ? > > That's true. Is there any reason you aren't accessing the atlas > feature/geometry directly? Why go through the expression engine to > retrieve this?
Thanks for the clarification. I now retrieve it through the atlas composition in the new version of the plugin. _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
