mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 15:14:55 +00:00
BFRES : Add a quick fix for swapping skeletons with regenerated indices
This commit is contained in:
parent
2f2bee744b
commit
7c9d8cfd98
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue