[Qgis-developer] transparency for all raster in the group
wonder.sk at gmail.com
Sun Dec 21 06:10:43 PST 2014
On Thu, Dec 18, 2014 at 3:35 AM, Martin Landa <landa.martin at gmail.com>
> is it possible in QGIS to change transparency for all rasters in the
> group? Or is there any plugin for that?
Not sure if there is any plugin for that - but the code to do it is simple
(in QGIS >= 2.4).
Assuming your group is the first item in the layer tree:
root = QgsProject.instance().layerTreeRoot()
group = root.children()
for ch in group.children():
if isinstance(ch, QgsLayerTreeLayer) and isinstance(ch.layer(),
(opacity should be in range 0-1)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer