Set the parent index of the root bone to 0 instead of -1
In normal UE2 derivates, it doesn't appear to matter what the parent index is; but in UE1 games that have basic support for PSK importing (i.e. Harry Potter 2), the parent index of the root bone must be `0` otherwise the import fails.
This commit is contained in:
@@ -98,7 +98,7 @@ def build_psa(context: bpy.types.Context, options: PsaBuildOptions) -> Psa:
|
||||
psa_bone.parent_index = parent_index
|
||||
psa.bones[parent_index].children_count += 1
|
||||
except ValueError:
|
||||
psa_bone.parent_index = -1
|
||||
psa_bone.parent_index = 0
|
||||
|
||||
if bone.parent is not None:
|
||||
rotation = bone.matrix.to_quaternion().conjugated()
|
||||
|
||||
Reference in New Issue
Block a user