Moguri / BlenderPanda

Blender addon for integrating Panda3D
MIT License
76 stars 11 forks source link

Fix garbled mesh data for meshes with vertex color layers #35

Closed rdb closed 6 years ago

rdb commented 6 years ago

blendergltf adds vertex color data when custom vertex color layers are in use, but BlenderPanda does not add those columns to the vertex format, causing the stride calculation to be wrong and the mesh to become completely garbled.

This fixes it, although it would be more robust if BlenderPanda did not make assumptions about how blendergltf laid out its vertex data (though it might be easier to wait for the Panda glTF support to become available).

Moguri commented 6 years ago

Thanks for the fix! The glTF conversion code has a lot of issues and makes a lot of assumptions. I have been wanting to rewrite it for a while, but at this point I'm hoping the Panda glTF importer will replace it instead.