I have had a working exporter for a custom format that worked fine on 2.79, when i moved to 2.8 everything works besides one issue that i cannot seem to understand. Could you please help me out? The issue is when i write more then 1 UV layer, the second layer is always bugged.

 uv_0 = mesh.uv_layers[0].data
    if len(mesh.uv_layers) > 1:
        uv_1 = mesh.uv_layers[1].data

I get the UV data in this way. Then i loop though the faces.

    for Face in mesh.polygons : 
    for loop_idx in Face.loop_indices:

        vtx_2tc.TC0 = V2D(uv_0[loop_idx].uv.x, 1.0 - uv_0[loop_idx].uv.y)
        vtx_2tc.TC1 = V2D(uv_1[loop_idx].uv.x, 1.0 - uv_1[loop_idx].uv.y)

Which worked perfectly fine in 2.79 and lower, the second UV was correct. However in 2.8 the second UV layer doesn't write properly. Half the mesh's second UV is working, half isn't. And i'm not sure where the issue is.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.