Skip to content

Commit

Permalink
Merge pull request #1152 from scurest/fix-uv
Browse files Browse the repository at this point in the history
Import: bugfix for primitives having different numbers of TEXCOORD_{n}s
  • Loading branch information
julienduroure authored Aug 8, 2020
2 parents 3730fce + b92b326 commit 825aaf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 825aaf3

Please sign in to comment.