FBX IO: Fix error importing BlendShapeChannels with extraneous FullWeights #104956
@ -3547,8 +3547,8 @@ def load(operator, context, filepath="",
|
|||||||
# shape -> blendshapechannel -> blendshape -> mesh.
|
# shape -> blendshapechannel -> blendshape -> mesh.
|
||||||
for bc_uuid, fbx_bcdata, _bl_bcdata in connections_gen(s_uuid, b'Deformer', b'BlendShapeChannel'):
|
for bc_uuid, fbx_bcdata, _bl_bcdata in connections_gen(s_uuid, b'Deformer', b'BlendShapeChannel'):
|
||||||
# Track the Shapes connected to each BlendShapeChannel.
|
# Track the Shapes connected to each BlendShapeChannel.
|
||||||
shapes_assigned_to_channel = blend_shape_channel_to_shapes.setdefault(bc_uuid, set())
|
shapes_assigned_to_channel = blend_shape_channel_to_shapes.setdefault(bc_uuid, [])
|
||||||
shapes_assigned_to_channel.add(s_uuid)
|
shapes_assigned_to_channel.append(s_uuid)
|
||||||
for bs_uuid, _fbx_bsdata, _bl_bsdata in connections_gen(bc_uuid, b'Deformer', b'BlendShape'):
|
for bs_uuid, _fbx_bsdata, _bl_bsdata in connections_gen(bc_uuid, b'Deformer', b'BlendShape'):
|
||||||
for m_uuid, _fbx_mdata, bl_mdata in connections_gen(bs_uuid, b'Geometry', b'Mesh'):
|
for m_uuid, _fbx_mdata, bl_mdata in connections_gen(bs_uuid, b'Geometry', b'Mesh'):
|
||||||
# Blenmeshes are assumed already created at that time!
|
# Blenmeshes are assumed already created at that time!
|
||||||
@ -3570,7 +3570,7 @@ def load(operator, context, filepath="",
|
|||||||
shapes_list = mesh_to_shapes[bl_mdata][1]
|
shapes_list = mesh_to_shapes[bl_mdata][1]
|
||||||
# Only the number of shapes assigned to each BlendShapeChannel needs to be passed through to
|
# Only the number of shapes assigned to each BlendShapeChannel needs to be passed through to
|
||||||
# `blen_read_shapes`, but that number isn't known until all the connections have been
|
# `blen_read_shapes`, but that number isn't known until all the connections have been
|
||||||
# iterated, so pass the `shapes_assigned_to_channel` set instead.
|
# iterated, so pass the `shapes_assigned_to_channel` list instead.
|
||||||
shapes_list.append((bc_uuid, fbx_sdata, fbx_bcdata, shapes_assigned_to_channel))
|
shapes_list.append((bc_uuid, fbx_sdata, fbx_bcdata, shapes_assigned_to_channel))
|
||||||
# BlendShape deformers are only here to connect BlendShapeChannels to meshes, nothing else to do.
|
# BlendShape deformers are only here to connect BlendShapeChannels to meshes, nothing else to do.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user