diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index 6196e19c8..56810734c 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -1961,6 +1961,14 @@ def blen_read_shapes(fbx_tmpl, fbx_data, objects, me, scene): if len(vgweights) == 1 and nbr_indices > 1: vgweights = np.full_like(indices, vgweights[0], dtype=vgweights.dtype) + # Special case for trimmed weights with trailing zeroes + if len(vgweights) != nbr_indices: + # Pad with zeros + new_vgweights = np.zeros_like(indices, dtype=vgweights.dtype) + n = min(len(vgweights), nbr_indices) + new_vgweights[:n] = vgweights[:n] + vgweights = new_vgweights + assert(len(vgweights) == nbr_indices == len(dvcos)) # To add shape keys to the mesh, an Object using the mesh is needed.