We will look at this again, but I believe the group/component/entity will report its own material and not the "Color by Layer" material.
But we will try it. It would be a shame to miss the obvious answer.
TextureHelper lets us save copies of the texture file for the layer, but neither Texture Helper of UVQHelper seem to let us access the texture size.
@unknownuser said:
What's wrong with this agonizing approach:
create an "array entry" for every layer
For every group/component/entity...
determine if it has any material associated with it
if so, for it's layer "array entry", add the material to it as a subarray
When done, you have an array of layers, and each layer records the materials in it.
From the first post, I thought I was missing the obvious. This is the obvious approach.
Since materials don't have layers, but objects have both materials and layers, you just have to run the objects and make your own list. From my perspective, no big deal - it's just not a quick call to any singe method to get it done.
Todd