Fix #139: PSA import does not work on Blender 5.0

This commit is contained in:
Colin Basnett
2025-11-27 12:52:40 -08:00
parent 3153be3cdf
commit 1bac8b2b30
6 changed files with 44 additions and 18 deletions

View File

@@ -345,7 +345,10 @@ def create_psx_bones(
coordinate_system_matrix = get_coordinate_system_transform(forward_axis, up_axis)
coordinate_system_default_rotation = coordinate_system_matrix.to_quaternion()
total_bone_count = sum(len(armature_object.data.bones) for armature_object in armature_objects)
total_bone_count = 0
for armature_object in filter(lambda x: x.data is not None, armature_objects):
armature_data = typing_cast(Armature, armature_object.data)
total_bone_count += len(armature_data.bones)
# Store the bone names to be exported for each armature object.
armature_object_bone_names: Dict[Object, List[str]] = dict()