WIP: FBX: Fix #84111: AssertionError importing shapekeys #104910
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user