From a95c9302c8d0e7c19fd3de603ffe9597317e4754 Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Wed, 2 Feb 2022 02:18:14 -0800 Subject: [PATCH] Fixed a bug where the error message that would warn about duplicate root bones would not list the correct bones. --- io_scene_psk_psa/psa/builder.py | 2 +- io_scene_psk_psa/psk/builder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/io_scene_psk_psa/psa/builder.py b/io_scene_psk_psa/psa/builder.py index 825676a..276d7a9 100644 --- a/io_scene_psk_psa/psa/builder.py +++ b/io_scene_psk_psa/psa/builder.py @@ -54,7 +54,7 @@ class PsaBuilder(object): # Ensure that the exported hierarchy has a single root bone. root_bones = [x for x in bones if x.parent is None] if len(root_bones) > 1: - root_bone_names = [x.name for x in bones] + root_bone_names = [x.name for x in root_bones] raise RuntimeError('Exported bone hierarchy must have a single root bone.' f'The bone hierarchy marked for export has {len(root_bones)} root bones: {root_bone_names}') diff --git a/io_scene_psk_psa/psk/builder.py b/io_scene_psk_psa/psk/builder.py index c715f39..44425cc 100644 --- a/io_scene_psk_psa/psk/builder.py +++ b/io_scene_psk_psa/psk/builder.py @@ -91,7 +91,7 @@ class PskBuilder(object): print('root bones') print(root_bones) if len(root_bones) > 1: - root_bone_names = [x.name for x in bones] + root_bone_names = [x.name for x in root_bones] raise RuntimeError('Exported bone hierarchy must have a single root bone.' f'The bone hierarchy marked for export has {len(root_bones)} root bones: {root_bone_names}')