Skip to main content
1 of 2

how bout layer = qgis.utils.iface.activeLayer()? Dunmo why u still need to use it in latest qgis.