glTF exporter: fix 2.80 matrix issue

Was a bug in our double compatibility convertor 2.79 / 2.80
This commit is contained in:
Julien Duroure 2019-06-11 09:20:39 +02:00
parent 7317987baa
commit fcf7d4c16b
2 changed files with 4 additions and 2 deletions

View File

@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (0, 9, 24),
"version": (0, 9, 25),
'blender': (2, 80, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -66,8 +66,10 @@ def get_socket_or_texture_slot(blender_material: bpy.types.Material, name: str):
inputs = sum([[input for input in node.inputs if input.name == name] for node in nodes], [])
if inputs:
return inputs[0]
else:
pass
return None
@ -158,7 +160,7 @@ def get_texture_transform_from_texture_node(texture_node):
if abs(scale[0]) < 1e-5 or abs(scale[1]) < 1e-5:
return None
new_offset = Matrix.Rotation(-rotation, 3, 'Z') * Vector((-offset[0], -offset[1], 1))
new_offset = Matrix.Rotation(-rotation, 3, 'Z') @ Vector((-offset[0], -offset[1], 1))
new_offset[0] /= scale[0]; new_offset[1] /= scale[1]
return {
"offset": new_offset[0:2],