mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2024-11-15 02:37:39 +01:00
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:
parent
160a6b22f6
commit
25bf8f2087
@ -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()
|
||||
|
@ -97,7 +97,7 @@ def build_psk(context, options: PskBuildOptions) -> Psk:
|
||||
psk_bone.parent_index = parent_index
|
||||
psk.bones[parent_index].children_count += 1
|
||||
except ValueError:
|
||||
psk_bone.parent_index = -1
|
||||
psk_bone.parent_index = 0
|
||||
|
||||
if bone.parent is not None:
|
||||
rotation = bone.matrix.to_quaternion().conjugated()
|
||||
|
Loading…
Reference in New Issue
Block a user