IKManager.cs 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  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. }
  262. if (IKManager.swapFlipDic == null || IKManager.swapFlipDic.Count <= 0)
  263. {
  264. IKManager.swapFlipDic.Add(IKManager.BoneType.Clavicle_R, IKManager.BoneType.Clavicle_L);
  265. IKManager.swapFlipDic.Add(IKManager.BoneType.UpperArm_R, IKManager.BoneType.UpperArm_L);
  266. IKManager.swapFlipDic.Add(IKManager.BoneType.Forearm_R, IKManager.BoneType.Forearm_L);
  267. IKManager.swapFlipDic.Add(IKManager.BoneType.Thigh_R, IKManager.BoneType.Thigh_L);
  268. IKManager.swapFlipDic.Add(IKManager.BoneType.Calf_R, IKManager.BoneType.Calf_L);
  269. IKManager.swapFlipDic.Add(IKManager.BoneType.Hand_R, IKManager.BoneType.Hand_L);
  270. IKManager.swapFlipDic.Add(IKManager.BoneType.Foot_R, IKManager.BoneType.Foot_L);
  271. List<KeyValuePair<IKManager.BoneType, IKManager.BoneType>> list = new List<KeyValuePair<IKManager.BoneType, IKManager.BoneType>>();
  272. foreach (KeyValuePair<IKManager.BoneType, IKManager.BoneType> keyValuePair in IKManager.swapFlipDic)
  273. {
  274. list.Add(new KeyValuePair<IKManager.BoneType, IKManager.BoneType>(keyValuePair.Value, keyValuePair.Key));
  275. }
  276. foreach (KeyValuePair<IKManager.BoneType, IKManager.BoneType> keyValuePair2 in list)
  277. {
  278. IKManager.swapFlipDic.Add(keyValuePair2.Key, keyValuePair2.Value);
  279. }
  280. }
  281. Dictionary<IKManager.BoneType, Vector3> dictionary = new Dictionary<IKManager.BoneType, Vector3>();
  282. for (int j = 0; j <= 68; j++)
  283. {
  284. IKManager.BoneType boneType = (IKManager.BoneType)j;
  285. if (!IKManager.notFlipTypes.Contains(boneType))
  286. {
  287. Transform transform = this.bone_dic_[boneType].Value.transform;
  288. dictionary.Add(boneType, transform.rotation.eulerAngles);
  289. }
  290. }
  291. Quaternion rotation = Quaternion.identity;
  292. Vector3 vector = Vector3.zero;
  293. for (int k = 0; k < this.sort_bone_list_.Count; k++)
  294. {
  295. IKManager.BoneType key = this.sort_bone_list_[k].Key;
  296. if (!IKManager.notFlipTypes.Contains(key))
  297. {
  298. vector = dictionary[key];
  299. if (key == IKManager.BoneType.Root)
  300. {
  301. rotation = Quaternion.Euler(360f - (vector.x + 270f) - 270f, 360f - (vector.y + 90f) - 90f, 360f - vector.z);
  302. }
  303. else
  304. {
  305. if (IKManager.swapFlipDic.ContainsKey(key))
  306. {
  307. vector = dictionary[IKManager.swapFlipDic[key]];
  308. }
  309. rotation = Quaternion.Euler(360f - vector.x, 360f - (vector.y + 90f) - 90f, vector.z);
  310. }
  311. this.bone_dic_[key].Value.transform.rotation = rotation;
  312. }
  313. }
  314. byte[] binary = this.finger_blend_.right_arm_finger.GetBinary();
  315. byte[] binary2 = this.finger_blend_.left_arm_finger.GetBinary();
  316. this.finger_blend_.right_arm_finger.SetBinary(binary2, true);
  317. this.finger_blend_.left_arm_finger.SetBinary(binary, true);
  318. binary = this.finger_blend_.right_leg_finger.GetBinary();
  319. binary2 = this.finger_blend_.left_leg_finger.GetBinary();
  320. this.finger_blend_.right_leg_finger.SetBinary(binary2, true);
  321. this.finger_blend_.left_leg_finger.SetBinary(binary, true);
  322. }
  323. public void SetRotateVisibleBone(IKManager.BoneType bone_type, bool visible)
  324. {
  325. this.gizmo_render_dic_[bone_type].Visible = visible;
  326. }
  327. public void SetRotateVisibleBoneSet(IKManager.BoneSetType bone_set_type, bool visible)
  328. {
  329. HashSet<Transform> hashSet = new HashSet<Transform>();
  330. foreach (KeyValuePair<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>> keyValuePair in this.bone_dic_)
  331. {
  332. KeyValuePair<IKManager.BoneSetType, GameObject> value = keyValuePair.Value;
  333. if (value.Key == bone_set_type)
  334. {
  335. hashSet.Add(value.Value.transform);
  336. }
  337. }
  338. for (int i = 0; i < this.gizmo_render_list_.Count; i++)
  339. {
  340. if (hashSet.Contains(this.gizmo_render_list_[i].target_trans))
  341. {
  342. this.gizmo_render_list_[i].Visible = visible;
  343. }
  344. }
  345. }
  346. public void SetTransAxisVisibleBoneSet(IKManager.BoneSetType bone_set_type, bool visible)
  347. {
  348. HashSet<LimbControl.Type> hashSet = new HashSet<LimbControl.Type>();
  349. switch (bone_set_type)
  350. {
  351. case IKManager.BoneSetType.Body:
  352. hashSet.Add(LimbControl.Type.Arm_L);
  353. hashSet.Add(LimbControl.Type.Arm_R);
  354. hashSet.Add(LimbControl.Type.Foot_L);
  355. hashSet.Add(LimbControl.Type.Foot_R);
  356. break;
  357. case IKManager.BoneSetType.RightArmFinger:
  358. for (int i = 2; i <= 6; i++)
  359. {
  360. hashSet.Add((LimbControl.Type)i);
  361. }
  362. break;
  363. case IKManager.BoneSetType.LeftArmFinger:
  364. for (int j = 12; j <= 16; j++)
  365. {
  366. hashSet.Add((LimbControl.Type)j);
  367. }
  368. break;
  369. case IKManager.BoneSetType.RightLegFinger:
  370. for (int k = 7; k <= 9; k++)
  371. {
  372. hashSet.Add((LimbControl.Type)k);
  373. }
  374. break;
  375. case IKManager.BoneSetType.LeftLegFinger:
  376. for (int l = 17; l <= 19; l++)
  377. {
  378. hashSet.Add((LimbControl.Type)l);
  379. }
  380. break;
  381. }
  382. foreach (LimbControl limbControl in this.limb_control_list_)
  383. {
  384. if (hashSet.Contains(limbControl.type))
  385. {
  386. limbControl.visible = visible;
  387. }
  388. }
  389. }
  390. public void SetTransAxisVisibleRoot(bool visible)
  391. {
  392. this.root_drag_point_.visible = visible;
  393. }
  394. public void OnDestroy()
  395. {
  396. if (this.root_drag_point_ != null)
  397. {
  398. UnityEngine.Object.Destroy(this.root_drag_point_.gameObject);
  399. }
  400. foreach (LimbControl obj in this.limb_control_list_)
  401. {
  402. UnityEngine.Object.Destroy(obj);
  403. }
  404. foreach (GizmoRenderTarget gizmoRenderTarget in this.gizmo_render_list_)
  405. {
  406. UnityEngine.Object.Destroy(gizmoRenderTarget.gameObject);
  407. }
  408. this.gizmo_render_dic_.Clear();
  409. if (this.maid != null)
  410. {
  411. UnityEngine.Object.Destroy(this.cache_bone_data_);
  412. GameObject gameObject = GameObject.Find("IKDragPointParent/" + this.maid.status.guid);
  413. if (gameObject != null)
  414. {
  415. UnityEngine.Object.Destroy(gameObject.gameObject);
  416. }
  417. }
  418. if (this.finger_blend_ != null)
  419. {
  420. UnityEngine.Object.Destroy(this.finger_blend_);
  421. }
  422. }
  423. public void HistoryNew()
  424. {
  425. if (this.undo_backup_list_.Count == 0)
  426. {
  427. this.HistoryClear();
  428. this.HistoryPush();
  429. }
  430. }
  431. public void HistoryClear()
  432. {
  433. this.undo_backup_list_.Clear();
  434. this.history_point = 0;
  435. }
  436. public void HistoryPush()
  437. {
  438. if (this.maid == null)
  439. {
  440. return;
  441. }
  442. byte[] frameBinary = this.cache_bone_data.GetFrameBinary(true, true);
  443. if (this.undo_backup_list_.Count == 0 || frameBinary != this.undo_backup_list_[this.undo_backup_list_.Count - 1])
  444. {
  445. if (this.history_point < this.undo_backup_list_.Count)
  446. {
  447. this.undo_backup_list_.RemoveRange(this.history_point, this.undo_backup_list_.Count - this.history_point);
  448. }
  449. this.undo_backup_list_.Add(frameBinary);
  450. this.history_point++;
  451. if (200 <= this.undo_backup_list_.Count)
  452. {
  453. this.undo_backup_list_.RemoveAt(0);
  454. this.history_point--;
  455. }
  456. }
  457. }
  458. public bool HistoryUndo()
  459. {
  460. if (this.history_point <= 1)
  461. {
  462. return false;
  463. }
  464. this.history_point--;
  465. this.cache_bone_data.SetFrameBinary(this.undo_backup_list_[this.history_point - 1]);
  466. return true;
  467. }
  468. public bool HistoryRedo()
  469. {
  470. if (this.undo_backup_list_.Count <= this.history_point)
  471. {
  472. return false;
  473. }
  474. this.history_point++;
  475. this.cache_bone_data.SetFrameBinary(this.undo_backup_list_[this.history_point - 1]);
  476. return true;
  477. }
  478. public GameObject GetBone(IKManager.BoneType bone_type)
  479. {
  480. return (!this.bone_dic_.ContainsKey(bone_type)) ? null : this.bone_dic_[bone_type].Value;
  481. }
  482. public CacheBoneDataArray cache_bone_data
  483. {
  484. get
  485. {
  486. return this.cache_bone_data_;
  487. }
  488. }
  489. public Maid maid { get; private set; }
  490. public FingerBlend finger_blend
  491. {
  492. get
  493. {
  494. return this.finger_blend_;
  495. }
  496. }
  497. private void AddLimitComponen()
  498. {
  499. Action<IKManager.BoneType, Vector3, float, float> action = delegate(IKManager.BoneType target_bone, Vector3 axis, float limit, float twist_limit)
  500. {
  501. Transform transform = this.GetBone(target_bone).gameObject.transform;
  502. Quaternion localRotation = transform.localRotation;
  503. transform.localRotation = Quaternion.identity;
  504. RotationLimitAngle rotationLimitAngle = transform.gameObject.AddComponent<RotationLimitAngle>();
  505. rotationLimitAngle.axis = axis;
  506. rotationLimitAngle.limit = limit;
  507. rotationLimitAngle.twistLimit = twist_limit;
  508. transform.localRotation = localRotation;
  509. rotationLimitAngle.enabled = false;
  510. };
  511. Action<IKManager.BoneType, Vector3, Vector2> action2 = delegate(IKManager.BoneType target_bone, Vector3 axis, Vector2 min_max)
  512. {
  513. Transform transform = this.GetBone(target_bone).gameObject.transform;
  514. Quaternion localRotation = transform.localRotation;
  515. transform.localRotation = Quaternion.identity;
  516. RotationLimitHinge rotationLimitHinge = transform.gameObject.AddComponent<RotationLimitHinge>();
  517. rotationLimitHinge.axis = axis;
  518. rotationLimitHinge.min = min_max.x;
  519. rotationLimitHinge.max = min_max.y;
  520. transform.localRotation = localRotation;
  521. rotationLimitHinge.enabled = false;
  522. };
  523. action(IKManager.BoneType.Neck, new Vector3(-1f, 0f, 0f), 85f, 80f);
  524. action2(IKManager.BoneType.Forearm_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  525. action2(IKManager.BoneType.Forearm_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  526. action2(IKManager.BoneType.Calf_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  527. action2(IKManager.BoneType.Calf_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  528. action2(IKManager.BoneType.Finger0_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  529. action2(IKManager.BoneType.Finger1_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  530. action2(IKManager.BoneType.Finger2_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  531. action2(IKManager.BoneType.Finger3_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  532. action2(IKManager.BoneType.Finger4_0_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  533. action2(IKManager.BoneType.Finger0_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  534. action2(IKManager.BoneType.Finger1_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  535. action2(IKManager.BoneType.Finger2_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  536. action2(IKManager.BoneType.Finger3_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  537. action2(IKManager.BoneType.Finger4_0_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  538. action2(IKManager.BoneType.Finger0_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  539. action2(IKManager.BoneType.Finger1_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  540. action2(IKManager.BoneType.Finger2_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  541. action2(IKManager.BoneType.Finger3_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  542. action2(IKManager.BoneType.Finger4_1_L, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  543. action2(IKManager.BoneType.Finger0_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  544. action2(IKManager.BoneType.Finger1_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  545. action2(IKManager.BoneType.Finger2_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  546. action2(IKManager.BoneType.Finger3_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  547. action2(IKManager.BoneType.Finger4_1_R, new Vector3(0f, 0f, -1f), new Vector2(0f, 170f));
  548. action2(IKManager.BoneType.Toe0_0_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  549. action2(IKManager.BoneType.Toe0_0_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  550. action2(IKManager.BoneType.Toe1_0_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  551. action2(IKManager.BoneType.Toe1_0_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  552. action2(IKManager.BoneType.Toe2_0_L, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  553. action2(IKManager.BoneType.Toe2_0_R, new Vector3(0f, 0f, 1f), new Vector2(0f, 170f));
  554. }
  555. public static IKDragPoint CreateIKDragPoint(GameObject obj, Maid maid)
  556. {
  557. GameObject gameObject = GameObject.Find("IKDragPointParent");
  558. if (gameObject == null)
  559. {
  560. gameObject = new GameObject("IKDragPointParent");
  561. }
  562. List<GameObject> list = new List<GameObject>();
  563. for (int i = 0; i < gameObject.transform.childCount; i++)
  564. {
  565. if (gameObject.transform.GetChild(i).childCount == 0 && gameObject.transform.GetChild(i).name != maid.status.guid)
  566. {
  567. list.Add(gameObject.transform.GetChild(i).gameObject);
  568. }
  569. }
  570. foreach (GameObject obj2 in list)
  571. {
  572. UnityEngine.Object.DestroyImmediate(obj2);
  573. }
  574. GameObject gameObject2 = GameObject.Find("IKDragPointParent/" + maid.status.guid);
  575. if (gameObject2 == null)
  576. {
  577. GameObject gameObject3 = new GameObject(maid.status.guid);
  578. gameObject3.transform.SetParent(gameObject.transform, false);
  579. gameObject = gameObject3;
  580. }
  581. else
  582. {
  583. gameObject = gameObject2;
  584. }
  585. GameObject gameObject4 = GameObject.Find("IKDragPointParent/" + maid.status.guid + "/IKDragPoint_" + obj.name);
  586. if (gameObject4 != null)
  587. {
  588. return gameObject4.GetComponent<IKDragPoint>();
  589. }
  590. GameObject gameObject5 = new GameObject("IKDragPoint_" + obj.name);
  591. gameObject5.transform.parent = gameObject.transform;
  592. IKDragPoint ikdragPoint = gameObject5.AddComponent<IKDragPoint>();
  593. ikdragPoint.SetTargetIKPoint(obj);
  594. WorldTransformAxis worldTransformAxis = PhotoWindowManager.CreateWorldTransformAxis(gameObject5, true, true);
  595. ikdragPoint.SetWorldTransformAxis(worldTransformAxis);
  596. return ikdragPoint;
  597. }
  598. private static HashSet<IKManager.BoneType> notFlipTypes = new HashSet<IKManager.BoneType>();
  599. private static Dictionary<IKManager.BoneType, IKManager.BoneType> swapFlipDic = new Dictionary<IKManager.BoneType, IKManager.BoneType>();
  600. private Dictionary<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>> bone_dic_ = new Dictionary<IKManager.BoneType, KeyValuePair<IKManager.BoneSetType, GameObject>>();
  601. private List<KeyValuePair<IKManager.BoneType, GameObject>> sort_bone_list_ = new List<KeyValuePair<IKManager.BoneType, GameObject>>();
  602. private CacheBoneDataArray cache_bone_data_;
  603. private List<LimbControl> limb_control_list_;
  604. private List<GizmoRenderTarget> gizmo_render_list_;
  605. private Dictionary<IKManager.BoneType, GizmoRenderTarget> gizmo_render_dic_;
  606. private FingerBlend finger_blend_;
  607. private IKDragPoint root_drag_point_;
  608. private List<byte[]> undo_backup_list_ = new List<byte[]>();
  609. private int history_point;
  610. public enum BoneType
  611. {
  612. TopFixed,
  613. Root,
  614. Head,
  615. Neck,
  616. Pelvis,
  617. Spine0,
  618. Spine1,
  619. Spine2,
  620. Spine3,
  621. Bust_R,
  622. Clavicle_R,
  623. UpperArm_R,
  624. Forearm_R,
  625. Hand_R,
  626. Hip_R,
  627. Thigh_R,
  628. Calf_R,
  629. Foot_R,
  630. Bust_L,
  631. Clavicle_L,
  632. UpperArm_L,
  633. Forearm_L,
  634. Hand_L,
  635. Hip_L,
  636. Thigh_L,
  637. Calf_L,
  638. Foot_L,
  639. Finger0_Root_R,
  640. Finger0_0_R,
  641. Finger0_1_R,
  642. Finger1_Root_R,
  643. Finger1_0_R,
  644. Finger1_1_R,
  645. Finger2_Root_R,
  646. Finger2_0_R,
  647. Finger2_1_R,
  648. Finger3_Root_R,
  649. Finger3_0_R,
  650. Finger3_1_R,
  651. Finger4_Root_R,
  652. Finger4_0_R,
  653. Finger4_1_R,
  654. Finger0_Root_L,
  655. Finger0_0_L,
  656. Finger0_1_L,
  657. Finger1_Root_L,
  658. Finger1_0_L,
  659. Finger1_1_L,
  660. Finger2_Root_L,
  661. Finger2_0_L,
  662. Finger2_1_L,
  663. Finger3_Root_L,
  664. Finger3_0_L,
  665. Finger3_1_L,
  666. Finger4_Root_L,
  667. Finger4_0_L,
  668. Finger4_1_L,
  669. Toe0_Root_R,
  670. Toe0_0_R,
  671. Toe1_Root_R,
  672. Toe1_0_R,
  673. Toe2_Root_R,
  674. Toe2_0_R,
  675. Toe0_Root_L,
  676. Toe0_0_L,
  677. Toe1_Root_L,
  678. Toe1_0_L,
  679. Toe2_Root_L,
  680. Toe2_0_L,
  681. Mouth,
  682. Bust_L_Sub,
  683. Bust_R_Sub,
  684. Nipple_L,
  685. Nipple_R
  686. }
  687. public enum BoneSetType
  688. {
  689. Body,
  690. RightArmFinger,
  691. LeftArmFinger,
  692. RightLegFinger,
  693. LeftLegFinger
  694. }
  695. }