IKManager.cs 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using RootMotion.FinalIK;
  5. using UnityEngine;
  6. using wf;
  7. public class IKManager : MonoBehaviour
  8. {
  9. public static Dictionary<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>> CreateBoneDic(Maid maid)
  10. {
  11. if (maid == null)
  12. {
  13. return null;
  14. }
  15. NDebug.Assert(maid.body0 != null, "[body0] it does not end load.");
  16. string text = (!maid.boMAN) ? "Bip01" : "ManBip";
  17. Dictionary<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>> dictionary = new Dictionary<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>>();
  18. dictionary.Add(IKManager.BoneType.TopFixed, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text).parent.gameObject));
  19. dictionary.Add(IKManager.BoneType.Root, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text).gameObject));
  20. dictionary.Add(IKManager.BoneType.Head, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Head").gameObject));
  21. dictionary.Add(IKManager.BoneType.Neck, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Neck").gameObject));
  22. dictionary.Add(IKManager.BoneType.Pelvis, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Pelvis").gameObject));
  23. dictionary.Add(IKManager.BoneType.Spine0, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Spine").gameObject));
  24. if (!maid.boMAN)
  25. {
  26. dictionary.Add(IKManager.BoneType.Spine1, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Spine0a").gameObject));
  27. dictionary.Add(IKManager.BoneType.Spine2, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Spine1").gameObject));
  28. dictionary.Add(IKManager.BoneType.Spine3, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Spine1a").gameObject));
  29. }
  30. else
  31. {
  32. dictionary.Add(IKManager.BoneType.Spine1, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Spine1").gameObject));
  33. dictionary.Add(IKManager.BoneType.Spine2, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " Spine2").gameObject));
  34. }
  35. dictionary.Add(IKManager.BoneType.Mouth, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Mouth").gameObject));
  36. if (!maid.boMAN)
  37. {
  38. dictionary.Add(IKManager.BoneType.Bust_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Mune_R").gameObject));
  39. dictionary.Add(IKManager.BoneType.Bust_R_Sub, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Mune_R_sub").gameObject));
  40. dictionary.Add(IKManager.BoneType.Nipple_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Nipple_R").gameObject));
  41. }
  42. dictionary.Add(IKManager.BoneType.Clavicle_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " R Clavicle").gameObject));
  43. dictionary.Add(IKManager.BoneType.UpperArm_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " R UpperArm").gameObject));
  44. dictionary.Add(IKManager.BoneType.Forearm_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " R Forearm").gameObject));
  45. dictionary.Add(IKManager.BoneType.Hand_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " R Hand").gameObject));
  46. if (!maid.boMAN)
  47. {
  48. dictionary.Add(IKManager.BoneType.Bust_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Mune_L").gameObject));
  49. dictionary.Add(IKManager.BoneType.Bust_L_Sub, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Mune_L_sub").gameObject));
  50. dictionary.Add(IKManager.BoneType.Nipple_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Nipple_L").gameObject));
  51. }
  52. dictionary.Add(IKManager.BoneType.Clavicle_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " L Clavicle").gameObject));
  53. dictionary.Add(IKManager.BoneType.UpperArm_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " L UpperArm").gameObject));
  54. dictionary.Add(IKManager.BoneType.Forearm_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " L Forearm").gameObject));
  55. dictionary.Add(IKManager.BoneType.Hand_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " L Hand").gameObject));
  56. if (!maid.boMAN)
  57. {
  58. dictionary.Add(IKManager.BoneType.Hip_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Hip_R").gameObject));
  59. }
  60. dictionary.Add(IKManager.BoneType.Thigh_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " R Thigh").gameObject));
  61. dictionary.Add(IKManager.BoneType.Calf_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " R Calf").gameObject));
  62. dictionary.Add(IKManager.BoneType.Foot_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " R Foot").gameObject));
  63. if (!maid.boMAN)
  64. {
  65. dictionary.Add(IKManager.BoneType.Hip_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone("Hip_L").gameObject));
  66. }
  67. dictionary.Add(IKManager.BoneType.Thigh_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " L Thigh").gameObject));
  68. dictionary.Add(IKManager.BoneType.Calf_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " L Calf").gameObject));
  69. dictionary.Add(IKManager.BoneType.Foot_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.Body, maid.body0.GetBone(text + " L Foot").gameObject));
  70. dictionary.Add(IKManager.BoneType.Finger0_Root_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger0").gameObject));
  71. dictionary.Add(IKManager.BoneType.Finger0_0_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger01").gameObject));
  72. dictionary.Add(IKManager.BoneType.Finger0_1_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger02").gameObject));
  73. dictionary.Add(IKManager.BoneType.Finger1_Root_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger1").gameObject));
  74. dictionary.Add(IKManager.BoneType.Finger1_0_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger11").gameObject));
  75. dictionary.Add(IKManager.BoneType.Finger1_1_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger12").gameObject));
  76. dictionary.Add(IKManager.BoneType.Finger2_Root_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger2").gameObject));
  77. dictionary.Add(IKManager.BoneType.Finger2_0_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger21").gameObject));
  78. dictionary.Add(IKManager.BoneType.Finger2_1_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger22").gameObject));
  79. dictionary.Add(IKManager.BoneType.Finger3_Root_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger3").gameObject));
  80. dictionary.Add(IKManager.BoneType.Finger3_0_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger31").gameObject));
  81. dictionary.Add(IKManager.BoneType.Finger3_1_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger32").gameObject));
  82. dictionary.Add(IKManager.BoneType.Finger4_Root_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger4").gameObject));
  83. dictionary.Add(IKManager.BoneType.Finger4_0_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger41").gameObject));
  84. dictionary.Add(IKManager.BoneType.Finger4_1_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightArmFinger, maid.body0.GetBone(text + " R Finger42").gameObject));
  85. dictionary.Add(IKManager.BoneType.Finger0_Root_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger0").gameObject));
  86. dictionary.Add(IKManager.BoneType.Finger0_0_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger01").gameObject));
  87. dictionary.Add(IKManager.BoneType.Finger0_1_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger02").gameObject));
  88. dictionary.Add(IKManager.BoneType.Finger1_Root_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger1").gameObject));
  89. dictionary.Add(IKManager.BoneType.Finger1_0_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger11").gameObject));
  90. dictionary.Add(IKManager.BoneType.Finger1_1_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger12").gameObject));
  91. dictionary.Add(IKManager.BoneType.Finger2_Root_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger2").gameObject));
  92. dictionary.Add(IKManager.BoneType.Finger2_0_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger21").gameObject));
  93. dictionary.Add(IKManager.BoneType.Finger2_1_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger22").gameObject));
  94. dictionary.Add(IKManager.BoneType.Finger3_Root_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger3").gameObject));
  95. dictionary.Add(IKManager.BoneType.Finger3_0_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger31").gameObject));
  96. dictionary.Add(IKManager.BoneType.Finger3_1_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger32").gameObject));
  97. dictionary.Add(IKManager.BoneType.Finger4_Root_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger4").gameObject));
  98. dictionary.Add(IKManager.BoneType.Finger4_0_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger41").gameObject));
  99. dictionary.Add(IKManager.BoneType.Finger4_1_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftArmFinger, maid.body0.GetBone(text + " L Finger42").gameObject));
  100. if (!maid.boMAN)
  101. {
  102. dictionary.Add(IKManager.BoneType.Toe0_Root_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightLegFinger, maid.body0.GetBone(text + " R Toe2").gameObject));
  103. dictionary.Add(IKManager.BoneType.Toe0_0_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightLegFinger, maid.body0.GetBone(text + " R Toe21").gameObject));
  104. }
  105. dictionary.Add(IKManager.BoneType.Toe1_Root_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightLegFinger, maid.body0.GetBone(text + " R Toe1").gameObject));
  106. if (!maid.boMAN)
  107. {
  108. dictionary.Add(IKManager.BoneType.Toe1_0_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightLegFinger, maid.body0.GetBone(text + " R Toe11").gameObject));
  109. }
  110. dictionary.Add(IKManager.BoneType.Toe2_Root_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightLegFinger, maid.body0.GetBone(text + " R Toe0").gameObject));
  111. if (!maid.boMAN)
  112. {
  113. dictionary.Add(IKManager.BoneType.Toe2_0_R, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightLegFinger, maid.body0.GetBone(text + " R Toe01").gameObject));
  114. }
  115. if (!maid.boMAN)
  116. {
  117. dictionary.Add(IKManager.BoneType.Toe0_Root_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.RightLegFinger, maid.body0.GetBone(text + " L Toe2").gameObject));
  118. dictionary.Add(IKManager.BoneType.Toe0_0_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftLegFinger, maid.body0.GetBone(text + " L Toe21").gameObject));
  119. }
  120. dictionary.Add(IKManager.BoneType.Toe1_Root_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftLegFinger, maid.body0.GetBone(text + " L Toe1").gameObject));
  121. if (!maid.boMAN)
  122. {
  123. dictionary.Add(IKManager.BoneType.Toe1_0_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftLegFinger, maid.body0.GetBone(text + " L Toe11").gameObject));
  124. }
  125. dictionary.Add(IKManager.BoneType.Toe2_Root_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftLegFinger, maid.body0.GetBone(text + " L Toe0").gameObject));
  126. if (!maid.boMAN)
  127. {
  128. dictionary.Add(IKManager.BoneType.Toe2_0_L, new KeyValuePair<IKManager.BoneSetType, GameObject>(IKManager.BoneSetType.LeftLegFinger, maid.body0.GetBone(text + " L Toe01").gameObject));
  129. }
  130. return dictionary;
  131. }
  132. public void Awake()
  133. {
  134. }
  135. public void SetMaid(Maid target_maid)
  136. {
  137. if (this.bone_dic_.Count != 0)
  138. {
  139. return;
  140. }
  141. StopWatch stopWatch = new StopWatch();
  142. this.maid = target_maid;
  143. if (this.maid == null)
  144. {
  145. return;
  146. }
  147. NDebug.Assert(this.maid.body0 != null, "[body0] it does not end load.");
  148. this.cache_bone_data_ = this.maid.gameObject.GetComponent<CacheBoneDataArray>();
  149. if (this.cache_bone_data_ == null)
  150. {
  151. this.cache_bone_data_ = this.maid.gameObject.AddComponent<CacheBoneDataArray>();
  152. this.cache_bone_data_.CreateCache(this.maid.body0.GetBone("Bip01"));
  153. }
  154. this.bone_dic_ = IKManager.CreateBoneDic(this.maid);
  155. List<KeyValuePair<int, IKManager.BoneType>> list = new List<KeyValuePair<int, IKManager.BoneType>>();
  156. Transform transform = this.bone_dic_[IKManager.BoneType.TopFixed].Value.transform;
  157. foreach (KeyValuePair<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>> keyValuePair in this.bone_dic_)
  158. {
  159. Transform transform2 = keyValuePair.Value.Value.transform;
  160. int num = 0;
  161. while (!(transform2 == transform))
  162. {
  163. transform2 = transform2.parent;
  164. num++;
  165. }
  166. list.Add(new KeyValuePair<int, IKManager.BoneType>(num, keyValuePair.Key));
  167. }
  168. list.Sort((KeyValuePair<int, IKManager.BoneType> a, KeyValuePair<int, IKManager.BoneType> b) => a.Key - b.Key);
  169. this.sort_bone_list_ = new List<KeyValuePair<IKManager.BoneType, GameObject>>();
  170. foreach (KeyValuePair<int, IKManager.BoneType> keyValuePair2 in list)
  171. {
  172. this.sort_bone_list_.Add(new KeyValuePair<IKManager.BoneType, GameObject>(keyValuePair2.Value, this.bone_dic_[keyValuePair2.Value].Value));
  173. }
  174. this.limb_control_list_ = new List<LimbControl>();
  175. IEnumerator enumerator3 = Enum.GetValues(typeof(LimbControl.Type)).GetEnumerator();
  176. try
  177. {
  178. while (enumerator3.MoveNext())
  179. {
  180. object obj = enumerator3.Current;
  181. LimbControl.Type type = (LimbControl.Type)obj;
  182. LimbControl limbControl = base.gameObject.AddComponent<LimbControl>();
  183. limbControl.Initialize(this, type);
  184. this.limb_control_list_.Add(limbControl);
  185. }
  186. }
  187. finally
  188. {
  189. IDisposable disposable;
  190. if ((disposable = (enumerator3 as IDisposable)) != null)
  191. {
  192. disposable.Dispose();
  193. }
  194. }
  195. this.root_drag_point_ = IKManager.CreateIKDragPoint(this.GetBone(IKManager.BoneType.Root), this.maid);
  196. this.root_drag_point_.PositonCorrectionEnabled = false;
  197. this.root_drag_point_.cur_drag_event = delegate()
  198. {
  199. this.root_drag_point_.target_ik_point_trans.position = this.root_drag_point_.transform.position;
  200. };
  201. this.root_drag_point_.drag_end_event = delegate()
  202. {
  203. this.HistoryPush();
  204. };
  205. this.AddLimitComponen();
  206. this.gizmo_render_list_ = new List<GizmoRenderTarget>();
  207. this.gizmo_render_dic_ = new Dictionary<IKManager.BoneType, GizmoRenderTarget>();
  208. foreach (KeyValuePair<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>> keyValuePair3 in this.bone_dic_)
  209. {
  210. GameObject gameObject = new GameObject();
  211. gameObject.transform.SetParent(base.transform, false);
  212. gameObject.name = keyValuePair3.Value.ToString();
  213. GizmoRenderTarget gizmoRenderTarget = gameObject.AddComponent<GizmoRenderTarget>();
  214. gizmoRenderTarget.ik_mgr = this;
  215. this.gizmo_render_list_.Add(gizmoRenderTarget);
  216. this.gizmo_render_dic_.Add(keyValuePair3.Key, gizmoRenderTarget);
  217. gizmoRenderTarget.target_trans = keyValuePair3.Value.Value.transform;
  218. gizmoRenderTarget.offsetScale = 0.2f;
  219. gizmoRenderTarget.lineRSelectedThick = 0.2f;
  220. RotationLimitHinge component = keyValuePair3.Value.Value.GetComponent<RotationLimitHinge>();
  221. if (component != null)
  222. {
  223. Vector3 axis = component.axis;
  224. if (axis.x != 0f && axis.y == 0f && axis.z == 0f)
  225. {
  226. gizmoRenderTarget.VisibleRotateY = (gizmoRenderTarget.VisibleRotateZ = false);
  227. }
  228. else if (axis.x == 0f && axis.y != 0f && axis.z == 0f)
  229. {
  230. gizmoRenderTarget.VisibleRotateX = (gizmoRenderTarget.VisibleRotateZ = false);
  231. }
  232. else if (axis.x == 0f && axis.y == 0f && axis.z != 0f)
  233. {
  234. gizmoRenderTarget.VisibleRotateX = (gizmoRenderTarget.VisibleRotateY = false);
  235. }
  236. }
  237. }
  238. this.finger_blend_ = base.gameObject.AddComponent<FingerBlend>();
  239. this.finger_blend_.SetIKManager(this);
  240. FingerBlend.BaseFinger right_arm_finger = this.finger_blend_.right_arm_finger;
  241. bool enabled = false;
  242. this.finger_blend_.left_arm_finger.enabled = enabled;
  243. right_arm_finger.enabled = enabled;
  244. FingerBlend.BaseFinger right_leg_finger = this.finger_blend_.right_leg_finger;
  245. enabled = false;
  246. this.finger_blend_.left_leg_finger.enabled = enabled;
  247. right_leg_finger.enabled = enabled;
  248. }
  249. public void Flip()
  250. {
  251. if (IKManager.notFlipTypes == null || IKManager.notFlipTypes.Count <= 0)
  252. {
  253. IKManager.notFlipTypes.Add(IKManager.BoneType.TopFixed);
  254. IKManager.notFlipTypes.Add(IKManager.BoneType.Head);
  255. IKManager.notFlipTypes.Add(IKManager.BoneType.Bust_R);
  256. IKManager.notFlipTypes.Add(IKManager.BoneType.Bust_L);
  257. for (int i = 27; i <= 68; i++)
  258. {
  259. IKManager.notFlipTypes.Add((IKManager.BoneType)i);
  260. }
  261. for (int j = 69; j <= 73; j++)
  262. {
  263. IKManager.notFlipTypes.Add((IKManager.BoneType)j);
  264. }
  265. }
  266. if (IKManager.swapFlipDic == null || IKManager.swapFlipDic.Count <= 0)
  267. {
  268. IKManager.swapFlipDic.Add(IKManager.BoneType.Clavicle_R, IKManager.BoneType.Clavicle_L);
  269. IKManager.swapFlipDic.Add(IKManager.BoneType.UpperArm_R, IKManager.BoneType.UpperArm_L);
  270. IKManager.swapFlipDic.Add(IKManager.BoneType.Forearm_R, IKManager.BoneType.Forearm_L);
  271. IKManager.swapFlipDic.Add(IKManager.BoneType.Thigh_R, IKManager.BoneType.Thigh_L);
  272. IKManager.swapFlipDic.Add(IKManager.BoneType.Calf_R, IKManager.BoneType.Calf_L);
  273. IKManager.swapFlipDic.Add(IKManager.BoneType.Hand_R, IKManager.BoneType.Hand_L);
  274. IKManager.swapFlipDic.Add(IKManager.BoneType.Foot_R, IKManager.BoneType.Foot_L);
  275. List<KeyValuePair<IKManager.BoneType, IKManager.BoneType>> list = new List<KeyValuePair<IKManager.BoneType, IKManager.BoneType>>();
  276. foreach (KeyValuePair<IKManager.BoneType, IKManager.BoneType> keyValuePair in IKManager.swapFlipDic)
  277. {
  278. list.Add(new KeyValuePair<IKManager.BoneType, IKManager.BoneType>(keyValuePair.Value, keyValuePair.Key));
  279. }
  280. foreach (KeyValuePair<IKManager.BoneType, IKManager.BoneType> keyValuePair2 in list)
  281. {
  282. IKManager.swapFlipDic.Add(keyValuePair2.Key, keyValuePair2.Value);
  283. }
  284. }
  285. Dictionary<IKManager.BoneType, Vector3> dictionary = new Dictionary<IKManager.BoneType, Vector3>();
  286. for (int k = 0; k <= 68; k++)
  287. {
  288. IKManager.BoneType boneType = (IKManager.BoneType)k;
  289. if (!IKManager.notFlipTypes.Contains(boneType))
  290. {
  291. Transform transform = this.bone_dic_[boneType].Value.transform;
  292. dictionary.Add(boneType, transform.rotation.eulerAngles);
  293. }
  294. }
  295. Quaternion rotation = Quaternion.identity;
  296. Vector3 vector = Vector3.zero;
  297. for (int l = 0; l < this.sort_bone_list_.Count; l++)
  298. {
  299. IKManager.BoneType key = this.sort_bone_list_[l].Key;
  300. if (!IKManager.notFlipTypes.Contains(key))
  301. {
  302. if (dictionary.ContainsKey(key))
  303. {
  304. vector = dictionary[key];
  305. if (key == IKManager.BoneType.Root)
  306. {
  307. rotation = Quaternion.Euler(360f - (vector.x + 270f) - 270f, 360f - (vector.y + 90f) - 90f, 360f - vector.z);
  308. }
  309. else
  310. {
  311. if (IKManager.swapFlipDic.ContainsKey(key))
  312. {
  313. vector = dictionary[IKManager.swapFlipDic[key]];
  314. }
  315. rotation = Quaternion.Euler(360f - vector.x, 360f - (vector.y + 90f) - 90f, vector.z);
  316. }
  317. this.bone_dic_[key].Value.transform.rotation = rotation;
  318. }
  319. }
  320. }
  321. byte[] binary = this.finger_blend_.right_arm_finger.GetBinary();
  322. byte[] binary2 = this.finger_blend_.left_arm_finger.GetBinary();
  323. this.finger_blend_.right_arm_finger.SetBinary(binary2, true);
  324. this.finger_blend_.left_arm_finger.SetBinary(binary, true);
  325. binary = this.finger_blend_.right_leg_finger.GetBinary();
  326. binary2 = this.finger_blend_.left_leg_finger.GetBinary();
  327. this.finger_blend_.right_leg_finger.SetBinary(binary2, true);
  328. this.finger_blend_.left_leg_finger.SetBinary(binary, true);
  329. }
  330. public void SetRotateVisibleBone(IKManager.BoneType bone_type, bool visible)
  331. {
  332. this.gizmo_render_dic_[bone_type].Visible = visible;
  333. }
  334. public void SetRotateVisibleBoneSet(IKManager.BoneSetType bone_set_type, bool visible)
  335. {
  336. HashSet<Transform> hashSet = new HashSet<Transform>();
  337. foreach (KeyValuePair<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>> keyValuePair in this.bone_dic_)
  338. {
  339. KeyValuePair<IKManager.BoneSetType, GameObject> value = keyValuePair.Value;
  340. if (value.Key == bone_set_type)
  341. {
  342. hashSet.Add(value.Value.transform);
  343. }
  344. }
  345. for (int i = 0; i < this.gizmo_render_list_.Count; i++)
  346. {
  347. if (hashSet.Contains(this.gizmo_render_list_[i].target_trans))
  348. {
  349. this.gizmo_render_list_[i].Visible = visible;
  350. }
  351. }
  352. }
  353. public void SetTransAxisVisibleBoneSet(IKManager.BoneSetType bone_set_type, bool visible)
  354. {
  355. HashSet<LimbControl.Type> hashSet = new HashSet<LimbControl.Type>();
  356. switch (bone_set_type)
  357. {
  358. case IKManager.BoneSetType.Body:
  359. hashSet.Add(LimbControl.Type.Arm_L);
  360. hashSet.Add(LimbControl.Type.Arm_R);
  361. hashSet.Add(LimbControl.Type.Foot_L);
  362. hashSet.Add(LimbControl.Type.Foot_R);
  363. break;
  364. case IKManager.BoneSetType.RightArmFinger:
  365. for (int i = 2; i <= 6; i++)
  366. {
  367. hashSet.Add((LimbControl.Type)i);
  368. }
  369. break;
  370. case IKManager.BoneSetType.LeftArmFinger:
  371. for (int j = 12; j <= 16; j++)
  372. {
  373. hashSet.Add((LimbControl.Type)j);
  374. }
  375. break;
  376. case IKManager.BoneSetType.RightLegFinger:
  377. for (int k = 7; k <= 9; k++)
  378. {
  379. hashSet.Add((LimbControl.Type)k);
  380. }
  381. break;
  382. case IKManager.BoneSetType.LeftLegFinger:
  383. for (int l = 17; l <= 19; l++)
  384. {
  385. hashSet.Add((LimbControl.Type)l);
  386. }
  387. break;
  388. }
  389. foreach (LimbControl limbControl in this.limb_control_list_)
  390. {
  391. if (hashSet.Contains(limbControl.type))
  392. {
  393. limbControl.visible = visible;
  394. }
  395. }
  396. }
  397. public void SetTransAxisVisibleRoot(bool visible)
  398. {
  399. this.root_drag_point_.visible = visible;
  400. }
  401. public void OnDestroy()
  402. {
  403. if (this.root_drag_point_ != null)
  404. {
  405. UnityEngine.Object.Destroy(this.root_drag_point_.gameObject);
  406. }
  407. foreach (LimbControl obj in this.limb_control_list_)
  408. {
  409. UnityEngine.Object.Destroy(obj);
  410. }
  411. foreach (GizmoRenderTarget gizmoRenderTarget in this.gizmo_render_list_)
  412. {
  413. UnityEngine.Object.Destroy(gizmoRenderTarget.gameObject);
  414. }
  415. this.gizmo_render_dic_.Clear();
  416. if (this.maid != null)
  417. {
  418. UnityEngine.Object.Destroy(this.cache_bone_data_);
  419. GameObject gameObject = GameObject.Find("IKDragPointParent/" + this.maid.status.guid);
  420. if (gameObject != null)
  421. {
  422. UnityEngine.Object.Destroy(gameObject.gameObject);
  423. }
  424. }
  425. if (this.finger_blend_ != null)
  426. {
  427. UnityEngine.Object.Destroy(this.finger_blend_);
  428. }
  429. }
  430. public void HistoryNew()
  431. {
  432. if (this.undo_backup_list_.Count == 0)
  433. {
  434. this.HistoryClear();
  435. this.HistoryPush();
  436. }
  437. }
  438. public void HistoryClear()
  439. {
  440. this.undo_backup_list_.Clear();
  441. this.history_point = 0;
  442. }
  443. public void HistoryPush()
  444. {
  445. if (this.maid == null)
  446. {
  447. return;
  448. }
  449. byte[] frameBinary = this.cache_bone_data.GetFrameBinary(true, true);
  450. if (this.undo_backup_list_.Count == 0 || frameBinary != this.undo_backup_list_[this.undo_backup_list_.Count - 1])
  451. {
  452. if (this.history_point < this.undo_backup_list_.Count)
  453. {
  454. this.undo_backup_list_.RemoveRange(this.history_point, this.undo_backup_list_.Count - this.history_point);
  455. }
  456. this.undo_backup_list_.Add(frameBinary);
  457. this.history_point++;
  458. if (200 <= this.undo_backup_list_.Count)
  459. {
  460. this.undo_backup_list_.RemoveAt(0);
  461. this.history_point--;
  462. }
  463. }
  464. }
  465. public bool HistoryUndo()
  466. {
  467. if (this.history_point <= 1)
  468. {
  469. return false;
  470. }
  471. this.history_point--;
  472. this.cache_bone_data.SetFrameBinary(this.undo_backup_list_[this.history_point - 1]);
  473. return true;
  474. }
  475. public bool HistoryRedo()
  476. {
  477. if (this.undo_backup_list_.Count <= this.history_point)
  478. {
  479. return false;
  480. }
  481. this.history_point++;
  482. this.cache_bone_data.SetFrameBinary(this.undo_backup_list_[this.history_point - 1]);
  483. return true;
  484. }
  485. public GameObject GetBone(IKManager.BoneType bone_type)
  486. {
  487. return (!this.bone_dic_.ContainsKey(bone_type)) ? null : this.bone_dic_[bone_type].Value;
  488. }
  489. public CacheBoneDataArray cache_bone_data
  490. {
  491. get
  492. {
  493. return this.cache_bone_data_;
  494. }
  495. }
  496. public Maid maid { get; private set; }
  497. public FingerBlend finger_blend
  498. {
  499. get
  500. {
  501. return this.finger_blend_;
  502. }
  503. }
  504. private void AddLimitComponen()
  505. {
  506. Action<IKManager.BoneType, Vector3, float, float> action = delegate(IKManager.BoneType target_bone, Vector3 axis, float limit, float twist_limit)
  507. {
  508. Transform transform = this.GetBone(target_bone).gameObject.transform;
  509. Quaternion localRotation = transform.localRotation;
  510. transform.localRotation = Quaternion.identity;
  511. RotationLimitAngle rotationLimitAngle = transform.gameObject.AddComponent<RotationLimitAngle>();
  512. rotationLimitAngle.axis = axis;
  513. rotationLimitAngle.limit = limit;
  514. rotationLimitAngle.twistLimit = twist_limit;
  515. transform.localRotation = localRotation;
  516. rotationLimitAngle.enabled = false;
  517. };
  518. Action<IKManager.BoneType, Vector3, Vector2> action2 = delegate(IKManager.BoneType target_bone, Vector3 axis, Vector2 min_max)
  519. {
  520. Transform transform = this.GetBone(target_bone).gameObject.transform;
  521. Quaternion localRotation = transform.localRotation;
  522. transform.localRotation = Quaternion.identity;
  523. RotationLimitHinge rotationLimitHinge = transform.gameObject.AddComponent<RotationLimitHinge>();
  524. rotationLimitHinge.axis = axis;
  525. rotationLimitHinge.min = min_max.x;
  526. rotationLimitHinge.max = min_max.y;
  527. transform.localRotation = localRotation;
  528. rotationLimitHinge.enabled = false;
  529. };
  530. action(IKManager.BoneType.Neck, new Vector3(-1f, 0f, 0f), 85f, 80f);
  531. action2(IKManager.BoneType.Forearm_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  532. action2(IKManager.BoneType.Forearm_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  533. action2(IKManager.BoneType.Calf_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  534. action2(IKManager.BoneType.Calf_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  535. action2(IKManager.BoneType.Finger0_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  536. action2(IKManager.BoneType.Finger1_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  537. action2(IKManager.BoneType.Finger2_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  538. action2(IKManager.BoneType.Finger3_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  539. action2(IKManager.BoneType.Finger4_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  540. action2(IKManager.BoneType.Finger0_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  541. action2(IKManager.BoneType.Finger1_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  542. action2(IKManager.BoneType.Finger2_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  543. action2(IKManager.BoneType.Finger3_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  544. action2(IKManager.BoneType.Finger4_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  545. action2(IKManager.BoneType.Finger0_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  546. action2(IKManager.BoneType.Finger1_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  547. action2(IKManager.BoneType.Finger2_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  548. action2(IKManager.BoneType.Finger3_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  549. action2(IKManager.BoneType.Finger4_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  550. action2(IKManager.BoneType.Finger0_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  551. action2(IKManager.BoneType.Finger1_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  552. action2(IKManager.BoneType.Finger2_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  553. action2(IKManager.BoneType.Finger3_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  554. action2(IKManager.BoneType.Finger4_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  555. action2(IKManager.BoneType.Toe0_0_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  556. action2(IKManager.BoneType.Toe0_0_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  557. action2(IKManager.BoneType.Toe1_0_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  558. action2(IKManager.BoneType.Toe1_0_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  559. action2(IKManager.BoneType.Toe2_0_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  560. action2(IKManager.BoneType.Toe2_0_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  561. }
  562. public static IKDragPoint CreateIKDragPoint(GameObject obj, Maid maid)
  563. {
  564. GameObject gameObject = GameObject.Find("IKDragPointParent");
  565. if (gameObject == null)
  566. {
  567. gameObject = new GameObject("IKDragPointParent");
  568. }
  569. List<GameObject> list = new List<GameObject>();
  570. for (int i = 0; i < gameObject.transform.childCount; i++)
  571. {
  572. if (gameObject.transform.GetChild(i).childCount == 0 && gameObject.transform.GetChild(i).name != maid.status.guid)
  573. {
  574. list.Add(gameObject.transform.GetChild(i).gameObject);
  575. }
  576. }
  577. foreach (GameObject obj2 in list)
  578. {
  579. UnityEngine.Object.DestroyImmediate(obj2);
  580. }
  581. GameObject gameObject2 = GameObject.Find("IKDragPointParent/" + maid.status.guid);
  582. if (gameObject2 == null)
  583. {
  584. GameObject gameObject3 = new GameObject(maid.status.guid);
  585. gameObject3.transform.SetParent(gameObject.transform, false);
  586. gameObject = gameObject3;
  587. }
  588. else
  589. {
  590. gameObject = gameObject2;
  591. }
  592. GameObject gameObject4 = GameObject.Find("IKDragPointParent/" + maid.status.guid + "/IKDragPoint_" + obj.name);
  593. if (gameObject4 != null)
  594. {
  595. return gameObject4.GetComponent<IKDragPoint>();
  596. }
  597. GameObject gameObject5 = new GameObject("IKDragPoint_" + obj.name);
  598. gameObject5.transform.parent = gameObject.transform;
  599. IKDragPoint ikdragPoint = gameObject5.AddComponent<IKDragPoint>();
  600. ikdragPoint.SetTargetIKPoint(obj);
  601. WorldTransformAxis worldTransformAxis = PhotoWindowManager.CreateWorldTransformAxis(gameObject5, true, true);
  602. ikdragPoint.SetWorldTransformAxis(worldTransformAxis);
  603. return ikdragPoint;
  604. }
  605. private static HashSet<IKManager.BoneType> notFlipTypes = new HashSet<IKManager.BoneType>();
  606. private static Dictionary<IKManager.BoneType, IKManager.BoneType> swapFlipDic = new Dictionary<IKManager.BoneType, IKManager.BoneType>();
  607. private Dictionary<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>> bone_dic_ = new Dictionary<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>>();
  608. private List<KeyValuePair<IKManager.BoneType, GameObject>> sort_bone_list_ = new List<KeyValuePair<IKManager.BoneType, GameObject>>();
  609. private CacheBoneDataArray cache_bone_data_;
  610. private List<LimbControl> limb_control_list_;
  611. private List<GizmoRenderTarget> gizmo_render_list_;
  612. private Dictionary<IKManager.BoneType, GizmoRenderTarget> gizmo_render_dic_;
  613. private FingerBlend finger_blend_;
  614. private IKDragPoint root_drag_point_;
  615. private List<byte[]> undo_backup_list_ = new List<byte[]>();
  616. private int history_point;
  617. public enum BoneType
  618. {
  619. TopFixed,
  620. Root,
  621. Head,
  622. Neck,
  623. Pelvis,
  624. Spine0,
  625. Spine1,
  626. Spine2,
  627. Spine3,
  628. Bust_R,
  629. Clavicle_R,
  630. UpperArm_R,
  631. Forearm_R,
  632. Hand_R,
  633. Hip_R,
  634. Thigh_R,
  635. Calf_R,
  636. Foot_R,
  637. Bust_L,
  638. Clavicle_L,
  639. UpperArm_L,
  640. Forearm_L,
  641. Hand_L,
  642. Hip_L,
  643. Thigh_L,
  644. Calf_L,
  645. Foot_L,
  646. Finger0_Root_R,
  647. Finger0_0_R,
  648. Finger0_1_R,
  649. Finger1_Root_R,
  650. Finger1_0_R,
  651. Finger1_1_R,
  652. Finger2_Root_R,
  653. Finger2_0_R,
  654. Finger2_1_R,
  655. Finger3_Root_R,
  656. Finger3_0_R,
  657. Finger3_1_R,
  658. Finger4_Root_R,
  659. Finger4_0_R,
  660. Finger4_1_R,
  661. Finger0_Root_L,
  662. Finger0_0_L,
  663. Finger0_1_L,
  664. Finger1_Root_L,
  665. Finger1_0_L,
  666. Finger1_1_L,
  667. Finger2_Root_L,
  668. Finger2_0_L,
  669. Finger2_1_L,
  670. Finger3_Root_L,
  671. Finger3_0_L,
  672. Finger3_1_L,
  673. Finger4_Root_L,
  674. Finger4_0_L,
  675. Finger4_1_L,
  676. Toe0_Root_R,
  677. Toe0_0_R,
  678. Toe1_Root_R,
  679. Toe1_0_R,
  680. Toe2_Root_R,
  681. Toe2_0_R,
  682. Toe0_Root_L,
  683. Toe0_0_L,
  684. Toe1_Root_L,
  685. Toe1_0_L,
  686. Toe2_Root_L,
  687. Toe2_0_L,
  688. Mouth,
  689. Bust_L_Sub,
  690. Bust_R_Sub,
  691. Nipple_L,
  692. Nipple_R
  693. }
  694. public enum BoneSetType
  695. {
  696. Body,
  697. RightArmFinger,
  698. LeftArmFinger,
  699. RightLegFinger,
  700. LeftLegFinger
  701. }
  702. }