Fix for issue where using case insensitive bone mapping would fail
Also made case-insensitive bone mapping the default for PSA import
This commit is contained in:
@@ -71,7 +71,8 @@ class PSA_PG_import(PropertyGroup):
|
|||||||
('EXACT', 'Exact', 'Bone names must match exactly.', 'EXACT', 0),
|
('EXACT', 'Exact', 'Bone names must match exactly.', 'EXACT', 0),
|
||||||
('CASE_INSENSITIVE', 'Case Insensitive', 'Bones names must match, ignoring case (e.g., the bone PSA bone '
|
('CASE_INSENSITIVE', 'Case Insensitive', 'Bones names must match, ignoring case (e.g., the bone PSA bone '
|
||||||
'\'root\' can be mapped to the armature bone \'Root\')', 'CASE_INSENSITIVE', 1),
|
'\'root\' can be mapped to the armature bone \'Root\')', 'CASE_INSENSITIVE', 1),
|
||||||
)
|
),
|
||||||
|
default='CASE_INSENSITIVE'
|
||||||
)
|
)
|
||||||
fps_source: EnumProperty(name='FPS Source', items=(
|
fps_source: EnumProperty(name='FPS Source', items=(
|
||||||
('SEQUENCE', 'Sequence', 'The sequence frame rate matches the original frame rate', 'ACTION', 0),
|
('SEQUENCE', 'Sequence', 'The sequence frame rate matches the original frame rate', 'ACTION', 0),
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ def import_psa(context: Context, psa_reader: PsaReader, armature_object: Object,
|
|||||||
if armature_bone_index is not None:
|
if armature_bone_index is not None:
|
||||||
# Ensure that no other PSA bone has been mapped to this armature bone yet.
|
# Ensure that no other PSA bone has been mapped to this armature bone yet.
|
||||||
if armature_bone_index not in armature_to_psa_bone_indices:
|
if armature_bone_index not in armature_to_psa_bone_indices:
|
||||||
psa_to_armature_bone_indices[psa_bone_index] = armature_bone_names.index(psa_bone_name)
|
psa_to_armature_bone_indices[psa_bone_index] = armature_bone_index
|
||||||
armature_to_psa_bone_indices[armature_bone_index] = psa_bone_index
|
armature_to_psa_bone_indices[armature_bone_index] = psa_bone_index
|
||||||
else:
|
else:
|
||||||
# This armature bone has already been mapped to a PSA bone.
|
# This armature bone has already been mapped to a PSA bone.
|
||||||
|
|||||||
Reference in New Issue
Block a user