[Bf-extensions-cvs] [9fd05ef4] blender-v2.90-release: glTF importer: fix regression for primitives having different numbers of TEXCOORD_{n}s

Julien Duroure noreply at git.blender.org
Sat Aug 8 16:02:45 CEST 2020


Commit: 9fd05ef46664a8e1e6455ceeea2ff3d7dce84506
Author: Julien Duroure
Date:   Sat Aug 8 16:02:04 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rBA9fd05ef46664a8e1e6455ceeea2ff3d7dce84506

glTF importer: fix regression for primitives having different numbers of TEXCOORD_{n}s

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

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/imp/gltf2_blender_mesh.py

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

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index e3cd2918..3e8bb712 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, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
-    "version": (1, 3, 45),
+    "version": (1, 3, 46),
     'blender': (2, 90, 0),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
index e393eb86..e13b9c8f 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
@@ -200,7 +200,7 @@ def do_primitives(gltf, mesh_idx, skin_idx, mesh, ob):
                     uvs = BinaryData.decode_accessor(gltf, prim.attributes['TEXCOORD_%d' % uv_i], cache=True)
                     uvs = uvs[indices]
                 else:
-                    uvs = np.zeros((len(indices), 3), dtype=np.float32)
+                    uvs = np.zeros((len(indices), 2), dtype=np.float32)
                 loop_uvs[uv_i] = np.concatenate((loop_uvs[uv_i], uvs))
 
             for col_i in range(num_cols):



More information about the Bf-extensions-cvs mailing list