From b92b326fe62db6c24cdf73c6cea7999771febae8 Mon Sep 17 00:00:00 2001 From: scurest Date: Wed, 29 Jul 2020 09:14:59 -0500 Subject: [PATCH] Import: bugfix for primitives having different numbers of UV sets UV should be 2-vectors, not 3-vectors, obviously. --- addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py b/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py index 175bc920e..9b273771e 100644 --- a/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py +++ b/addons/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):