glTF exporter: Fix T102066: typo - fix crash exporting with tangents
This commit is contained in:
parent
8457285056
commit
4be7119ac5
Notes:
blender-bot
2023-02-13 14:09:53 +01:00
Referenced by issue blender/blender#102066, Blender is no longer able to export .gltf objects with tangents
|
@ -4,7 +4,7 @@
|
|||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (3, 4, 40),
|
||||
"version": (3, 4, 41),
|
||||
'blender': (3, 3, 0),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -747,7 +747,7 @@ class PrimitiveCreator:
|
|||
|
||||
def __get_bitangent_signs(self):
|
||||
self.signs = np.empty(len(self.blender_mesh.loops), dtype=np.float32)
|
||||
self.blender_mesh.loops.foreach_get('bitangent_sign', signs)
|
||||
self.blender_mesh.loops.foreach_get('bitangent_sign', self.signs)
|
||||
|
||||
# Transform for skinning
|
||||
if self.armature and self.blender_object:
|
||||
|
@ -757,7 +757,7 @@ class PrimitiveCreator:
|
|||
tangent_transform = apply_matrix.to_quaternion().to_matrix()
|
||||
flipped = tangent_transform.determinant() < 0
|
||||
if flipped:
|
||||
signs *= -1
|
||||
self.signs *= -1
|
||||
|
||||
# No change for Zup -> Yup
|
||||
|
||||
|
|
Loading…
Reference in New Issue