I still need to write up the code and debug it, but I'm positive that I have figured out a way to find out each layer's visible (eyes checkbox) setting. I was working out a way to get all of the layer objects (MohoLayer) for improvements to my select layer script, and it turns out that the method I'm using to get these through the script interface is exactly the same order that the layers appear in the file format.
So I can just parse the file format for 'visible' and add these to a table in the order they're found. Matching the indices of the two tables will allow me to exclude non-visible layers from being selected.
-------------------------------------------------------------
This got me thinking. My select layer tool behaves oddly once the layer order has been animated. It searches through layers based on the frame zero order (which appears to be the base value for layer sorting). But I can now get the sorting values and fix this (though I haven't yet figured out how to implement that).
-----------------------------------------------------------
Using this layer object table, I think I can even manage to (eventually) get a mesh and bone instance to work without the original layers being embedded with the layer script.
Do layer scripts treat the layer they are embedded in as the 'current' layer (i.e. moho.layer)? If so, how would I get the currently selected layer in a layer script?
--------------------------------------------------------
Just sort of thinking outloud for now. As soon as I have something useful, I'll post it. If anyone wants any details on any of this, just ask.
