BFRES : Add a quick fix for swapping skeletons with regenerated indices

This commit is contained in:
KillzXGaming 2021-04-18 20:16:27 -04:00
parent 2f2bee744b
commit 7c9d8cfd98

View file

@ -432,18 +432,28 @@ namespace Bfres.Structs
if (extension == ".bfskl")
{
//Todo regenerate indices.
//This will just fix swapping the same bonesets with slightly adjusted indices
if (SkeletonU != null)
{
var indices = this.SkeletonU.MatrixToBoneList;
SkeletonU = new ResU.Skeleton();
SkeletonU.Import(FileName, GetResFileU());
SkeletonU.MatrixToBoneList = indices;
Nodes.Clear();
fskl.bones.Clear();
BfresWiiU.ReadSkeleton(this, SkeletonU, fskl);
}
else
{
var indices = this.SkeletonU.MatrixToBoneList;
Skeleton = new Skeleton();
Skeleton.Import(FileName);
SkeletonU.MatrixToBoneList = indices;
Nodes.Clear();
fskl.bones.Clear();
BfresSwitch.ReadSkeleton(this, Skeleton, fskl);