I have another problem with the script.
If I have a group layer and I hide it. It still exports the data in the json of the layers inside of it, and if the containing layers have some incompatibilities (like same name) then the png export stops , because even though the layer group is invisible, it seems that the layers inside of it, have the visibility active.
It would be great if the script would completely avoid looking into layer groups that have the visibility toggle switched off.
Thanks