UV data location in DNA struct

Hey Guys,

I’m work on a C++ .blend parser and have already access to the most of needed data.

My mesh has 3 uv channels (texture, lightmap, shadowmap) and I have already access to the first one.

Location in DNA struct:
Object -> data -> mloopuv

struct mloopuv:
float uv[2]
float flag

My first thought was that the other two uv channels would be behind the first. But that seems not correct.

Hope you guys can give me a hint, where to find it in the DNA struct.

Thanks.

UVs are handled as generic custom mesh data layers. They are in the mesh->ldata list with type CD_MLOOPUV. All mesh data arrays are custom data layers in fact, pointers like mvert and mloopuv are there for convenience.

Hey brecht,

Thanks a lot! You saved my day!

Solution:

mesh -> ldata -> data | Data from UV channel 1

Behind this (ldata) data block is UV channel 2 and 3 (as many as you have).

ldata->type = 16 (CD_MLOOPUV)