[Bf-extensions-cvs] [80ad5c85] master: glTF importer: fix morph targets using specific indices list
Julien Duroure
noreply at git.blender.org
Fri Feb 22 19:12:10 CET 2019
Commit: 80ad5c85bd7b8818ec21f7019241a8f8409aa30d
Author: Julien Duroure
Date: Fri Feb 22 19:04:37 2019 +0100
Branches: master
https://developer.blender.org/rBA80ad5c85bd7b8818ec21f7019241a8f8409aa30d
glTF importer: fix morph targets using specific indices list
===================================================================
M io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
===================================================================
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
index b4263e34..3f69a5a2 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
@@ -132,7 +132,16 @@ class BlenderMesh():
shape_layer = bm.verts.layers.shape[current_shapekey_index]
gltf.shapekeys[i] = current_shapekey_index
- pos = BinaryData.get_data_from_accessor(gltf, prim.targets[i]['POSITION'])
+ original_pos = BinaryData.get_data_from_accessor(gltf, prim.targets[i]['POSITION'])
+
+ tmp_indices = {}
+ tmp_idx = 0
+ pos = []
+ for i in prim.tmp_indices:
+ if i[0] not in tmp_indices.keys():
+ tmp_indices[i[0]] = tmp_idx
+ tmp_idx += 1
+ pos.append(original_pos[i[0]])
for vert in bm.verts:
if vert.index not in range(offset_idx, offset_idx + prim.vertices_length):
More information about the Bf-extensions-cvs
mailing list