[Bf-extensions-cvs] [fcf7d4c1] master: glTF exporter: fix 2.80 matrix issue

Julien Duroure noreply at git.blender.org
Tue Jun 11 10:54:48 CEST 2019


Commit: fcf7d4c16b17c34579fc080386425e0774a502d2
Author: Julien Duroure
Date:   Tue Jun 11 09:20:39 2019 +0200
Branches: master
https://developer.blender.org/rBAfcf7d4c16b17c34579fc080386425e0774a502d2

glTF exporter: fix 2.80 matrix issue

Was a bug in our double compatibility convertor 2.79 / 2.80

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/exp/gltf2_blender_get.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index ce044ab1..24bb39d9 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -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',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_get.py b/io_scene_gltf2/blender/exp/gltf2_blender_get.py
index cee28c5b..4916d5af 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_get.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_get.py
@@ -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],



More information about the Bf-extensions-cvs mailing list