WIP: FBX: Fix #84111: AssertionError importing shapekeys #104910

Closed
Mikhail Matrosov wants to merge 2 commits from ktdfly/blender-addons:main into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

View File

@ -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.