getCachedGeom() question
What is the correct way to get UVs, when the surface might have say, 5 uvsets, and the user has selected something other than the default uvset?
Given this:
var obj = node.getObject();var uvset = obj.getCachedGeom().getUVs();
What uvset is returned from getCachedGeom() ?
Is this the currently selected uvset, or does it always return uvset 0 ?
Another question. How do I know if the currently selected uvset is compatible with my mesh? Let me give an example of what I mean. Let's say I load the Genesis 2 Male. Under surfaces, I select Pupils. I see that there are 5 UVsets loaded for this surface.
Ok, so let's say I want to load G2F eye textures for this G2M, so I load them. I now see that there are 6 uvsets loaded for G2M's pupil surface. The extra uvset that was loaded is called "Base Female".
Now, I'm sure this "Base Female" uvset is not compatible with G2M's mesh. So, what's happening here? Is it really using the "Base Female" uvset, or is it bugging out?
Comments
Well, after messing around, I have come to one conclusion. Cached geometry can only be used with cached UVs. You can't mix cached geometry and non-cached UVs.
And without knowing where getCachedGeom() gets its UVs, I have no idea what uvset it's using. The docs don't say how cached geometry and cached UVs are built.