I don't think it's possible yet to get the active layer or set visibility on the layer stack? (To use in conjunction with exporting)
I found this thread from 2020, so I assume it's still the same deal (No in Python and Maybe in Javascript):
https://forum.substance3d.com/index.php/topic,34974.0.htmlWould there be any good example out there with JavaScript to do this?