mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:52:26 +02:00
🔧 Skip joints with the same name
This commit is contained in:
parent
b537ae779d
commit
13f1cfb4e2
1 changed files with 7 additions and 3 deletions
|
@ -608,11 +608,15 @@ class AvatarExporter : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (userBoneInfo.Value.HasHumanMapping())
|
if (userBoneInfo.Value.HasHumanMapping())
|
||||||
{
|
{
|
||||||
string jointName = HUMANOID_TO_OVERTE_JOINT_NAME[userBoneInfo.Value.humanName];
|
var jointName = HUMANOID_TO_OVERTE_JOINT_NAME[userBoneInfo.Value.humanName];
|
||||||
|
var userJointName = removeTypeFromJointname(userBoneInfo.Key);
|
||||||
|
// Skip joints with the same name
|
||||||
|
if(jointName == userJointName)
|
||||||
|
continue;
|
||||||
if (!currentFst.jointMapList.Exists(x => x.From == jointName))
|
if (!currentFst.jointMapList.Exists(x => x.From == jointName))
|
||||||
currentFst.jointMapList.Add(new JointMap(jointName, removeTypeFromJointname(userBoneInfo.Key)));
|
currentFst.jointMapList.Add(new JointMap(jointName, userJointName));
|
||||||
else
|
else
|
||||||
currentFst.jointMapList.Find(x => x.From == jointName).To = removeTypeFromJointname(userBoneInfo.Key);
|
currentFst.jointMapList.Find(x => x.From == jointName).To = userJointName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue