haz00 / blender-g3d-exporter

Export Blender scene to internal LibGDX format
GNU General Public License v3.0
12 stars 2 forks source link

Fix (bi)tangents not being exported correctly #5

Closed ScrelliCopter closed 1 year ago

ScrelliCopter commented 1 year ago

Without calling bpy.types.Mesh.calc_tangents() my models were being exported with tangent & bitangent fields all set to 0.0.

I'm not an expert at Blender scripting so if there's a more appropriate place to put this line let me know, but I found it needs to go before the attribute builders are constructed or UV coordinates get trashed.

haz00 commented 1 year ago

Okay, seems legit