mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Fixed bug
This commit is contained in:
parent
5cd4cf67cf
commit
761579ab1a
@ -397,23 +397,12 @@ namespace AssetStudio
|
|||||||
bone.Name = m_GameObject.m_Name;
|
bone.Name = m_GameObject.m_Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(bone.Name))
|
if (!string.IsNullOrEmpty(bone.Name))
|
||||||
{
|
{
|
||||||
var boneHash = mesh.m_BoneNameHashes[i];
|
var convert = Matrix.Scaling(new Vector3(-1, 1, 1));
|
||||||
bone.Name = GetNameFromBonePathHashes(boneHash);
|
bone.Matrix = convert * Matrix.Transpose(mesh.m_BindPose[i]) * convert;
|
||||||
if (string.IsNullOrEmpty(bone.Name))
|
iMesh.BoneList.Add(bone);
|
||||||
{
|
|
||||||
bone.Name = avatar?.FindBoneName(boneHash);
|
|
||||||
}
|
|
||||||
if (string.IsNullOrEmpty(bone.Name))
|
|
||||||
{
|
|
||||||
//throw new Exception("A Bone could neither be found by hash in Avatar nor by index in SkinnedMeshRenderer.");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
var convert = Matrix.Scaling(new Vector3(-1, 1, 1));
|
|
||||||
bone.Matrix = convert * Matrix.Transpose(mesh.m_BindPose[i]) * convert;
|
|
||||||
iMesh.BoneList.Add(bone);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user