EdenAutoMorpher_ProfileSaver_Script 추출 코드 정제
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.BaseKey3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.BoneData
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.BoneSpatialData
|
||||
using System;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.EdenAutoMorpher_ProfileSaver
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -36,199 +33,219 @@ public class EdenAutoMorpher_ProfileSaver : MonoBehaviour
|
||||
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0205: Unknown result type (might be due to invalid IL or missing references)
|
||||
Vector3 position = sourceAvatar.position;
|
||||
Quaternion rotation = sourceAvatar.rotation;
|
||||
Vector3 localScale = sourceAvatar.localScale;
|
||||
Transform parent = sourceAvatar.parent;
|
||||
sourceAvatar.SetParent((Transform)null);
|
||||
sourceAvatar.position = Vector3.zero;
|
||||
sourceAvatar.rotation = Quaternion.identity;
|
||||
sourceAvatar.localScale = Vector3.one;
|
||||
Vector3 position = this.sourceAvatar.position;
|
||||
Quaternion rotation = this.sourceAvatar.rotation;
|
||||
Vector3 localScale = this.sourceAvatar.localScale;
|
||||
Transform parent = this.sourceAvatar.parent;
|
||||
this.sourceAvatar.SetParent((Transform)null);
|
||||
this.sourceAvatar.position = Vector3.zero;
|
||||
this.sourceAvatar.rotation = Quaternion.identity;
|
||||
this.sourceAvatar.localScale = Vector3.one;
|
||||
ProfileData newProfileData = new ProfileData();
|
||||
ProfileUtils profileUtils = new ProfileUtils();
|
||||
newProfileData.version = profileUtils.GetProfileVersion();
|
||||
Animator component = ((Component)sourceAvatar).GetComponent<Animator>();
|
||||
if ((Object)(object)component == (Object)null)
|
||||
Animator component = ((Component)this.sourceAvatar).GetComponent<Animator>();
|
||||
if (component == null)
|
||||
{
|
||||
Debug.LogError((object)("[EdenAutoMorpher_ProfileSaver] Source Avatar Has No Animator\nSet Animator to Source Avatar " + ((Object)sourceAvatar).name));
|
||||
Debug.LogError((object)("[EdenAutoMorpher_ProfileSaver] Source Avatar Has No Animator\nSet Animator to Source Avatar " + this.sourceAvatar.name));
|
||||
}
|
||||
Dictionary<HumanBodyBones, HashSet<Transform>> humanoidMeshBoneMap = profileUtils.GetHumanoidMeshBoneMap(component, sourceBodyMeshes);
|
||||
Dictionary<HumanBodyBones, HashSet<Transform>> humanoidMeshBoneMap = profileUtils.GetHumanoidMeshBoneMap(component, this.sourceBodyMeshes);
|
||||
List<ProfileBakedBodyMesh> list = new List<ProfileBakedBodyMesh>();
|
||||
foreach (SkinnedMeshRenderer sourceBodyMesh in sourceBodyMeshes)
|
||||
foreach (SkinnedMeshRenderer sourceBodyMesh in this.sourceBodyMeshes)
|
||||
{
|
||||
list.Add(new ProfileBakedBodyMesh(sourceBodyMesh));
|
||||
}
|
||||
SaveBoneData(ref newProfileData, sourceAvatar, humanoidMeshBoneMap, list);
|
||||
this.SaveBoneData(ref newProfileData, this.sourceAvatar, humanoidMeshBoneMap, list);
|
||||
ProfileUtils_BVHUtil profileUtils_BVHUtil = new ProfileUtils_BVHUtil();
|
||||
ProfileBVH bVHData = profileUtils_BVHUtil.GetBVHData(sourceAvatar, list);
|
||||
profileUtils_BVHUtil.SaveProfileBVH(bVHData, Path.Combine(profileUtils.GetProfileBasePath(), profileName), profileName);
|
||||
ProfileBVH bVHData = profileUtils_BVHUtil.GetBVHData(this.sourceAvatar, list);
|
||||
profileUtils_BVHUtil.SaveProfileBVH(bVHData, Path.Combine(profileUtils.GetProfileBasePath(), this.profileName), this.profileName);
|
||||
newProfileData.neckTargetHeight = 1.5f;
|
||||
AdjustAvatarHigh(sourceAvatar, humanoidMeshBoneMap, 1.5f);
|
||||
this.AdjustAvatarHigh(this.sourceAvatar, humanoidMeshBoneMap, 1.5f);
|
||||
foreach (ProfileBakedBodyMesh item in list)
|
||||
{
|
||||
item.ReBakeMesh();
|
||||
}
|
||||
SaveSpatialData(ref newProfileData, humanoidMeshBoneMap, list);
|
||||
SaveProfileToJson(newProfileData, Path.Combine(profileUtils.GetProfileBasePath(), profileName), profileName);
|
||||
sourceAvatar.SetParent(parent);
|
||||
sourceAvatar.position = position;
|
||||
sourceAvatar.rotation = rotation;
|
||||
sourceAvatar.localScale = localScale;
|
||||
this.SaveSpatialData(ref newProfileData, humanoidMeshBoneMap, list);
|
||||
this.SaveProfileToJson(newProfileData, Path.Combine(profileUtils.GetProfileBasePath(), this.profileName), this.profileName);
|
||||
this.sourceAvatar.SetParent(parent);
|
||||
this.sourceAvatar.position = position;
|
||||
this.sourceAvatar.rotation = rotation;
|
||||
this.sourceAvatar.localScale = localScale;
|
||||
}
|
||||
|
||||
public void SaveSpatialData(ref ProfileData newProfileData, Dictionary<HumanBodyBones, HashSet<Transform>> sourceBoneMap, List<ProfileBakedBodyMesh> sourceBodyBakedMeshes)
|
||||
{
|
||||
ProfileUtils profileUtils = new ProfileUtils();
|
||||
HumanBodyBones[] influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)9 };
|
||||
newProfileData.NeckSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)9, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array;
|
||||
newProfileData.LeftUpperArmSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)13, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array2 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array2;
|
||||
newProfileData.RightUpperArmSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)14, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)15 };
|
||||
newProfileData.LeftLowerArmSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)15, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)16 };
|
||||
newProfileData.RightLowerArmSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)16, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)17 };
|
||||
newProfileData.LeftLowerArm_HandSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)15, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)18 };
|
||||
newProfileData.RightLowerArm_HandSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)16, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[2]
|
||||
{
|
||||
(HumanBodyBones)1,
|
||||
(HumanBodyBones)3
|
||||
};
|
||||
newProfileData.LeftUpperLegSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)1, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[2]
|
||||
{
|
||||
(HumanBodyBones)2,
|
||||
(HumanBodyBones)4
|
||||
};
|
||||
newProfileData.RightUpperLegSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)2, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)5 };
|
||||
newProfileData.LeftFootSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)5, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)6 };
|
||||
newProfileData.RightFootSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)6, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)8 };
|
||||
newProfileData.ChestSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)8, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)54 };
|
||||
newProfileData.UpperChestSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)54, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[2]
|
||||
{
|
||||
(HumanBodyBones)8,
|
||||
(HumanBodyBones)54
|
||||
};
|
||||
newProfileData.IntegratedChestSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)8, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)7 };
|
||||
newProfileData.SpineSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)7, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)17 };
|
||||
newProfileData.LeftHandSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)17, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array3 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array3;
|
||||
newProfileData.LeftHandThumbSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)24, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)24 };
|
||||
newProfileData.LeftHandThumbProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)24, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)25 };
|
||||
newProfileData.LeftHandThumbIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)25, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)26 };
|
||||
newProfileData.LeftHandThumbDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)26, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array4 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array4, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array4;
|
||||
newProfileData.LeftHandIndexSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)27, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)27 };
|
||||
newProfileData.LeftHandIndexProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)27, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)28 };
|
||||
newProfileData.LeftHandIndexIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)28, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)29 };
|
||||
newProfileData.LeftHandIndexDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)29, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array5 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array5, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array5;
|
||||
newProfileData.LeftHandMiddleSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)30, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)30 };
|
||||
newProfileData.LeftHandMiddleProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)30, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)31 };
|
||||
newProfileData.LeftHandMiddleIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)31, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)32 };
|
||||
newProfileData.LeftHandMiddleDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)32, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array6 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array6, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array6;
|
||||
newProfileData.LeftHandRingSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)33, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)33 };
|
||||
newProfileData.LeftHandRingProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)33, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)34 };
|
||||
newProfileData.LeftHandRingIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)34, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)35 };
|
||||
newProfileData.LeftHandRingDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)35, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array7 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array7, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array7;
|
||||
newProfileData.LeftHandLittleSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)36, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)36 };
|
||||
newProfileData.LeftHandLittleProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)36, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)37 };
|
||||
newProfileData.LeftHandLittleIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)37, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)38 };
|
||||
newProfileData.LeftHandLittleDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)38, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)18 };
|
||||
newProfileData.RightHandSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)18, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array8 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array8, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array8;
|
||||
newProfileData.RightHandThumbSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)39, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)39 };
|
||||
newProfileData.RightHandThumbProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)39, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)40 };
|
||||
newProfileData.RightHandThumbIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)40, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)41 };
|
||||
newProfileData.RightHandThumbDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)41, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array9 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array9, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array9;
|
||||
newProfileData.RightHandIndexSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)42, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)42 };
|
||||
newProfileData.RightHandIndexProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)42, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)43 };
|
||||
newProfileData.RightHandIndexIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)43, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)44 };
|
||||
newProfileData.RightHandIndexDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)44, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array10 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array10, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array10;
|
||||
newProfileData.RightHandMiddleSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)45, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)45 };
|
||||
newProfileData.RightHandMiddleProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)45, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)46 };
|
||||
newProfileData.RightHandMiddleIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)46, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)47 };
|
||||
newProfileData.RightHandMiddleDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)47, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array11 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array11, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array11;
|
||||
newProfileData.RightHandRingSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)48, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)48 };
|
||||
newProfileData.RightHandRingProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)48, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)49 };
|
||||
newProfileData.RightHandRingIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)49, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)50 };
|
||||
newProfileData.RightHandRingDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)50, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] array12 = new HumanBodyBones[3];
|
||||
RuntimeHelpers.InitializeArray(array12, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
influencedBones = (HumanBodyBones[])(object)array12;
|
||||
newProfileData.RightHandLittleSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)51, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)51 };
|
||||
newProfileData.RightHandLittleProximalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)51, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)52 };
|
||||
newProfileData.RightHandLittleIntermediateSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)52, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
influencedBones = (HumanBodyBones[])(object)new HumanBodyBones[1] { (HumanBodyBones)53 };
|
||||
newProfileData.RightHandLittleDistalSpatialData = profileUtils.GetBoneSpatialData((HumanBodyBones)53, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
HumanBodyBones[] influencedBones = new HumanBodyBones[1] { HumanBodyBones.Neck };
|
||||
newProfileData.NeckSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.Neck, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.LeftUpperArm, HumanBodyBones.LeftLowerArm, HumanBodyBones.LeftHand };
|
||||
newProfileData.LeftUpperArmSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftUpperArm, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.RightUpperArm, HumanBodyBones.RightLowerArm, HumanBodyBones.RightHand };
|
||||
newProfileData.RightUpperArmSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightUpperArm, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftLowerArm };
|
||||
newProfileData.LeftLowerArmSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftLowerArm, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightLowerArm };
|
||||
newProfileData.RightLowerArmSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightLowerArm, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftHand };
|
||||
newProfileData.LeftLowerArm_HandSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftLowerArm, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightHand };
|
||||
newProfileData.RightLowerArm_HandSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightLowerArm, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[2] { HumanBodyBones.LeftUpperLeg, HumanBodyBones.LeftLowerLeg };
|
||||
newProfileData.LeftUpperLegSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftUpperLeg, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[2] { HumanBodyBones.RightUpperLeg, HumanBodyBones.RightLowerLeg };
|
||||
newProfileData.RightUpperLegSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightUpperLeg, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftFoot };
|
||||
newProfileData.LeftFootSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftFoot, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightFoot };
|
||||
newProfileData.RightFootSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightFoot, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.Chest };
|
||||
newProfileData.ChestSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.Chest, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.UpperChest };
|
||||
newProfileData.UpperChestSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.UpperChest, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[2] { HumanBodyBones.Chest, HumanBodyBones.UpperChest };
|
||||
newProfileData.IntegratedChestSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.Chest, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.Spine };
|
||||
newProfileData.SpineSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.Spine, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftHand };
|
||||
newProfileData.LeftHandSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftHand, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.LeftThumbProximal, HumanBodyBones.LeftThumbIntermediate, HumanBodyBones.LeftThumbDistal };
|
||||
newProfileData.LeftHandThumbSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftThumbProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftThumbProximal };
|
||||
newProfileData.LeftHandThumbProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftThumbProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftThumbIntermediate };
|
||||
newProfileData.LeftHandThumbIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftThumbIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftThumbDistal };
|
||||
newProfileData.LeftHandThumbDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftThumbDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.LeftIndexProximal, HumanBodyBones.LeftIndexIntermediate, HumanBodyBones.LeftIndexDistal };
|
||||
newProfileData.LeftHandIndexSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftIndexProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftIndexProximal };
|
||||
newProfileData.LeftHandIndexProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftIndexProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftIndexIntermediate };
|
||||
newProfileData.LeftHandIndexIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftIndexIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftIndexDistal };
|
||||
newProfileData.LeftHandIndexDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftIndexDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.LeftMiddleProximal, HumanBodyBones.LeftMiddleIntermediate, HumanBodyBones.LeftMiddleDistal };
|
||||
newProfileData.LeftHandMiddleSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftMiddleProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftMiddleProximal };
|
||||
newProfileData.LeftHandMiddleProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftMiddleProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftMiddleIntermediate };
|
||||
newProfileData.LeftHandMiddleIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftMiddleIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftMiddleDistal };
|
||||
newProfileData.LeftHandMiddleDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftMiddleDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.LeftRingProximal, HumanBodyBones.LeftRingIntermediate, HumanBodyBones.LeftRingDistal };
|
||||
newProfileData.LeftHandRingSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftRingProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftRingProximal };
|
||||
newProfileData.LeftHandRingProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftRingProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftRingIntermediate };
|
||||
newProfileData.LeftHandRingIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftRingIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftRingDistal };
|
||||
newProfileData.LeftHandRingDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftRingDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.LeftLittleProximal, HumanBodyBones.LeftLittleIntermediate, HumanBodyBones.LeftLittleDistal };
|
||||
newProfileData.LeftHandLittleSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftLittleProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftLittleProximal };
|
||||
newProfileData.LeftHandLittleProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftLittleProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftLittleIntermediate };
|
||||
newProfileData.LeftHandLittleIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftLittleIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.LeftLittleDistal };
|
||||
newProfileData.LeftHandLittleDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.LeftLittleDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightHand };
|
||||
newProfileData.RightHandSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightHand, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.RightThumbProximal, HumanBodyBones.RightThumbIntermediate, HumanBodyBones.RightThumbDistal };
|
||||
newProfileData.RightHandThumbSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightThumbProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightThumbProximal };
|
||||
newProfileData.RightHandThumbProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightThumbProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightThumbIntermediate };
|
||||
newProfileData.RightHandThumbIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightThumbIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightThumbDistal };
|
||||
newProfileData.RightHandThumbDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightThumbDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.RightIndexProximal, HumanBodyBones.RightIndexIntermediate, HumanBodyBones.RightIndexDistal };
|
||||
newProfileData.RightHandIndexSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightIndexProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightIndexProximal };
|
||||
newProfileData.RightHandIndexProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightIndexProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightIndexIntermediate };
|
||||
newProfileData.RightHandIndexIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightIndexIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightIndexDistal };
|
||||
newProfileData.RightHandIndexDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightIndexDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.RightMiddleProximal, HumanBodyBones.RightMiddleIntermediate, HumanBodyBones.RightMiddleDistal };
|
||||
newProfileData.RightHandMiddleSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightMiddleProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightMiddleProximal };
|
||||
newProfileData.RightHandMiddleProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightMiddleProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightMiddleIntermediate };
|
||||
newProfileData.RightHandMiddleIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightMiddleIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightMiddleDistal };
|
||||
newProfileData.RightHandMiddleDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightMiddleDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.RightRingProximal, HumanBodyBones.RightRingIntermediate, HumanBodyBones.RightRingDistal };
|
||||
newProfileData.RightHandRingSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightRingProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightRingProximal };
|
||||
newProfileData.RightHandRingProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightRingProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightRingIntermediate };
|
||||
newProfileData.RightHandRingIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightRingIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightRingDistal };
|
||||
newProfileData.RightHandRingDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightRingDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[3] { HumanBodyBones.RightLittleProximal, HumanBodyBones.RightLittleIntermediate, HumanBodyBones.RightLittleDistal };
|
||||
newProfileData.RightHandLittleSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightLittleProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes, addChildBones: true);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightLittleProximal };
|
||||
newProfileData.RightHandLittleProximalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightLittleProximal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightLittleIntermediate };
|
||||
newProfileData.RightHandLittleIntermediateSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightLittleIntermediate, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
|
||||
influencedBones = new HumanBodyBones[1] { HumanBodyBones.RightLittleDistal };
|
||||
newProfileData.RightHandLittleDistalSpatialData = profileUtils.GetBoneSpatialData(HumanBodyBones.RightLittleDistal, influencedBones, sourceBoneMap, sourceBodyBakedMeshes);
|
||||
}
|
||||
|
||||
public void SaveBoneData(ref ProfileData newProfileData, Transform sourceAvatar, Dictionary<HumanBodyBones, HashSet<Transform>> sourceBoneMap, List<ProfileBakedBodyMesh> sourceBodyBakedMeshes)
|
||||
@@ -265,15 +282,15 @@ public class EdenAutoMorpher_ProfileSaver : MonoBehaviour
|
||||
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (!sourceBoneMap.TryGetValue((HumanBodyBones)9, out var value) || value.Count == 0)
|
||||
if (!sourceBoneMap.TryGetValue(HumanBodyBones.Neck, out var value) || value.Count == 0)
|
||||
{
|
||||
Debug.LogError((object)"[EdenAutoMorpher_ProfileSaver] Can't Find Neck Bones");
|
||||
Debug.LogError("[EdenAutoMorpher_ProfileSaver] Can't Find Neck Bones");
|
||||
return;
|
||||
}
|
||||
float num = value.FirstOrDefault().position.y - sourceRoot.position.y;
|
||||
if (Mathf.Approximately(num, 0f))
|
||||
{
|
||||
Debug.LogWarning((object)$"[EdenAutoMorpher_ProfileSaver] {((Object)sourceRoot).name} Neck Y가 0에 가까워 스케일 계산을 건너뜁니다. (neckY = {num})");
|
||||
Debug.LogWarning($"[EdenAutoMorpher_ProfileSaver] {sourceRoot.name} Neck Y가 0에 가까워 스케일 계산을 건너뜁니다. (neckY = {num})");
|
||||
return;
|
||||
}
|
||||
float num2 = targetHeight / num;
|
||||
@@ -286,24 +303,24 @@ public class EdenAutoMorpher_ProfileSaver : MonoBehaviour
|
||||
{
|
||||
if (profileData == null)
|
||||
{
|
||||
Debug.LogError((object)"[EdenAutoMorpher_ProfileSaver] ProfileData is null. Abort save.");
|
||||
Debug.LogError("[EdenAutoMorpher_ProfileSaver] ProfileData is null. Abort save.");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(profileName))
|
||||
{
|
||||
Debug.LogError((object)"[EdenAutoMorpher_ProfileSaver] profileName is empty.");
|
||||
Debug.LogError("[EdenAutoMorpher_ProfileSaver] profileName is empty.");
|
||||
return;
|
||||
}
|
||||
string path = (profileName.EndsWith(".json") ? profileName : (profileName + ".json"));
|
||||
string path = profileName.EndsWith(".json") ? profileName : (profileName + ".json");
|
||||
string text = Path.Combine(Application.dataPath, savePath ?? string.Empty);
|
||||
if (!Directory.Exists(text))
|
||||
{
|
||||
Directory.CreateDirectory(text);
|
||||
}
|
||||
string text2 = Path.Combine(text, path);
|
||||
string contents = JsonUtility.ToJson((object)profileData, true);
|
||||
string contents = JsonUtility.ToJson(profileData, true);
|
||||
File.WriteAllText(text2, contents);
|
||||
Debug.Log((object)("[EdenAutoMorpher_ProfileSaver] Profile saved successfully.\nPath: " + text2));
|
||||
Debug.Log("[EdenAutoMorpher_ProfileSaver] Profile saved successfully.\nPath: " + text2);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.PCAData
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileBVH
|
||||
using System.Collections.Generic;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileBVH
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileBakedBodyMesh
|
||||
@@ -16,11 +16,11 @@ public class ProfileBakedBodyMesh
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!((Object)(object)smr != (Object)null))
|
||||
if (!((Object)(object)this.smr != (Object)null))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return smr.sharedMesh.boneWeights;
|
||||
return this.smr.sharedMesh.boneWeights;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,11 @@ public class ProfileBakedBodyMesh
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!((Object)(object)smr != (Object)null))
|
||||
if (!((Object)(object)this.smr != (Object)null))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return smr.bones;
|
||||
return this.smr.bones;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,26 +44,26 @@ public class ProfileBakedBodyMesh
|
||||
{
|
||||
Debug.LogError((object)("[ProfileUtil - ProfileBakedBodyMesh] BakeBodyMesh Init : SkinnedMeshRenderer " + ((Object)((Component)_smr).gameObject).name + " is null"));
|
||||
}
|
||||
smr = _smr;
|
||||
this.smr = _smr;
|
||||
if ((Object)(object)_smr.sharedMesh == (Object)null)
|
||||
{
|
||||
Debug.LogError((object)("[ProfileUtil - ProfileBakedBodyMesh] BakeBodyMesh Init : SkinnedMeshRenderer " + ((Object)((Component)_smr).gameObject).name + " has null sharedMesh."));
|
||||
}
|
||||
bakedMesh = new Mesh();
|
||||
smr.BakeMesh(bakedMesh);
|
||||
worldVertices = CalculateWorldVertices(smr, bakedMesh);
|
||||
this.bakedMesh = new Mesh();
|
||||
this.smr.BakeMesh(this.bakedMesh);
|
||||
this.worldVertices = this.CalculateWorldVertices(this.smr, this.bakedMesh);
|
||||
}
|
||||
|
||||
public void ReBakeMesh()
|
||||
{
|
||||
smr.BakeMesh(bakedMesh);
|
||||
worldVertices = CalculateWorldVertices(smr, bakedMesh);
|
||||
this.smr.BakeMesh(this.bakedMesh);
|
||||
this.worldVertices = this.CalculateWorldVertices(this.smr, this.bakedMesh);
|
||||
}
|
||||
|
||||
~ProfileBakedBodyMesh()
|
||||
{
|
||||
smr = null;
|
||||
bakedMesh = null;
|
||||
this.smr = null;
|
||||
this.bakedMesh = null;
|
||||
}
|
||||
|
||||
private Vector3[] CalculateWorldVertices(SkinnedMeshRenderer smr, Mesh bakedMesh)
|
||||
@@ -92,15 +92,14 @@ public class ProfileBakedBodyMesh
|
||||
}
|
||||
Transform transform = ((Component)smr).transform;
|
||||
Vector3 lossyScale = transform.lossyScale;
|
||||
Vector3 val = default(Vector3);
|
||||
((Vector3)(ref val))._002Ector(1f / Mathf.Max(lossyScale.x, 1E-08f), 1f / Mathf.Max(lossyScale.y, 1E-08f), 1f / Mathf.Max(lossyScale.z, 1E-08f));
|
||||
Vector3 val = new Vector3(1f / Mathf.Max(lossyScale.x, 1E-08f), 1f / Mathf.Max(lossyScale.y, 1E-08f), 1f / Mathf.Max(lossyScale.z, 1E-08f));
|
||||
Matrix4x4 val2 = transform.localToWorldMatrix * Matrix4x4.Scale(val);
|
||||
Vector3[] vertices = bakedMesh.vertices;
|
||||
int num = vertices.Length;
|
||||
Vector3[] array = (Vector3[])(object)new Vector3[num];
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
array[i] = ((Matrix4x4)(ref val2)).MultiplyPoint3x4(vertices[i]);
|
||||
array[i] = val2.MultiplyPoint3x4(vertices[i]);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileData
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Eden.AutoMorpher.profile;
|
||||
|
||||
[Serializable]
|
||||
public class ProfileData
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileUtil_IndexUtil
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileUtil_IndexUtil
|
||||
@@ -15,20 +14,20 @@ public class ProfileUtil_IndexUtil
|
||||
|
||||
public XorShift32(uint seed)
|
||||
{
|
||||
_state = ((seed != 0) ? seed : 1831565813u);
|
||||
this._state = ((seed != 0) ? seed : 1831565813u);
|
||||
}
|
||||
|
||||
public uint NextUInt()
|
||||
{
|
||||
uint state = _state;
|
||||
uint state = this._state;
|
||||
state ^= state << 13;
|
||||
state ^= state >> 17;
|
||||
return _state = state ^ (state << 5);
|
||||
return this._state = state ^ (state << 5);
|
||||
}
|
||||
|
||||
public int NextInt(int maxExclusive)
|
||||
{
|
||||
return (int)(NextUInt() % (uint)maxExclusive);
|
||||
return (int)(this.NextUInt() % (uint)maxExclusive);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,12 +55,12 @@ public class ProfileUtil_IndexUtil
|
||||
|
||||
public BlockPermutations(int blockSize)
|
||||
{
|
||||
_blockSize = blockSize;
|
||||
this._blockSize = blockSize;
|
||||
}
|
||||
|
||||
public void Build(int seed)
|
||||
{
|
||||
if (_blockSize <= 1)
|
||||
if (this._blockSize <= 1)
|
||||
{
|
||||
Debug.LogError((object)"[ProfileUtil_IndexUtil] BlockPermutations.Build - invalid blockSize");
|
||||
return;
|
||||
@@ -70,45 +69,45 @@ public class ProfileUtil_IndexUtil
|
||||
XorShift32 rng2 = new XorShift32((uint)(seed ^ -939442524));
|
||||
XorShift32 rng3 = new XorShift32((uint)(seed ^ -1383041155));
|
||||
XorShift32 rng4 = new XorShift32((uint)(seed ^ 0x7E95761E));
|
||||
_px = MakePermutation(_blockSize, ref rng);
|
||||
_py = MakePermutation(_blockSize, ref rng2);
|
||||
_pz = MakePermutation(_blockSize, ref rng3);
|
||||
_pall = MakePermutation(_blockSize, ref rng4);
|
||||
_checksum = ComputeChecksum(_px, _py, _pz, _pall);
|
||||
_cachedLen = -1;
|
||||
_pxLen = (_pyLen = (_pzLen = (_pallLen = null)));
|
||||
this._px = this.MakePermutation(this._blockSize, ref rng);
|
||||
this._py = this.MakePermutation(this._blockSize, ref rng2);
|
||||
this._pz = this.MakePermutation(this._blockSize, ref rng3);
|
||||
this._pall = this.MakePermutation(this._blockSize, ref rng4);
|
||||
this._checksum = this.ComputeChecksum(this._px, this._py, this._pz, this._pall);
|
||||
this._cachedLen = -1;
|
||||
this._pxLen = (this._pyLen = (this._pzLen = (this._pallLen = null)));
|
||||
}
|
||||
|
||||
public bool ValidateRebuild(int seed)
|
||||
{
|
||||
uint checksum = _checksum;
|
||||
BlockPermutations blockPermutations = new BlockPermutations(_blockSize);
|
||||
uint checksum = this._checksum;
|
||||
BlockPermutations blockPermutations = new BlockPermutations(this._blockSize);
|
||||
blockPermutations.Build(seed);
|
||||
return blockPermutations._checksum == checksum;
|
||||
}
|
||||
|
||||
public void GetPermutationsForLen(int len, out int[] pxUse, out int[] pyUse, out int[] pzUse, out int[] pallUse)
|
||||
{
|
||||
if (len == _blockSize)
|
||||
if (len == this._blockSize)
|
||||
{
|
||||
pxUse = _px;
|
||||
pyUse = _py;
|
||||
pzUse = _pz;
|
||||
pallUse = _pall;
|
||||
pxUse = this._px;
|
||||
pyUse = this._py;
|
||||
pzUse = this._pz;
|
||||
pallUse = this._pall;
|
||||
return;
|
||||
}
|
||||
if (_cachedLen != len)
|
||||
if (this._cachedLen != len)
|
||||
{
|
||||
_cachedLen = len;
|
||||
_pxLen = MakeSubPermutation(_px, len);
|
||||
_pyLen = MakeSubPermutation(_py, len);
|
||||
_pzLen = MakeSubPermutation(_pz, len);
|
||||
_pallLen = MakeSubPermutation(_pall, len);
|
||||
this._cachedLen = len;
|
||||
this._pxLen = this.MakeSubPermutation(this._px, len);
|
||||
this._pyLen = this.MakeSubPermutation(this._py, len);
|
||||
this._pzLen = this.MakeSubPermutation(this._pz, len);
|
||||
this._pallLen = this.MakeSubPermutation(this._pall, len);
|
||||
}
|
||||
pxUse = _pxLen;
|
||||
pyUse = _pyLen;
|
||||
pzUse = _pzLen;
|
||||
pallUse = _pallLen;
|
||||
pxUse = this._pxLen;
|
||||
pyUse = this._pyLen;
|
||||
pzUse = this._pzLen;
|
||||
pallUse = this._pallLen;
|
||||
}
|
||||
|
||||
private int[] MakeSubPermutation(int[] fullPerm, int len)
|
||||
@@ -153,10 +152,10 @@ public class ProfileUtil_IndexUtil
|
||||
private uint ComputeChecksum(int[] a, int[] b, int[] c, int[] d)
|
||||
{
|
||||
uint h = 2166136261u;
|
||||
MixArray(ref h, a);
|
||||
MixArray(ref h, b);
|
||||
MixArray(ref h, c);
|
||||
MixArray(ref h, d);
|
||||
this.MixArray(ref h, a);
|
||||
this.MixArray(ref h, b);
|
||||
this.MixArray(ref h, c);
|
||||
this.MixArray(ref h, d);
|
||||
return h;
|
||||
}
|
||||
|
||||
@@ -184,15 +183,15 @@ public class ProfileUtil_IndexUtil
|
||||
public ProfileUtil_IndexUtil(int blockSize = 9783)
|
||||
{
|
||||
this.blockSize = blockSize;
|
||||
_perm = new BlockPermutations(blockSize);
|
||||
_xTmp = new float[blockSize];
|
||||
_yTmp = new float[blockSize];
|
||||
_zTmp = new float[blockSize];
|
||||
this._perm = new BlockPermutations(blockSize);
|
||||
this._xTmp = new float[blockSize];
|
||||
this._yTmp = new float[blockSize];
|
||||
this._zTmp = new float[blockSize];
|
||||
}
|
||||
|
||||
public void Build(int seed)
|
||||
{
|
||||
_perm.Build(seed);
|
||||
this._perm.Build(seed);
|
||||
}
|
||||
|
||||
public void EncodeInto(Vector3[] input, Vector3[] output)
|
||||
@@ -215,24 +214,24 @@ public class ProfileUtil_IndexUtil
|
||||
return;
|
||||
}
|
||||
int num = input.Length;
|
||||
int num2 = blockSize;
|
||||
int num2 = this.blockSize;
|
||||
int num3 = (num + num2 - 1) / num2;
|
||||
for (int i = 0; i < num3; i++)
|
||||
{
|
||||
int num4 = i * num2;
|
||||
int num5 = Mathf.Min(num2, num - num4);
|
||||
_perm.GetPermutationsForLen(num5, out var pxUse, out var pyUse, out var pzUse, out var pallUse);
|
||||
this._perm.GetPermutationsForLen(num5, out var pxUse, out var pyUse, out var pzUse, out var pallUse);
|
||||
for (int j = 0; j < num5; j++)
|
||||
{
|
||||
Vector3 val = input[num4 + j];
|
||||
_xTmp[pxUse[j]] = val.x;
|
||||
_yTmp[pyUse[j]] = val.y;
|
||||
_zTmp[pzUse[j]] = val.z;
|
||||
this._xTmp[pxUse[j]] = val.x;
|
||||
this._yTmp[pyUse[j]] = val.y;
|
||||
this._zTmp[pzUse[j]] = val.z;
|
||||
}
|
||||
for (int k = 0; k < num5; k++)
|
||||
{
|
||||
int num6 = pallUse[k];
|
||||
output[num4 + num6] = new Vector3(_xTmp[k], _yTmp[k], _zTmp[k]);
|
||||
output[num4 + num6] = new Vector3(this._xTmp[k], this._yTmp[k], this._zTmp[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -257,24 +256,24 @@ public class ProfileUtil_IndexUtil
|
||||
return;
|
||||
}
|
||||
int num = encoded.Length;
|
||||
int num2 = blockSize;
|
||||
int num2 = this.blockSize;
|
||||
int num3 = (num + num2 - 1) / num2;
|
||||
for (int i = 0; i < num3; i++)
|
||||
{
|
||||
int num4 = i * num2;
|
||||
int num5 = Mathf.Min(num2, num - num4);
|
||||
_perm.GetPermutationsForLen(num5, out var pxUse, out var pyUse, out var pzUse, out var pallUse);
|
||||
this._perm.GetPermutationsForLen(num5, out var pxUse, out var pyUse, out var pzUse, out var pallUse);
|
||||
for (int j = 0; j < num5; j++)
|
||||
{
|
||||
int num6 = pallUse[j];
|
||||
Vector3 val = encoded[num4 + num6];
|
||||
_xTmp[j] = val.x;
|
||||
_yTmp[j] = val.y;
|
||||
_zTmp[j] = val.z;
|
||||
this._xTmp[j] = val.x;
|
||||
this._yTmp[j] = val.y;
|
||||
this._zTmp[j] = val.z;
|
||||
}
|
||||
for (int k = 0; k < num5; k++)
|
||||
{
|
||||
output[num4 + k] = new Vector3(_xTmp[pxUse[k]], _yTmp[pyUse[k]], _zTmp[pzUse[k]]);
|
||||
output[num4 + k] = new Vector3(this._xTmp[pxUse[k]], this._yTmp[pyUse[k]], this._zTmp[pzUse[k]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileUtils
|
||||
using System.Collections.Generic;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileUtils
|
||||
@@ -24,53 +23,53 @@ public class ProfileUtils
|
||||
|
||||
public ProfileUtils()
|
||||
{
|
||||
boneUtil = new ProfileUtils_BoneUtil();
|
||||
poseUtil = new ProfileUtils_PoseUtil();
|
||||
this.boneUtil = new ProfileUtils_BoneUtil();
|
||||
this.poseUtil = new ProfileUtils_PoseUtil();
|
||||
}
|
||||
|
||||
public string GetProfileBasePath()
|
||||
{
|
||||
return profileBasePath;
|
||||
return this.profileBasePath;
|
||||
}
|
||||
|
||||
public string GetBaseDataPath()
|
||||
{
|
||||
return baseDataPath;
|
||||
return this.baseDataPath;
|
||||
}
|
||||
|
||||
public int GetProfileVersion()
|
||||
{
|
||||
return profileVersion;
|
||||
return this.profileVersion;
|
||||
}
|
||||
|
||||
public string GetProfileMagic()
|
||||
{
|
||||
return profileMagic;
|
||||
return this.profileMagic;
|
||||
}
|
||||
|
||||
public string GetBaseMagic()
|
||||
{
|
||||
return baseMagic;
|
||||
return this.baseMagic;
|
||||
}
|
||||
|
||||
public Dictionary<HumanBodyBones, HashSet<Transform>> GetHumanoidMeshBoneMap(Animator animator, IReadOnlyList<SkinnedMeshRenderer> bodyMeshes, float posTolerance = 0.0001f, float weightThreshold = 0.0001f)
|
||||
{
|
||||
return boneUtil.GetHumanoidMeshBoneMap(animator, bodyMeshes, posTolerance, weightThreshold);
|
||||
return this.boneUtil.GetHumanoidMeshBoneMap(animator, bodyMeshes, posTolerance, weightThreshold);
|
||||
}
|
||||
|
||||
public BoneSpatialData GetBoneSpatialData(HumanBodyBones refBone, HumanBodyBones[] influencedBones, Dictionary<HumanBodyBones, HashSet<Transform>> boneMap, List<ProfileBakedBodyMesh> sourceBodyBakedMeshes, bool addChildBones = false)
|
||||
{
|
||||
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
|
||||
return poseUtil.GetBoneSpatialData(refBone, influencedBones, boneMap, sourceBodyBakedMeshes, addChildBones);
|
||||
return this.poseUtil.GetBoneSpatialData(refBone, influencedBones, boneMap, sourceBodyBakedMeshes, addChildBones);
|
||||
}
|
||||
|
||||
public HashSet<Transform> GetBodyMeshBones(SkinnedMeshRenderer smr, float weightThreshold = 0.0001f)
|
||||
{
|
||||
return boneUtil.GetBodyMeshBones(smr, weightThreshold);
|
||||
return this.boneUtil.GetBodyMeshBones(smr, weightThreshold);
|
||||
}
|
||||
|
||||
public List<BoneData> GetBoneDatas(Transform rootTransform, HashSet<Transform> avatarBones, Dictionary<HumanBodyBones, HashSet<Transform>> sourceBoneMap)
|
||||
{
|
||||
return boneUtil.GetBoneDatas(rootTransform, avatarBones, sourceBoneMap);
|
||||
return this.boneUtil.GetBoneDatas(rootTransform, avatarBones, sourceBoneMap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileUtils_BVHUtil
|
||||
@@ -6,7 +6,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileUtils_BVHUtil
|
||||
@@ -15,7 +14,7 @@ public class ProfileUtils_BVHUtil
|
||||
|
||||
public ProfileBVH GetBVHData(Transform rootTransform, List<ProfileBakedBodyMesh> bakedBodyMeshes)
|
||||
{
|
||||
return BuildFromSkinnedMeshes(rootTransform, bakedBodyMeshes);
|
||||
return this.BuildFromSkinnedMeshes(rootTransform, bakedBodyMeshes);
|
||||
}
|
||||
|
||||
public ProfileBVH BuildFromSkinnedMeshes(Transform rootTransform, List<ProfileBakedBodyMesh> bakedBodyMeshes)
|
||||
@@ -33,7 +32,7 @@ public class ProfileUtils_BVHUtil
|
||||
int num = 0;
|
||||
foreach (ProfileBakedBodyMesh bakedBodyMesh in bakedBodyMeshes)
|
||||
{
|
||||
if (bakedBodyMesh != null && !((Object)(object)bakedBodyMesh.smr == (Object)null) && !((Object)(object)bakedBodyMesh.smr.sharedMesh == (Object)null))
|
||||
if (bakedBodyMesh != null && !(bakedBodyMesh.smr == null) && !(bakedBodyMesh.smr.sharedMesh == null))
|
||||
{
|
||||
num += bakedBodyMesh.smr.sharedMesh.triangles.Length / 3;
|
||||
}
|
||||
@@ -47,12 +46,12 @@ public class ProfileUtils_BVHUtil
|
||||
int num2 = 0;
|
||||
foreach (ProfileBakedBodyMesh bakedBodyMesh2 in bakedBodyMeshes)
|
||||
{
|
||||
if (bakedBodyMesh2 != null && !((Object)(object)bakedBodyMesh2.smr == (Object)null) && !((Object)(object)bakedBodyMesh2.smr.sharedMesh == (Object)null))
|
||||
if (bakedBodyMesh2 != null && !(bakedBodyMesh2.smr == null) && !(bakedBodyMesh2.smr.sharedMesh == null))
|
||||
{
|
||||
int count = profileBVH.vertices.Count;
|
||||
for (int i = 0; i < bakedBodyMesh2.worldVertices.Length; i++)
|
||||
{
|
||||
Vector3 item = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(bakedBodyMesh2.worldVertices[i]);
|
||||
Vector3 item = worldToLocalMatrix.MultiplyPoint3x4(bakedBodyMesh2.worldVertices[i]);
|
||||
profileBVH.vertices.Add(item);
|
||||
}
|
||||
int[] triangles = bakedBodyMesh2.smr.sharedMesh.triangles;
|
||||
@@ -79,7 +78,7 @@ public class ProfileUtils_BVHUtil
|
||||
}
|
||||
profileBVH.dataIndices = array;
|
||||
List<profileBVHNode> list = new List<profileBVHNode>();
|
||||
BuildRecursive(profileBVH, array, 0, num7, list);
|
||||
this.BuildRecursive(profileBVH, array, 0, num7, list);
|
||||
profileBVH.nodes = list.ToArray();
|
||||
return profileBVH;
|
||||
}
|
||||
@@ -135,16 +134,16 @@ public class ProfileUtils_BVHUtil
|
||||
Vector3 val3 = bvh.vertices[profileBVHData2.verC];
|
||||
if (flag)
|
||||
{
|
||||
((Bounds)(ref bounds))._002Ector(val, Vector3.zero);
|
||||
((Bounds)(ref bounds)).Encapsulate(val2);
|
||||
((Bounds)(ref bounds)).Encapsulate(val3);
|
||||
bounds = new Bounds(val, Vector3.zero);
|
||||
bounds.Encapsulate(val2);
|
||||
bounds.Encapsulate(val3);
|
||||
flag = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
((Bounds)(ref bounds)).Encapsulate(val);
|
||||
((Bounds)(ref bounds)).Encapsulate(val2);
|
||||
((Bounds)(ref bounds)).Encapsulate(val3);
|
||||
bounds.Encapsulate(val);
|
||||
bounds.Encapsulate(val2);
|
||||
bounds.Encapsulate(val3);
|
||||
}
|
||||
}
|
||||
profileBVHNode2.bounds = bounds;
|
||||
@@ -158,7 +157,7 @@ public class ProfileUtils_BVHUtil
|
||||
outNodes.Add(profileBVHNode2);
|
||||
return count2;
|
||||
}
|
||||
Vector3 size = ((Bounds)(ref bounds)).size;
|
||||
Vector3 size = bounds.size;
|
||||
int num = 0;
|
||||
if (size.y > size.x && size.y > size.z)
|
||||
{
|
||||
@@ -176,10 +175,10 @@ public class ProfileUtils_BVHUtil
|
||||
Vector3 val5 = bvh.vertices[profileBVHData3.verB];
|
||||
Vector3 val6 = bvh.vertices[profileBVHData3.verC];
|
||||
Vector3 val7 = (val4 + val5 + val6) / 3f;
|
||||
num2 += ((Vector3)(ref val7))[num];
|
||||
num2 += val7[num];
|
||||
}
|
||||
num2 /= (float)count;
|
||||
int num3 = Partition(bvh, triIndices, start, count, num, num2);
|
||||
int num3 = this.Partition(bvh, triIndices, start, count, num, num2);
|
||||
if (num3 == start || num3 == start + count)
|
||||
{
|
||||
num3 = start + count / 2;
|
||||
@@ -188,8 +187,8 @@ public class ProfileUtils_BVHUtil
|
||||
profileBVHNode2.start = -1;
|
||||
profileBVHNode2.count = 0;
|
||||
outNodes.Add(profileBVHNode2);
|
||||
int leftChild = BuildRecursive(bvh, triIndices, start, num3 - start, outNodes);
|
||||
int rightChild = BuildRecursive(bvh, triIndices, num3, start + count - num3, outNodes);
|
||||
int leftChild = this.BuildRecursive(bvh, triIndices, start, num3 - start, outNodes);
|
||||
int rightChild = this.BuildRecursive(bvh, triIndices, num3, start + count - num3, outNodes);
|
||||
profileBVHNode2.leftChild = leftChild;
|
||||
profileBVHNode2.rightChild = rightChild;
|
||||
outNodes[count2] = profileBVHNode2;
|
||||
@@ -222,8 +221,8 @@ public class ProfileUtils_BVHUtil
|
||||
Vector3 val4 = bvh.vertices[profileBVHData3.verA];
|
||||
Vector3 val5 = bvh.vertices[profileBVHData3.verB];
|
||||
Vector3 val6 = bvh.vertices[profileBVHData3.verC];
|
||||
float num3 = (((Vector3)(ref val))[axis] + ((Vector3)(ref val2))[axis] + ((Vector3)(ref val3))[axis]) / 3f;
|
||||
_ = (((Vector3)(ref val4))[axis] + ((Vector3)(ref val5))[axis] + ((Vector3)(ref val6))[axis]) / 3f;
|
||||
float num3 = (val[axis] + val2[axis] + val3[axis]) / 3f;
|
||||
_ = (val4[axis] + val5[axis] + val6[axis]) / 3f;
|
||||
if (num3 < splitPos)
|
||||
{
|
||||
num++;
|
||||
@@ -254,7 +253,7 @@ public class ProfileUtils_BVHUtil
|
||||
return;
|
||||
}
|
||||
ProfileUtils profileUtils = new ProfileUtils();
|
||||
int num = new Random().Next(int.MinValue, int.MaxValue);
|
||||
int num = new System.Random().Next(int.MinValue, int.MaxValue);
|
||||
int count = bvh.vertices.Count;
|
||||
int version;
|
||||
int countInFile;
|
||||
@@ -267,7 +266,7 @@ public class ProfileUtils_BVHUtil
|
||||
Vector3[] array2 = bvh.vertices.ToArray();
|
||||
for (int i = 0; i < array2.Length; i++)
|
||||
{
|
||||
array2[i] = TransformVec3(array2[i], array[i % array.Length]);
|
||||
array2[i] = this.TransformVec3(array2[i], array[i % array.Length]);
|
||||
}
|
||||
ProfileUtil_IndexUtil profileUtil_IndexUtil = new ProfileUtil_IndexUtil();
|
||||
profileUtil_IndexUtil.Build(num);
|
||||
@@ -275,37 +274,37 @@ public class ProfileUtils_BVHUtil
|
||||
profileUtil_IndexUtil.EncodeInto(array2, array3);
|
||||
StringBuilder stringBuilder = new StringBuilder(1024);
|
||||
stringBuilder.Append(profileUtils.GetProfileMagic());
|
||||
AppendHexInt(stringBuilder, profileUtils.GetProfileVersion());
|
||||
AppendHexInt(stringBuilder, num);
|
||||
AppendHexInt(stringBuilder, count);
|
||||
AppendHexInt(stringBuilder, bvh.datas.Length);
|
||||
AppendHexInt(stringBuilder, bvh.nodes.Length);
|
||||
AppendHexInt(stringBuilder, bvh.dataIndices.Length);
|
||||
this.AppendHexInt(stringBuilder, profileUtils.GetProfileVersion());
|
||||
this.AppendHexInt(stringBuilder, num);
|
||||
this.AppendHexInt(stringBuilder, count);
|
||||
this.AppendHexInt(stringBuilder, bvh.datas.Length);
|
||||
this.AppendHexInt(stringBuilder, bvh.nodes.Length);
|
||||
this.AppendHexInt(stringBuilder, bvh.dataIndices.Length);
|
||||
for (int j = 0; j < array3.Length; j++)
|
||||
{
|
||||
AppendHexVec3(stringBuilder, array3[j]);
|
||||
this.AppendHexVec3(stringBuilder, array3[j]);
|
||||
}
|
||||
for (int k = 0; k < bvh.datas.Length; k++)
|
||||
{
|
||||
profileBVHData profileBVHData2 = bvh.datas[k];
|
||||
AppendHexInt(stringBuilder, profileBVHData2.verA);
|
||||
AppendHexInt(stringBuilder, profileBVHData2.verB);
|
||||
AppendHexInt(stringBuilder, profileBVHData2.verC);
|
||||
this.AppendHexInt(stringBuilder, profileBVHData2.verA);
|
||||
this.AppendHexInt(stringBuilder, profileBVHData2.verB);
|
||||
this.AppendHexInt(stringBuilder, profileBVHData2.verC);
|
||||
}
|
||||
for (int l = 0; l < bvh.nodes.Length; l++)
|
||||
{
|
||||
profileBVHNode profileBVHNode2 = bvh.nodes[l];
|
||||
AppendHexVec3(stringBuilder, ((Bounds)(ref profileBVHNode2.bounds)).center);
|
||||
AppendHexVec3(stringBuilder, ((Bounds)(ref profileBVHNode2.bounds)).extents);
|
||||
AppendHexInt(stringBuilder, profileBVHNode2.leftChild);
|
||||
AppendHexInt(stringBuilder, profileBVHNode2.rightChild);
|
||||
AppendHexInt(stringBuilder, profileBVHNode2.start);
|
||||
AppendHexInt(stringBuilder, profileBVHNode2.count);
|
||||
this.AppendHexVec3(stringBuilder, profileBVHNode2.bounds.center);
|
||||
this.AppendHexVec3(stringBuilder, profileBVHNode2.bounds.extents);
|
||||
this.AppendHexInt(stringBuilder, profileBVHNode2.leftChild);
|
||||
this.AppendHexInt(stringBuilder, profileBVHNode2.rightChild);
|
||||
this.AppendHexInt(stringBuilder, profileBVHNode2.start);
|
||||
this.AppendHexInt(stringBuilder, profileBVHNode2.count);
|
||||
stringBuilder.Append(profileBVHNode2.isLeaf ? '1' : '0');
|
||||
}
|
||||
for (int m = 0; m < bvh.dataIndices.Length; m++)
|
||||
{
|
||||
AppendHexInt(stringBuilder, bvh.dataIndices[m]);
|
||||
this.AppendHexInt(stringBuilder, bvh.dataIndices[m]);
|
||||
}
|
||||
string path = (profileName.EndsWith(".eb") ? profileName : (profileName + ".eb"));
|
||||
string text = Path.Combine(Application.dataPath, savePath ?? string.Empty);
|
||||
@@ -321,9 +320,9 @@ public class ProfileUtils_BVHUtil
|
||||
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
|
||||
AppendHexFloat(sb, v.x);
|
||||
AppendHexFloat(sb, v.y);
|
||||
AppendHexFloat(sb, v.z);
|
||||
this.AppendHexFloat(sb, v.x);
|
||||
this.AppendHexFloat(sb, v.y);
|
||||
this.AppendHexFloat(sb, v.z);
|
||||
}
|
||||
|
||||
private void AppendHexFloat(StringBuilder sb, float v)
|
||||
@@ -345,7 +344,7 @@ public class ProfileUtils_BVHUtil
|
||||
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
|
||||
return new Vector3(TransformFloatBits(v.x, k.x), TransformFloatBits(v.y, k.y), TransformFloatBits(v.z, k.z));
|
||||
return new Vector3(this.TransformFloatBits(v.x, k.x), this.TransformFloatBits(v.y, k.y), this.TransformFloatBits(v.z, k.z));
|
||||
}
|
||||
|
||||
private float TransformFloatBits(float a, uint keyBits)
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileUtils_BoneUtil
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileUtils_BoneUtil
|
||||
@@ -15,9 +14,9 @@ public class ProfileUtils_BoneUtil
|
||||
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
|
||||
Mesh sharedMesh = smr.sharedMesh;
|
||||
if ((Object)(object)sharedMesh == (Object)null)
|
||||
if (sharedMesh == null)
|
||||
{
|
||||
Debug.LogError((object)"[ProfileUtils_BoneUtil] SkinnedMeshRenderer에 연결된 Mesh가 없습니다.");
|
||||
Debug.LogError("[ProfileUtils_BoneUtil] SkinnedMeshRenderer에 연결된 Mesh가 없습니다.");
|
||||
return new HashSet<Transform>();
|
||||
}
|
||||
Transform[] bones = smr.bones;
|
||||
@@ -27,21 +26,21 @@ public class ProfileUtils_BoneUtil
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
BoneWeight val = array[i];
|
||||
if (((BoneWeight)(ref val)).weight0 > weightThreshold)
|
||||
if (val.weight0 > weightThreshold)
|
||||
{
|
||||
hashSet.Add(((BoneWeight)(ref val)).boneIndex0);
|
||||
hashSet.Add(val.boneIndex0);
|
||||
}
|
||||
if (((BoneWeight)(ref val)).weight1 > weightThreshold)
|
||||
if (val.weight1 > weightThreshold)
|
||||
{
|
||||
hashSet.Add(((BoneWeight)(ref val)).boneIndex1);
|
||||
hashSet.Add(val.boneIndex1);
|
||||
}
|
||||
if (((BoneWeight)(ref val)).weight2 > weightThreshold)
|
||||
if (val.weight2 > weightThreshold)
|
||||
{
|
||||
hashSet.Add(((BoneWeight)(ref val)).boneIndex2);
|
||||
hashSet.Add(val.boneIndex2);
|
||||
}
|
||||
if (((BoneWeight)(ref val)).weight3 > weightThreshold)
|
||||
if (val.weight3 > weightThreshold)
|
||||
{
|
||||
hashSet.Add(((BoneWeight)(ref val)).boneIndex3);
|
||||
hashSet.Add(val.boneIndex3);
|
||||
}
|
||||
}
|
||||
HashSet<Transform> hashSet2 = new HashSet<Transform>();
|
||||
@@ -61,9 +60,9 @@ public class ProfileUtils_BoneUtil
|
||||
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
|
||||
Dictionary<HumanBodyBones, HashSet<Transform>> dictionary = new Dictionary<HumanBodyBones, HashSet<Transform>>();
|
||||
if ((Object)(object)animator == (Object)null)
|
||||
if (animator == null)
|
||||
{
|
||||
Debug.LogError((object)"[MeshHumanoidBoneMatcher] Animator is Empty");
|
||||
Debug.LogError("[MeshHumanoidBoneMatcher] Animator is Empty");
|
||||
return dictionary;
|
||||
}
|
||||
HashSet<Transform> hashSet = new HashSet<Transform>();
|
||||
@@ -71,13 +70,13 @@ public class ProfileUtils_BoneUtil
|
||||
{
|
||||
foreach (SkinnedMeshRenderer bodyMesh in bodyMeshes)
|
||||
{
|
||||
if ((Object)(object)bodyMesh == (Object)null)
|
||||
if (bodyMesh == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
foreach (Transform activeBone in GetActiveBones(bodyMesh, weightThreshold))
|
||||
foreach (Transform activeBone in this.GetActiveBones(bodyMesh, weightThreshold))
|
||||
{
|
||||
if ((Object)(object)activeBone != (Object)null)
|
||||
if (activeBone != null)
|
||||
{
|
||||
hashSet.Add(activeBone);
|
||||
}
|
||||
@@ -88,13 +87,13 @@ public class ProfileUtils_BoneUtil
|
||||
{
|
||||
HumanBodyBones val = (HumanBodyBones)i;
|
||||
Transform boneTransform = animator.GetBoneTransform(val);
|
||||
if ((Object)(object)boneTransform == (Object)null)
|
||||
if (boneTransform == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
HashSet<Transform> hashSet2 = new HashSet<Transform>();
|
||||
hashSet2.Add(boneTransform);
|
||||
foreach (Transform item in FindBonesByPosition(boneTransform, hashSet, posTolerance))
|
||||
foreach (Transform item in this.FindBonesByPosition(boneTransform, hashSet, posTolerance))
|
||||
{
|
||||
hashSet2.Add(item);
|
||||
}
|
||||
@@ -108,7 +107,7 @@ public class ProfileUtils_BoneUtil
|
||||
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
|
||||
Mesh sharedMesh = smr.sharedMesh;
|
||||
if ((Object)(object)sharedMesh == (Object)null)
|
||||
if (sharedMesh == null)
|
||||
{
|
||||
Debug.LogError((object)"SkinnedMeshRenderer에 연결된 Mesh가 없습니다.");
|
||||
return new HashSet<Transform>();
|
||||
@@ -120,21 +119,21 @@ public class ProfileUtils_BoneUtil
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
BoneWeight val = array[i];
|
||||
if (((BoneWeight)(ref val)).weight0 > weightThreshold)
|
||||
if (val.weight0 > weightThreshold)
|
||||
{
|
||||
hashSet.Add(((BoneWeight)(ref val)).boneIndex0);
|
||||
hashSet.Add(val.boneIndex0);
|
||||
}
|
||||
if (((BoneWeight)(ref val)).weight1 > weightThreshold)
|
||||
if (val.weight1 > weightThreshold)
|
||||
{
|
||||
hashSet.Add(((BoneWeight)(ref val)).boneIndex1);
|
||||
hashSet.Add(val.boneIndex1);
|
||||
}
|
||||
if (((BoneWeight)(ref val)).weight2 > weightThreshold)
|
||||
if (val.weight2 > weightThreshold)
|
||||
{
|
||||
hashSet.Add(((BoneWeight)(ref val)).boneIndex2);
|
||||
hashSet.Add(val.boneIndex2);
|
||||
}
|
||||
if (((BoneWeight)(ref val)).weight3 > weightThreshold)
|
||||
if (val.weight3 > weightThreshold)
|
||||
{
|
||||
hashSet.Add(((BoneWeight)(ref val)).boneIndex3);
|
||||
hashSet.Add(val.boneIndex3);
|
||||
}
|
||||
}
|
||||
HashSet<Transform> hashSet2 = new HashSet<Transform>();
|
||||
@@ -157,7 +156,7 @@ public class ProfileUtils_BoneUtil
|
||||
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
|
||||
List<Transform> list = new List<Transform>();
|
||||
if ((Object)(object)boneToCheck == (Object)null)
|
||||
if (boneToCheck == null)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
@@ -165,10 +164,10 @@ public class ProfileUtils_BoneUtil
|
||||
Vector3 position = boneToCheck.position;
|
||||
foreach (Transform item in smrBoneSet)
|
||||
{
|
||||
if (!((Object)(object)item == (Object)null) && !((Object)(object)item == (Object)(object)boneToCheck) && NameMatches(((Object)((Component)item).gameObject).name, ((Object)((Component)boneToCheck).gameObject).name))
|
||||
if (!(item == null) && !(item == boneToCheck) && this.NameMatches(item.gameObject.name, boneToCheck.gameObject.name))
|
||||
{
|
||||
Vector3 val = item.position - position;
|
||||
if (((Vector3)(ref val)).sqrMagnitude <= num)
|
||||
if (val.sqrMagnitude <= num)
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
@@ -190,8 +189,8 @@ public class ProfileUtils_BoneUtil
|
||||
|
||||
private bool NameMatches(string boneToCheckName, string candidateName)
|
||||
{
|
||||
string[] array = TokenizeBoneName(boneToCheckName);
|
||||
string[] array2 = TokenizeBoneName(candidateName);
|
||||
string[] array = this.TokenizeBoneName(boneToCheckName);
|
||||
string[] array2 = this.TokenizeBoneName(candidateName);
|
||||
if (array.Length == 0 || array2.Length == 0)
|
||||
{
|
||||
return false;
|
||||
@@ -260,7 +259,7 @@ public class ProfileUtils_BoneUtil
|
||||
}
|
||||
foreach (Transform item3 in value)
|
||||
{
|
||||
if (!((Object)(object)item3 == (Object)null) && !dictionary.ContainsKey(item3))
|
||||
if (!(item3 == null) && !dictionary.ContainsKey(item3))
|
||||
{
|
||||
dictionary[item3] = key;
|
||||
}
|
||||
@@ -270,7 +269,7 @@ public class ProfileUtils_BoneUtil
|
||||
BoneData item = new BoneData
|
||||
{
|
||||
id = 0,
|
||||
boneName = (((Object)(object)rootTransform != (Object)null) ? ((Object)rootTransform).name : "Root"),
|
||||
boneName = rootTransform != null ? rootTransform.name : "Root",
|
||||
parentName = null,
|
||||
hierarchyPath = "",
|
||||
hBone = (HumanBodyBones)55,
|
||||
@@ -282,30 +281,30 @@ public class ProfileUtils_BoneUtil
|
||||
};
|
||||
list.Add(item);
|
||||
List<Transform> list2 = (from t in avatarBones
|
||||
where (Object)(object)t != (Object)null
|
||||
orderby GetDepthFromSkeletonRoot(rootTransform, t), GetHierarchyPath(rootTransform, t)
|
||||
where t != null
|
||||
orderby this.GetDepthFromSkeletonRoot(rootTransform, t), this.GetHierarchyPath(rootTransform, t)
|
||||
select t).ToList();
|
||||
Dictionary<Transform, int> dictionary2 = new Dictionary<Transform, int>(list2.Count);
|
||||
int num = 1;
|
||||
foreach (Transform item4 in list2)
|
||||
{
|
||||
dictionary2[item4] = num++;
|
||||
string hierarchyPath = GetHierarchyPath(rootTransform, item4);
|
||||
string hierarchyPath = this.GetHierarchyPath(rootTransform, item4);
|
||||
HumanBodyBones value2;
|
||||
HumanBodyBones hBone = (HumanBodyBones)((!dictionary.TryGetValue(item4, out value2)) ? 55 : ((int)value2));
|
||||
Vector3 rootLocalPosition = (((Object)(object)rootTransform != (Object)null) ? rootTransform.InverseTransformPoint(item4.position) : item4.position);
|
||||
Quaternion rootLocalRotation = (((Object)(object)rootTransform != (Object)null) ? (Quaternion.Inverse(rootTransform.rotation) * item4.rotation) : item4.rotation);
|
||||
Vector3 rootLocalPosition = (rootTransform != null) ? rootTransform.InverseTransformPoint(item4.position) : item4.position;
|
||||
Quaternion rootLocalRotation = (rootTransform != null) ? (Quaternion.Inverse(rootTransform.rotation) * item4.rotation) : item4.rotation;
|
||||
Vector3 lossyScale = item4.lossyScale;
|
||||
if ((Object)(object)rootTransform != (Object)null)
|
||||
if (rootTransform != null)
|
||||
{
|
||||
Vector3 lossyScale2 = rootTransform.lossyScale;
|
||||
((Vector3)(ref lossyScale))._002Ector(SafeDiv(lossyScale.x, lossyScale2.x), SafeDiv(lossyScale.y, lossyScale2.y), SafeDiv(lossyScale.z, lossyScale2.z));
|
||||
lossyScale = new Vector3(this.SafeDiv(lossyScale.x, lossyScale2.x), this.SafeDiv(lossyScale.y, lossyScale2.y), this.SafeDiv(lossyScale.z, lossyScale2.z));
|
||||
}
|
||||
list.Add(new BoneData
|
||||
{
|
||||
id = dictionary2[item4],
|
||||
boneName = ((Object)item4).name,
|
||||
parentName = (((Object)(object)item4.parent != (Object)null) ? ((Object)item4.parent).name : ""),
|
||||
boneName = item4.name,
|
||||
parentName = (item4.parent != null) ? (item4.parent).name : "",
|
||||
hierarchyPath = hierarchyPath,
|
||||
hBone = hBone,
|
||||
parentId = -1,
|
||||
@@ -324,17 +323,17 @@ public class ProfileUtils_BoneUtil
|
||||
{
|
||||
Transform key2 = dictionary2.FirstOrDefault((KeyValuePair<Transform, int> kv) => kv.Value == node.id).Key;
|
||||
int num2 = 0;
|
||||
if ((Object)(object)key2 != (Object)null)
|
||||
if (key2 != null)
|
||||
{
|
||||
Transform parent = key2.parent;
|
||||
while ((Object)(object)parent != (Object)null)
|
||||
while (parent != null)
|
||||
{
|
||||
if (dictionary2.TryGetValue(parent, out var value3))
|
||||
{
|
||||
num2 = value3;
|
||||
break;
|
||||
}
|
||||
if ((Object)(object)parent == (Object)(object)rootTransform)
|
||||
if (parent == rootTransform)
|
||||
{
|
||||
num2 = 0;
|
||||
break;
|
||||
@@ -365,7 +364,7 @@ public class ProfileUtils_BoneUtil
|
||||
{
|
||||
int num = 0;
|
||||
Transform val = t;
|
||||
while ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)root)
|
||||
while (val != null && val != root)
|
||||
{
|
||||
num++;
|
||||
val = val.parent;
|
||||
@@ -375,28 +374,28 @@ public class ProfileUtils_BoneUtil
|
||||
|
||||
private string GetHierarchyPath(Transform root, Transform t)
|
||||
{
|
||||
if ((Object)(object)t == (Object)null)
|
||||
if (t == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if ((Object)(object)root == (Object)null)
|
||||
if (root == null)
|
||||
{
|
||||
return ((Object)t).name;
|
||||
return t.name;
|
||||
}
|
||||
if (!t.IsChildOf(root) && (Object)(object)t != (Object)(object)root)
|
||||
if (!t.IsChildOf(root) && t != root)
|
||||
{
|
||||
Debug.LogError((object)("[ProfileUtils_BoneUtil] GetHierarchyPath - bone " + ((Object)t).name + " is not child of root " + ((Object)root).name));
|
||||
Debug.LogError((object)("[ProfileUtils_BoneUtil] GetHierarchyPath - bone " + t.name + " is not child of root " + root.name));
|
||||
return "";
|
||||
}
|
||||
if ((Object)(object)t == (Object)(object)root)
|
||||
if (t == root)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
Stack<string> stack = new Stack<string>();
|
||||
Transform val = t;
|
||||
while ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)root)
|
||||
while (val != null && val != root)
|
||||
{
|
||||
stack.Push(((Object)val).name);
|
||||
stack.Push(val.name);
|
||||
val = val.parent;
|
||||
}
|
||||
return string.Join("/", stack);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileUtils_PCAUtil
|
||||
using System.Collections.Generic;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileUtils_PCAUtil
|
||||
@@ -89,7 +88,7 @@ public class ProfileUtils_PCAUtil
|
||||
num4 *= num7;
|
||||
num5 *= num7;
|
||||
num6 *= num7;
|
||||
JacobiEigenDecomposition3x3(num, num2, num3, num4, num5, num6, out var eigenValues, out var eigenVectors);
|
||||
this.JacobiEigenDecomposition3x3(num, num2, num3, num4, num5, num6, out var eigenValues, out var eigenVectors);
|
||||
int num8 = 0;
|
||||
if (eigenValues[1] > eigenValues[num8])
|
||||
{
|
||||
@@ -99,7 +98,7 @@ public class ProfileUtils_PCAUtil
|
||||
{
|
||||
num8 = 2;
|
||||
}
|
||||
Vector3 normalized = ((Vector3)(ref eigenVectors[num8])).normalized;
|
||||
Vector3 normalized = eigenVectors[num8].normalized;
|
||||
float num9 = float.PositiveInfinity;
|
||||
float num10 = float.NegativeInfinity;
|
||||
float num11 = 0f;
|
||||
@@ -116,7 +115,7 @@ public class ProfileUtils_PCAUtil
|
||||
}
|
||||
Vector3 val3 = val + normalized * num12;
|
||||
Vector3 val4 = points[k] - val3;
|
||||
float magnitude = ((Vector3)(ref val4)).magnitude;
|
||||
float magnitude = val4.magnitude;
|
||||
num11 += magnitude;
|
||||
}
|
||||
pCAData.pcaCenter = val;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileUtils_PoseUtil
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileUtils_PoseUtil
|
||||
@@ -16,19 +15,19 @@ public class ProfileUtils_PoseUtil
|
||||
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
|
||||
BoneSpatialData boneSpatialData = new BoneSpatialData();
|
||||
boneSpatialData.refBone = refBone;
|
||||
Transform baseBoneFromBoneMap = GetBaseBoneFromBoneMap(boneMap, refBone);
|
||||
Transform baseBoneFromBoneMap = this.GetBaseBoneFromBoneMap(boneMap, refBone);
|
||||
if ((Object)(object)baseBoneFromBoneMap == (Object)null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<Vector3> refVertices = GetRefVertices(influencedBones, boneMap, sourceBodyBakedMeshes, addChildBones);
|
||||
boneSpatialData.pcaData = GetPCAData(baseBoneFromBoneMap, refVertices);
|
||||
Transform baseBoneFromBoneMap2 = GetBaseBoneFromBoneMap(boneMap, (HumanBodyBones)0);
|
||||
boneSpatialData.volumeData = GetVolumeData(baseBoneFromBoneMap, baseBoneFromBoneMap2, refVertices);
|
||||
List<Vector3> refVertices = this.GetRefVertices(influencedBones, boneMap, sourceBodyBakedMeshes, addChildBones);
|
||||
boneSpatialData.pcaData = this.GetPCAData(baseBoneFromBoneMap, refVertices);
|
||||
Transform baseBoneFromBoneMap2 = this.GetBaseBoneFromBoneMap(boneMap, (HumanBodyBones)0);
|
||||
boneSpatialData.volumeData = this.GetVolumeData(baseBoneFromBoneMap, baseBoneFromBoneMap2, refVertices);
|
||||
return boneSpatialData;
|
||||
}
|
||||
|
||||
private unsafe List<Vector3> GetRefVertices(HumanBodyBones[] influencedBones, Dictionary<HumanBodyBones, HashSet<Transform>> boneMap, List<ProfileBakedBodyMesh> sourceBodyBakedMeshes, bool addChildBones = false, float weightThreshold = 0.15f, int sampleStep = 1)
|
||||
private List<Vector3> GetRefVertices(HumanBodyBones[] influencedBones, Dictionary<HumanBodyBones, HashSet<Transform>> boneMap, List<ProfileBakedBodyMesh> sourceBodyBakedMeshes, bool addChildBones = false, float weightThreshold = 0.15f, int sampleStep = 1)
|
||||
{
|
||||
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
|
||||
@@ -53,7 +52,7 @@ public class ProfileUtils_PoseUtil
|
||||
}
|
||||
if (targetBoneSet.Count == 0)
|
||||
{
|
||||
string text = string.Join(", ", influencedBones.Select((HumanBodyBones b) => ((object)(*(HumanBodyBones*)(&b))/*cast due to .constrained prefix*/).ToString()));
|
||||
string text = string.Join(", ", influencedBones.Select((HumanBodyBones b) => b.ToString()));
|
||||
Debug.LogError((object)("[ProfileSaver_PoseUtil] CollectBodyPartVerticesWorld: targetBoneSet is empty.\nMissing Humanoid Set : " + text));
|
||||
return list;
|
||||
}
|
||||
@@ -85,10 +84,10 @@ public class ProfileUtils_PoseUtil
|
||||
{
|
||||
BoneWeight val = boneWeights[num2];
|
||||
float wSum = 0f;
|
||||
Acc(((BoneWeight)(ref val)).boneIndex0, ((BoneWeight)(ref val)).weight0);
|
||||
Acc(((BoneWeight)(ref val)).boneIndex1, ((BoneWeight)(ref val)).weight1);
|
||||
Acc(((BoneWeight)(ref val)).boneIndex2, ((BoneWeight)(ref val)).weight2);
|
||||
Acc(((BoneWeight)(ref val)).boneIndex3, ((BoneWeight)(ref val)).weight3);
|
||||
Acc(val.boneIndex0, val.weight0);
|
||||
Acc(val.boneIndex1, val.weight1);
|
||||
Acc(val.boneIndex2, val.weight2);
|
||||
Acc(val.boneIndex3, val.weight3);
|
||||
if (!(wSum < weightThreshold))
|
||||
{
|
||||
list.Add(worldVertices[num2]);
|
||||
@@ -139,7 +138,7 @@ public class ProfileUtils_PoseUtil
|
||||
pcaCenter = originTransform.InverseTransformPoint(pCAData.pcaCenter)
|
||||
};
|
||||
Vector3 val = originTransform.InverseTransformDirection(pCAData.pcaPrincipalAxis);
|
||||
obj.pcaPrincipalAxis = ((Vector3)(ref val)).normalized;
|
||||
obj.pcaPrincipalAxis = val.normalized;
|
||||
obj.pcaLength = pCAData.pcaLength;
|
||||
obj.pcaAvgRadius = pCAData.pcaAvgRadius;
|
||||
if (Mathf.Abs(pCAData.pcaLength) < 0.0001f)
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileUtils_VertexUtil
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileUtils_VertexUtil
|
||||
@@ -43,8 +42,8 @@ public class ProfileUtils_VertexUtil
|
||||
return null;
|
||||
}
|
||||
num += 4;
|
||||
version = ReadHexIntSafe(text, ref num);
|
||||
countInFile = ReadHexIntSafe(text, ref num);
|
||||
version = this.ReadHexIntSafe(text, ref num);
|
||||
countInFile = this.ReadHexIntSafe(text, ref num);
|
||||
if (countInFile <= 0)
|
||||
{
|
||||
Debug.LogError((object)"[ProfileUtil_VertexUtil] LoadTable - invalid count");
|
||||
@@ -53,7 +52,7 @@ public class ProfileUtils_VertexUtil
|
||||
BaseKey3[] array = new BaseKey3[countInFile];
|
||||
for (int i = 0; i < countInFile; i++)
|
||||
{
|
||||
array[i] = ReadHexKey3Safe(text, ref num);
|
||||
array[i] = this.ReadHexKey3Safe(text, ref num);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
@@ -72,9 +71,9 @@ public class ProfileUtils_VertexUtil
|
||||
|
||||
private BaseKey3 ReadHexKey3Safe(string s, ref int p)
|
||||
{
|
||||
int x = ReadHexIntSafe(s, ref p);
|
||||
uint y = (uint)ReadHexIntSafe(s, ref p);
|
||||
uint z = (uint)ReadHexIntSafe(s, ref p);
|
||||
int x = this.ReadHexIntSafe(s, ref p);
|
||||
uint y = (uint)this.ReadHexIntSafe(s, ref p);
|
||||
uint z = (uint)this.ReadHexIntSafe(s, ref p);
|
||||
return new BaseKey3((uint)x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.ProfileUtils_VolumeUtil
|
||||
using System.Collections.Generic;
|
||||
using Eden.AutoMorpher.profile;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProfileUtils_VolumeUtil
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.VolumeData
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.profileBVHData
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,
|
||||
// for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.
|
||||
// EdenAutoMorpher_ProfileSaver_Script, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Eden.AutoMorpher.profile.profileBVHNode
|
||||
|
||||
Reference in New Issue
Block a user