I've a QGIS project with several vector layers that I need to be represented in a layout I've prepared one by one.
I can manually make visible and select one layer at a time, so that the layout after a refresh shows the desired layer map and legend (where I've selected only show items in the selected map in the interface). I'm able to select layers by name, and also 'activate' them, but I'm not finding a way to set visibility and active in a PyQGIS script for the layers one by one to automate the export of the layers maps with the layout.