TBodySkin.cs 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using System.Reflection;
  6. using System.Text.RegularExpressions;
  7. using UnityEngine;
  8. public class TBodySkin
  9. {
  10. public TBodySkin(TBody body_, string cate_, TBody.SlotID slot_id_, bool man)
  11. {
  12. this.boVisible = true;
  13. this.body = body_;
  14. this.Category = cate_;
  15. this.SlotId = slot_id_;
  16. this.m_bMan = man;
  17. this.m_trMaid = this.body.maid.transform;
  18. this.m_trMaidOffs = this.body.maid.m_goOffset.transform;
  19. this.bonehair = new TBoneHair_(this);
  20. this.TextureCache = new InfinityColorTextureCache(body_.maid);
  21. this.bonehair2 = new BoneHair2(this);
  22. this.bonehair3 = new BoneHair3(this);
  23. this.m_HairLengthCtrl = new TBodySkin.HairLengthCtrl(this);
  24. }
  25. public void AddRtMaterial(Material f_mat)
  26. {
  27. this.m_listRtMaterial.Add(f_mat);
  28. }
  29. public void DeleteObj()
  30. {
  31. this.m_ParentMPN = MPN.null_mpn;
  32. this.m_mp = null;
  33. this.m_animItem = null;
  34. this.body.MulTexRemove(this.Category);
  35. this.TextureCache.RemoveTexture();
  36. this.m_listManAlphaMat.Clear();
  37. this.m_HairLengthCtrl.NotExistThenClearHairLength();
  38. this.listTrs = null;
  39. this.listTrsScr = null;
  40. this.trsBoneAttach = null;
  41. foreach (UnityEngine.Object @object in this.listDEL)
  42. {
  43. UnityEngine.Object.DestroyImmediate(@object);
  44. }
  45. this.listDEL = new List<UnityEngine.Object>();
  46. this.boMizugi = false;
  47. if (this.morph != null)
  48. {
  49. this.morph.DeleteObj();
  50. this.morph = null;
  51. }
  52. this.boVisible = false;
  53. this.listMaskSlot = new List<int>();
  54. this.m_dicBackupShader.Clear();
  55. if (this.bonehair != null)
  56. {
  57. this.bonehair.Init();
  58. }
  59. if (this.bonehair2 != null)
  60. {
  61. this.bonehair2.Uninit();
  62. }
  63. if (this.bonehair3 != null)
  64. {
  65. this.bonehair3.Uninit();
  66. }
  67. if (this.obj != null)
  68. {
  69. this.obj_tr.parent = null;
  70. UnityEngine.Object.DestroyImmediate(this.obj);
  71. this.obj = null;
  72. this.obj_tr = null;
  73. }
  74. this.m_dicDelNodeParts.Clear();
  75. this.m_dicParam.Clear();
  76. this.m_dicParam2.Clear();
  77. this.m_OriVert.Clear();
  78. this.m_ParentMPN = MPN.null_mpn;
  79. this.m_mp = null;
  80. }
  81. public void NewParamSet(string A)
  82. {
  83. string[] stringList = UTY.GetStringList(A);
  84. string key = stringList[1];
  85. int num = (stringList.Length - 2) / 2;
  86. KeyValuePair<float, string>[] array = new KeyValuePair<float, string>[num];
  87. for (int i = 0; i < num; i++)
  88. {
  89. string value = stringList[3 + i * 2];
  90. float key2 = float.Parse(stringList[2 + i * 2]);
  91. array[i] = new KeyValuePair<float, string>(key2, value);
  92. }
  93. this.dicParamSet[key] = array;
  94. }
  95. public void SetParam(string f_strTag, string f_strValue)
  96. {
  97. if (this.m_dicParam.ContainsKey(f_strTag))
  98. {
  99. this.m_dicParam[f_strTag] = f_strValue;
  100. }
  101. else
  102. {
  103. this.m_dicParam.Add(f_strTag, f_strValue);
  104. }
  105. }
  106. public string GetParam(string f_strTag)
  107. {
  108. string empty;
  109. this.m_dicParam.TryGetValue(f_strTag, out empty);
  110. if (empty == null)
  111. {
  112. empty = string.Empty;
  113. }
  114. return empty;
  115. }
  116. public void SetParam2(string f_strTag, string f_strValue)
  117. {
  118. if (this.m_dicParam2.ContainsKey(f_strTag))
  119. {
  120. this.m_dicParam2[f_strTag] = f_strValue;
  121. }
  122. else
  123. {
  124. this.m_dicParam2.Add(f_strTag, f_strValue);
  125. }
  126. }
  127. public string GetParam2(string f_strTag)
  128. {
  129. string empty;
  130. this.m_dicParam2.TryGetValue(f_strTag, out empty);
  131. if (empty == null)
  132. {
  133. empty = string.Empty;
  134. }
  135. return empty;
  136. }
  137. public void SetMaterialProperty(MPN f_SrcMpn, int f_nMatNo, string f_strPropName, string f_strTypeName, string f_strValue, bool f_bEditSave)
  138. {
  139. if (this.obj == null)
  140. {
  141. return;
  142. }
  143. foreach (Transform transform in this.obj.transform.GetComponentsInChildren<Transform>(true))
  144. {
  145. Renderer component = transform.GetComponent<Renderer>();
  146. if (component != null && component.material != null && f_nMatNo < component.materials.Length)
  147. {
  148. Material material = component.materials[f_nMatNo];
  149. if (f_strTypeName == "DEFINE")
  150. {
  151. if (f_strValue == "0")
  152. {
  153. material.DisableKeyword(f_strPropName);
  154. }
  155. else if (f_strValue == "1")
  156. {
  157. material.EnableKeyword(f_strPropName);
  158. }
  159. }
  160. else
  161. {
  162. Type type = Assembly.Load("UnityEngine.dll").GetType(f_strTypeName);
  163. if (type == null)
  164. {
  165. type = Type.GetType(f_strTypeName, false, true);
  166. }
  167. if (type == null)
  168. {
  169. Debug.LogError("タイプ " + f_strTypeName + " は存在しません。");
  170. return;
  171. }
  172. if (material.HasProperty(f_strPropName))
  173. {
  174. material.SetFloat(f_strPropName, float.Parse(f_strValue));
  175. if (f_bEditSave)
  176. {
  177. this.body.maid.SetMaterialProperty(f_SrcMpn, this.SlotId, f_nMatNo, f_strPropName, f_strTypeName, f_strValue);
  178. }
  179. else
  180. {
  181. MatPropSave materialProperty = this.body.maid.GetMaterialProperty(f_SrcMpn, this.SlotId);
  182. if (materialProperty != null)
  183. {
  184. this.SetMaterialProperty(f_SrcMpn, materialProperty.nMatNo, materialProperty.strPropName, materialProperty.strTypeName, materialProperty.strValue, true);
  185. }
  186. }
  187. }
  188. else
  189. {
  190. Debug.LogWarning(f_strPropName + "はありませんでした。");
  191. }
  192. }
  193. }
  194. }
  195. }
  196. public string GetMaterialProperty(int f_nMatNo, string f_strPropName, string f_strType = "AUTO")
  197. {
  198. if (this.obj == null)
  199. {
  200. return string.Empty;
  201. }
  202. bool flag = f_strType == "DEFINE";
  203. Transform[] componentsInChildren = this.obj.transform.GetComponentsInChildren<Transform>(true);
  204. int i = 0;
  205. while (i < componentsInChildren.Length)
  206. {
  207. Transform transform = componentsInChildren[i];
  208. Renderer component = transform.GetComponent<Renderer>();
  209. if (component != null && component.material != null && f_nMatNo < component.materials.Length)
  210. {
  211. Material material = component.materials[f_nMatNo];
  212. if (flag)
  213. {
  214. return (!material.IsKeywordEnabled(f_strPropName)) ? "0" : "1";
  215. }
  216. return material.GetFloat(f_strPropName).ToString();
  217. }
  218. else
  219. {
  220. i++;
  221. }
  222. }
  223. return string.Empty;
  224. }
  225. public void ChangeShader(int f_nMatNo, string f_strShaderFileName)
  226. {
  227. this.ChangeShader(f_nMatNo, Resources.Load<Shader>("Shaders/" + f_strShaderFileName));
  228. }
  229. private void ChangeShader(int f_nMatNo, Shader f_shader)
  230. {
  231. GameObject gameObject = this.obj;
  232. if (gameObject == null)
  233. {
  234. return;
  235. }
  236. foreach (Transform transform in gameObject.transform.GetComponentsInChildren<Transform>(true))
  237. {
  238. Renderer component = transform.GetComponent<Renderer>();
  239. if (component != null && component.material != null && f_nMatNo < component.materials.Length)
  240. {
  241. if (!this.m_dicBackupShader.ContainsKey(f_nMatNo))
  242. {
  243. this.m_dicBackupShader[f_nMatNo] = component.materials[f_nMatNo].shader;
  244. }
  245. Material material = component.materials[f_nMatNo];
  246. int renderQueue = material.renderQueue;
  247. material.shader = f_shader;
  248. material.renderQueue = renderQueue;
  249. }
  250. }
  251. }
  252. public void RestoreShader()
  253. {
  254. foreach (KeyValuePair<int, Shader> keyValuePair in this.m_dicBackupShader)
  255. {
  256. this.ChangeShader(keyValuePair.Key, keyValuePair.Value);
  257. }
  258. this.m_dicBackupShader.Clear();
  259. }
  260. public bool EnablePartsPosEdit
  261. {
  262. get
  263. {
  264. return this.m_bEnablePartPosEdit;
  265. }
  266. set
  267. {
  268. if (this.m_bEnablePartPosEdit == value)
  269. {
  270. return;
  271. }
  272. if (value)
  273. {
  274. BoneAttachPos tbodySkinPos = this.body.maid.GetTBodySkinPos(this.m_ParentMPN, this.SlotId);
  275. if (tbodySkinPos != null && this.obj_tr != null)
  276. {
  277. Vector3 vector = tbodySkinPos.pss.position;
  278. this.obj_tr.localPosition = vector;
  279. this.m_vPosLocal = vector;
  280. Quaternion rotation = tbodySkinPos.pss.rotation;
  281. this.obj_tr.localRotation = rotation;
  282. this.m_qRotLocal = rotation;
  283. vector = tbodySkinPos.pss.scale;
  284. this.obj_tr.localScale = vector;
  285. this.m_vScaleRate = vector;
  286. }
  287. }
  288. else if (this.obj_tr != null)
  289. {
  290. this.obj_tr.localPosition = this.m_vDefPosLocal;
  291. this.obj_tr.localRotation = this.m_qDefRotLocal;
  292. this.obj_tr.localScale = this.m_vDefScaleLocal;
  293. }
  294. if (this.center_tr != null)
  295. {
  296. this.center_tr.localPosition = this.m_vCenterPosLocal;
  297. this.center_tr.localRotation = Quaternion.identity;
  298. this.center_tr.localScale = Vector3.one;
  299. }
  300. this.m_bEnablePartPosEdit = value;
  301. this.body.maid.SetTBodySkinPos(this.m_ParentMPN, this.SlotId, this.m_vPosLocal, this.m_qRotLocal, this.m_vScaleRate, this.m_bEnablePartPosEdit);
  302. }
  303. }
  304. public bool GetAttachObjPointLocal(out Vector3 f_vPosLocal, out Quaternion f_vRotLocal, out Vector3 f_vScaleLocal)
  305. {
  306. f_vPosLocal = Vector3.zero;
  307. f_vRotLocal = Quaternion.identity;
  308. f_vScaleLocal = Vector3.zero;
  309. return false;
  310. }
  311. public bool SetAttachObjPointLocal(Vector3 f_vPosLocal, Quaternion f_vRotLocal, Vector3 f_vScaleLocal)
  312. {
  313. return false;
  314. }
  315. public bool CopyAttachObjPoint()
  316. {
  317. if (this.center_tr == null || this.obj_tr == null)
  318. {
  319. return false;
  320. }
  321. this.m_vTempAttachPointPos = this.obj_tr.localPosition;
  322. this.m_qTempAttachPointRot = this.obj_tr.localRotation;
  323. this.m_vTempAttachPointScale = this.obj_tr.localScale;
  324. return true;
  325. }
  326. public bool PastAttachObjPoint()
  327. {
  328. if (this.center_tr == null || this.obj_tr == null || !this.m_bEnablePartPosEdit)
  329. {
  330. return false;
  331. }
  332. Vector3 vector = this.m_vTempAttachPointPos;
  333. this.obj_tr.localPosition = vector;
  334. this.m_vPosLocal = vector;
  335. Quaternion qTempAttachPointRot = this.m_qTempAttachPointRot;
  336. this.obj_tr.localRotation = qTempAttachPointRot;
  337. this.m_qRotLocal = qTempAttachPointRot;
  338. vector = this.m_vTempAttachPointScale;
  339. this.obj_tr.localScale = vector;
  340. this.m_vScaleRate = vector;
  341. this.center_tr.localPosition = this.m_vCenterPosLocal;
  342. this.center_tr.localRotation = Quaternion.identity;
  343. this.center_tr.localScale = Vector3.one;
  344. this.body.maid.SetTBodySkinPos(this.m_ParentMPN, this.SlotId, this.m_vPosLocal, this.m_qRotLocal, this.m_vScaleRate, this.m_bEnablePartPosEdit);
  345. return true;
  346. }
  347. public bool GetAttachCenterPointWorld(out Vector3 f_vPosWorld, out Quaternion f_vRotWorld, out Vector3 f_vScaleLocal)
  348. {
  349. if (this.center_tr == null)
  350. {
  351. f_vPosWorld = Vector3.zero;
  352. f_vRotWorld = Quaternion.identity;
  353. f_vScaleLocal = Vector3.zero;
  354. return false;
  355. }
  356. f_vPosWorld = this.center_tr.position;
  357. f_vRotWorld = this.center_tr.rotation;
  358. f_vScaleLocal = this.m_vScaleRate;
  359. return true;
  360. }
  361. public bool SetAttachCenterPointWorld(Vector3 f_vPosWorld, Quaternion f_vRotWorld, Vector3 f_vScaleLocal)
  362. {
  363. if (this.center_tr == null || !this.m_bEnablePartPosEdit)
  364. {
  365. return false;
  366. }
  367. Transform parent = this.center_tr.parent;
  368. Transform parent2 = this.obj_tr.parent;
  369. this.obj_tr.localPosition = (this.m_vPosLocal = this.m_vDefPosLocal);
  370. this.obj_tr.localRotation = (this.m_qRotLocal = this.m_qDefRotLocal);
  371. this.obj_tr.localScale = (this.m_vScaleRate = this.m_vDefScaleLocal);
  372. this.center_tr.localPosition = this.m_vCenterPosLocal;
  373. this.center_tr.localRotation = Quaternion.identity;
  374. this.center_tr.localScale = Vector3.one;
  375. this.center_tr.SetParent(this.obj_tr.parent, true);
  376. this.obj_tr.SetParent(this.center_tr, true);
  377. this.center_tr.position = f_vPosWorld;
  378. this.center_tr.rotation = f_vRotWorld;
  379. this.center_tr.localScale = f_vScaleLocal;
  380. this.obj_tr.SetParent(parent2, true);
  381. this.center_tr.SetParent(parent, true);
  382. this.center_tr.localPosition = this.m_vCenterPosLocal;
  383. this.center_tr.localRotation = Quaternion.identity;
  384. this.center_tr.localScale = Vector3.one;
  385. this.m_vPosLocal = this.obj_tr.localPosition;
  386. this.m_qRotLocal = this.obj_tr.localRotation;
  387. this.m_vScaleRate = this.obj_tr.localScale;
  388. this.body.maid.SetTBodySkinPos(this.m_ParentMPN, this.SlotId, this.m_vPosLocal, this.m_qRotLocal, this.m_vScaleRate, this.m_bEnablePartPosEdit);
  389. return true;
  390. }
  391. public bool ResetAttachCenterPoint()
  392. {
  393. if (this.center_tr == null)
  394. {
  395. return false;
  396. }
  397. this.obj_tr.localPosition = (this.m_vPosLocal = this.m_vDefPosLocal);
  398. this.obj_tr.localRotation = (this.m_qRotLocal = this.m_qDefRotLocal);
  399. this.obj_tr.localScale = (this.m_vScaleRate = this.m_vDefScaleLocal);
  400. this.center_tr.localPosition = this.m_vCenterPosLocal;
  401. this.center_tr.localRotation = Quaternion.identity;
  402. this.center_tr.localScale = Vector3.one;
  403. this.body.maid.ClearTBodySkinPos(this.m_ParentMPN, this.SlotId);
  404. return true;
  405. }
  406. public void LoadHitcheckData(Transform body_bone, string fn, int rot, string tag)
  407. {
  408. this.bonehair.Init();
  409. this.bonehair.LoadHitCheck(body_bone, fn + ".hitcheck", rot, tag);
  410. this.bonehair2.Init();
  411. this.bonehair3.Init();
  412. }
  413. public void Load(MPN mpn, Transform srcbody, Transform body1, Dictionary<string, Transform> trans, string bonename, string filename, string slotname, string AttachSlot, int layer, bool f_bTemp)
  414. {
  415. this.DeleteObj();
  416. this.m_ParentMPN = mpn;
  417. if (this.m_ParentMPN != MPN.null_mpn)
  418. {
  419. this.m_mp = this.body.maid.GetProp(this.m_ParentMPN);
  420. }
  421. this.m_bTemp = f_bTemp;
  422. this.boVisible = true;
  423. Vector3 position = srcbody.position;
  424. Quaternion rotation = srcbody.rotation;
  425. Vector3 localScale = srcbody.localScale;
  426. Vector3 position2 = body1.position;
  427. Quaternion rotation2 = body1.rotation;
  428. Vector3 localScale2 = body1.localScale;
  429. srcbody.position = Vector3.zero;
  430. srcbody.rotation = Quaternion.identity;
  431. srcbody.localScale = new Vector3(1f / srcbody.lossyScale.x, 1f / srcbody.lossyScale.y, 1f / srcbody.lossyScale.z);
  432. body1.position = Vector3.zero;
  433. body1.rotation = Quaternion.identity;
  434. body1.localScale = new Vector3(1f / body1.lossyScale.x, 1f / body1.lossyScale.y, 1f / body1.lossyScale.z);
  435. this.morph = new TMorph(this);
  436. GameObject gameObject = ImportCM.LoadSkinMesh_R(filename, this.morph, slotname, this, layer);
  437. if (this.m_bMan)
  438. {
  439. foreach (Transform transform in gameObject.GetComponentsInChildren<Transform>(true))
  440. {
  441. Renderer component = transform.GetComponent<Renderer>();
  442. if (!(component == null) && component.materials != null)
  443. {
  444. foreach (Material material in component.materials)
  445. {
  446. if (material.shader.name == "CM3D2/Man")
  447. {
  448. this.m_listManAlphaMat.Add(material);
  449. }
  450. if (material.shader.name == "CM3D2/Mosaic")
  451. {
  452. material.SetFloat("_FloatValue1", 15f);
  453. }
  454. }
  455. }
  456. }
  457. }
  458. if (this.body.m_bNewPhyscs)
  459. {
  460. if (!this.bonehair2.InitGameObject(gameObject, mpn))
  461. {
  462. bool bNoSkirt = this.bonehair3.InitGameObject(gameObject, mpn);
  463. this.bonehair.SearchGameObj(gameObject, bNoSkirt);
  464. }
  465. }
  466. else
  467. {
  468. this.bonehair.SearchGameObj(gameObject, false);
  469. }
  470. this.morph.InitGameObject(gameObject);
  471. gameObject.transform.parent = CMT.SearchObjName(srcbody, bonename, true);
  472. Vector3 localPosition = gameObject.transform.localPosition;
  473. Vector3 localScale3 = gameObject.transform.localScale;
  474. Quaternion localRotation = gameObject.transform.localRotation;
  475. gameObject.transform.parent = CMT.SearchObjName(body1, bonename, true);
  476. if (!string.IsNullOrEmpty(AttachSlot))
  477. {
  478. this.AttachVisible = true;
  479. }
  480. if (AttachSlot == "ボーンにアタッチ" && (bonename == "_IK_handR" || bonename == "_IK_handL"))
  481. {
  482. localPosition = Vector3.zero;
  483. localRotation = Quaternion.identity;
  484. localScale3 = Vector3.one;
  485. }
  486. gameObject.transform.localPosition = localPosition;
  487. gameObject.transform.localRotation = localRotation;
  488. gameObject.transform.localScale = localScale3;
  489. this.obj = gameObject;
  490. this.obj_tr = this.obj.transform;
  491. this.listTrs = new List<Transform>(200);
  492. this.listTrsScr = new List<Transform>(4);
  493. CMT.BindTrans(this.listTrs, this.listTrsScr, trans, gameObject.transform);
  494. srcbody.position = position;
  495. srcbody.rotation = rotation;
  496. srcbody.localScale = localScale;
  497. body1.position = position2;
  498. body1.rotation = rotation2;
  499. body1.localScale = localScale2;
  500. this.ItemScaleReset();
  501. this.OnChangeScreenSizeOrAA();
  502. if (this.m_bMan)
  503. {
  504. this.ManColorUpdate();
  505. }
  506. foreach (KeyValuePair<string, float> keyValuePair in this.m_BonehairBodyhitScaleBackup)
  507. {
  508. this.bonehair.bodyhit.ScaleMune(keyValuePair.Key, keyValuePair.Value);
  509. }
  510. IEnumerator enumerator2 = this.morph.hash.Keys.GetEnumerator();
  511. try
  512. {
  513. while (enumerator2.MoveNext())
  514. {
  515. object obj = enumerator2.Current;
  516. string key = (string)obj;
  517. int f_nIdx = (int)this.morph.hash[key];
  518. float f_fValue;
  519. if (this.body.m_MorphBlendValues.TryGetValue(key, out f_fValue))
  520. {
  521. this.morph.SetBlendValues(f_nIdx, f_fValue);
  522. }
  523. }
  524. }
  525. finally
  526. {
  527. IDisposable disposable;
  528. if ((disposable = (enumerator2 as IDisposable)) != null)
  529. {
  530. disposable.Dispose();
  531. }
  532. }
  533. this.morph.FixBlendValues();
  534. this.m_vDefPosLocal = (this.m_vPosLocal = this.obj_tr.localPosition);
  535. this.m_qDefRotLocal = (this.m_qRotLocal = this.obj_tr.localRotation);
  536. this.m_vDefScaleLocal = (this.m_vScaleRate = this.obj_tr.localScale);
  537. if (!f_bTemp && (this.SlotId == TBody.SlotID.accHat || this.SlotId == TBody.SlotID.headset || this.SlotId == TBody.SlotID.hairT || this.SlotId == TBody.SlotID.accSenaka || this.SlotId == TBody.SlotID.accKubi || this.SlotId == TBody.SlotID.accKubiwa || this.SlotId == TBody.SlotID.accShippo || this.SlotId == TBody.SlotID.accKubiwa))
  538. {
  539. SkinnedMeshRenderer componentInChildren = this.obj_tr.GetComponentInChildren<SkinnedMeshRenderer>(true);
  540. if (componentInChildren != null)
  541. {
  542. Bounds bounds = componentInChildren.bounds;
  543. GameObject gameObject2 = new GameObject("center");
  544. gameObject2.transform.SetParent(this.obj_tr, false);
  545. gameObject2.transform.position = bounds.center;
  546. GameObject gameObject3 = new GameObject("center2");
  547. gameObject3.transform.SetParent(gameObject2.transform, false);
  548. gameObject3.transform.position = bounds.center;
  549. this.m_vCenterPosLocal = gameObject2.transform.localPosition;
  550. this.center_tr = gameObject2.transform;
  551. this.center_tr2 = gameObject3.transform;
  552. BoneAttachPos tbodySkinPos = this.body.maid.GetTBodySkinPos(this.m_ParentMPN, this.SlotId);
  553. if (tbodySkinPos != null)
  554. {
  555. this.m_vPosLocal = tbodySkinPos.pss.position;
  556. this.m_qRotLocal = tbodySkinPos.pss.rotation;
  557. this.m_vScaleRate = tbodySkinPos.pss.scale;
  558. this.m_bEnablePartPosEdit = tbodySkinPos.bEnable;
  559. if (this.m_bEnablePartPosEdit)
  560. {
  561. this.obj_tr.localPosition = tbodySkinPos.pss.position;
  562. this.obj_tr.localRotation = tbodySkinPos.pss.rotation;
  563. this.obj_tr.localScale = tbodySkinPos.pss.scale;
  564. }
  565. }
  566. else
  567. {
  568. this.body.maid.ClearTBodySkinPos(this.m_ParentMPN, this.SlotId);
  569. }
  570. }
  571. }
  572. this.m_HairLengthCtrl.NotExistThenClearHairLength();
  573. if (OvrIK.IsModeVRIK && OvrIK.Instance != null && OvrIK.Instance.NowMaid == this.body.maid && (this.SlotId == TBody.SlotID.head || this.SlotId == TBody.SlotID.megane || this.SlotId == TBody.SlotID.accHead))
  574. {
  575. this.LayerCheck(this.obj);
  576. }
  577. }
  578. public void ItemScaleReset()
  579. {
  580. if (this.m_mp != null && this.m_mp.bNoScale)
  581. {
  582. Transform parent = this.obj_tr.parent;
  583. this.obj_tr.SetParent(null, true);
  584. this.obj_tr.localScale = Vector3.one;
  585. this.obj_tr.SetParent(parent, true);
  586. }
  587. }
  588. private void LayerCheck(GameObject goParent)
  589. {
  590. for (int i = 0; i < goParent.transform.childCount; i++)
  591. {
  592. this.LayerCheck(goParent.transform.GetChild(i).gameObject);
  593. }
  594. goParent.layer = LayerMask.NameToLayer("Face");
  595. }
  596. public void SetVisibleFlag(bool boSetFlag, string name, Transform t = null, bool boTgt = false)
  597. {
  598. if (t.name.IndexOf(name) >= 0)
  599. {
  600. boTgt = true;
  601. }
  602. if (name == "_ALL_")
  603. {
  604. boTgt = true;
  605. }
  606. if (boTgt)
  607. {
  608. this.m_dicDelNodeBody[t.name] = boSetFlag;
  609. }
  610. IEnumerator enumerator = t.GetEnumerator();
  611. try
  612. {
  613. while (enumerator.MoveNext())
  614. {
  615. object obj = enumerator.Current;
  616. Transform t2 = (Transform)obj;
  617. this.SetVisibleFlag(boSetFlag, name, t2, boTgt);
  618. }
  619. }
  620. finally
  621. {
  622. IDisposable disposable;
  623. if ((disposable = (enumerator as IDisposable)) != null)
  624. {
  625. disposable.Dispose();
  626. }
  627. }
  628. }
  629. public void SetVisibleFlagParts(bool f_bSetFlag, string f_strTargetSlot, string f_strBoneName, Transform t = null, bool boTgt = false)
  630. {
  631. if (t.name.IndexOf(f_strBoneName) >= 0)
  632. {
  633. boTgt = true;
  634. }
  635. if (f_strBoneName == "_ALL_")
  636. {
  637. boTgt = true;
  638. }
  639. if (boTgt)
  640. {
  641. Dictionary<string, bool> dictionary;
  642. if (!this.m_dicDelNodeParts.TryGetValue(f_strTargetSlot, out dictionary))
  643. {
  644. dictionary = new Dictionary<string, bool>();
  645. this.m_dicDelNodeParts.Add(f_strTargetSlot, dictionary);
  646. }
  647. dictionary[t.name] = f_bSetFlag;
  648. }
  649. IEnumerator enumerator = t.GetEnumerator();
  650. try
  651. {
  652. while (enumerator.MoveNext())
  653. {
  654. object obj = enumerator.Current;
  655. Transform t2 = (Transform)obj;
  656. this.SetVisibleFlagParts(f_bSetFlag, f_strTargetSlot, f_strBoneName, t2, boTgt);
  657. }
  658. }
  659. finally
  660. {
  661. IDisposable disposable;
  662. if ((disposable = (enumerator as IDisposable)) != null)
  663. {
  664. disposable.Dispose();
  665. }
  666. }
  667. }
  668. public void CopyTrans()
  669. {
  670. for (int i = 0; i < this.listTrs.Count; i += 2)
  671. {
  672. this.listTrs[i].localRotation = this.listTrs[i + 1].localRotation;
  673. this.listTrs[i].localPosition = this.listTrs[i + 1].localPosition;
  674. }
  675. for (int j = 0; j < this.listTrsScr.Count; j += 2)
  676. {
  677. this.listTrsScr[j].localScale = this.listTrsScr[j + 1].localScale;
  678. }
  679. }
  680. public void OnChangeScreenSizeOrAA()
  681. {
  682. bool flag = QualitySettings.antiAliasing != 0;
  683. if (this.obj == null)
  684. {
  685. return;
  686. }
  687. bool flag2 = !flag && !GameMain.Instance.MainCamera.IsBloomEnabled;
  688. if (GameMain.Instance.VRMode && !GameMain.Instance.VRDummyMode)
  689. {
  690. flag2 = false;
  691. }
  692. this.obj.GetComponentsInChildren<Renderer>(true, this.m_listRnederTemp);
  693. for (int i = 0; i < this.m_listRnederTemp.Count; i++)
  694. {
  695. Renderer renderer = this.m_listRnederTemp[i];
  696. if (!(renderer.material == null))
  697. {
  698. foreach (Material material in renderer.materials)
  699. {
  700. if (flag2)
  701. {
  702. material.EnableKeyword("UV_POS_REVERSE");
  703. material.DisableKeyword("UV_POS_NORMAL");
  704. }
  705. else
  706. {
  707. material.DisableKeyword("UV_POS_NORMAL");
  708. material.DisableKeyword("UV_POS_REVERSE");
  709. }
  710. }
  711. }
  712. }
  713. }
  714. private IEnumerator CoReFixBlendValues()
  715. {
  716. yield return null;
  717. this.morph.ResetBlendValues();
  718. yield break;
  719. }
  720. public void ManColorUpdate()
  721. {
  722. for (int i = 0; i < this.m_listManAlphaMat.Count; i++)
  723. {
  724. Material material = this.m_listManAlphaMat[i];
  725. material.SetFloat("_FloatValue2", (float)GameMain.Instance.CMSystem.ManAlpha / 100f);
  726. material.SetColor("_Color", this.body.maid.ManColor);
  727. }
  728. }
  729. public bool AnimationLoad(string f_strAnimName)
  730. {
  731. if (this.m_animItem == null)
  732. {
  733. this.m_animItem = this.obj.AddComponent<Animation>();
  734. }
  735. if (this.m_animItem.GetClip(f_strAnimName) == null)
  736. {
  737. string text = f_strAnimName;
  738. if (string.IsNullOrEmpty(Path.GetExtension(text)))
  739. {
  740. text += ".anm";
  741. }
  742. AnimationClip animationClip = ImportCM.LoadAniClipNative(GameUty.FileSystem, text, true, true, true);
  743. if (animationClip == null)
  744. {
  745. NDebug.Assert("アニメーション " + text + " が見つかりません。", false);
  746. return false;
  747. }
  748. this.m_animItem.Stop();
  749. this.m_animItem.AddClip(animationClip, f_strAnimName);
  750. this.m_animItem.clip = animationClip;
  751. this.m_animItem.playAutomatically = true;
  752. }
  753. this.m_animItem.Stop();
  754. return true;
  755. }
  756. public bool AnimationPlay(string f_strAnimName, bool f_bLoop)
  757. {
  758. if (this.m_animItem == null)
  759. {
  760. Debug.LogError("まだアイテムアニメが読まれていません。");
  761. return false;
  762. }
  763. this.m_animItem.Stop();
  764. this.m_animItem.wrapMode = ((!f_bLoop) ? WrapMode.Once : WrapMode.Loop);
  765. if (this.m_animItem.GetClip(f_strAnimName) == null)
  766. {
  767. NDebug.Assert("アニメーション " + f_strAnimName + " は設定されていません。", false);
  768. return false;
  769. }
  770. this.m_animItem[f_strAnimName].time = 0f;
  771. this.m_animItem.Play(f_strAnimName);
  772. return true;
  773. }
  774. public bool AnimationStop()
  775. {
  776. if (this.m_animItem == null)
  777. {
  778. return false;
  779. }
  780. this.m_animItem.Stop();
  781. return true;
  782. }
  783. public bool MaterialAnimatorAdd(int f_nMateNo)
  784. {
  785. Renderer componentInChildren = this.obj.GetComponentInChildren<Renderer>();
  786. if (componentInChildren != null)
  787. {
  788. MaterialAnimator materialAnimator = componentInChildren.gameObject.AddComponent<MaterialAnimator>();
  789. materialAnimator.m_nMateNo = f_nMateNo;
  790. materialAnimator.Init();
  791. }
  792. return true;
  793. }
  794. public void Update()
  795. {
  796. if (this.obj == null)
  797. {
  798. return;
  799. }
  800. if (this.obj.activeSelf != this.boVisible)
  801. {
  802. CMT.SetActiveFlag(this.obj_tr, this.boVisible);
  803. if (this.boVisible)
  804. {
  805. this.body.StartCoroutine(this.CoReFixBlendValues());
  806. }
  807. }
  808. if (!this.boVisible)
  809. {
  810. return;
  811. }
  812. if (this.trsBoneAttach != null)
  813. {
  814. this.obj_tr.position = this.trsBoneAttach.position;
  815. this.obj_tr.rotation = this.trsBoneAttach.rotation;
  816. }
  817. if (this.AttachName != null && this.body.goSlot[this.AttachSlotIdx].morph != null)
  818. {
  819. Vector3 position;
  820. Quaternion rotation;
  821. Vector3 vector;
  822. if (this.body.goSlot[this.AttachSlotIdx].morph.GetAttachPoint(this.AttachName, out position, out rotation, out vector, this.m_bTemp))
  823. {
  824. if (!this.AttachVisible)
  825. {
  826. this.obj_tr.localScale = Vector3.one;
  827. this.AttachVisible = true;
  828. }
  829. this.obj_tr.position = position;
  830. this.obj_tr.rotation = rotation;
  831. this.obj_tr.localScale = new Vector3(this.m_vDefScaleLocal.x * vector.x, this.m_vDefScaleLocal.y * vector.y, this.m_vDefScaleLocal.z * vector.z);
  832. }
  833. else if (this.AttachVisible)
  834. {
  835. this.obj_tr.localScale = Vector3.zero;
  836. this.AttachVisible = false;
  837. }
  838. }
  839. Vector3 localScale = this.m_trMaid.localScale;
  840. Vector3 localScale2 = this.m_trMaidOffs.localScale;
  841. if (localScale.x < 0.998f || 1.002f < localScale.x || localScale2.x < 0.998f || 1.002f < localScale2.x)
  842. {
  843. this.m_trMaid.localScale = Vector3.one;
  844. this.m_trMaidOffs.localScale = Vector3.one;
  845. this.bonehair.Update();
  846. this.bonehair3.UpdateSelf();
  847. this.m_trMaid.localScale = localScale;
  848. this.m_trMaidOffs.localScale = localScale2;
  849. }
  850. else
  851. {
  852. this.bonehair.Update();
  853. this.bonehair3.UpdateSelf();
  854. }
  855. }
  856. public TBody body;
  857. public string Category;
  858. public TBody.SlotID SlotId;
  859. public bool boVisible = true;
  860. public List<int> listMaskSlot = new List<int>();
  861. public GameObject obj;
  862. public Transform obj_tr;
  863. public Transform center_tr;
  864. public Transform center_tr2;
  865. private List<Transform> listTrs;
  866. private List<Transform> listTrsScr;
  867. public List<UnityEngine.Object> listDEL = new List<UnityEngine.Object>();
  868. public Dictionary<string, UnityEngine.Object> dicDel = new Dictionary<string, UnityEngine.Object>();
  869. private List<Material> m_listRtMaterial = new List<Material>();
  870. public TMorph morph;
  871. public Dictionary<string, bool> m_dicDelNodeBody = new Dictionary<string, bool>();
  872. public Dictionary<string, Dictionary<string, bool>> m_dicDelNodeParts = new Dictionary<string, Dictionary<string, bool>>();
  873. public TBoneHair_ bonehair;
  874. public BoneHair2 bonehair2;
  875. public BoneHair3 bonehair3;
  876. public bool boMizugi;
  877. public Dictionary<string, KeyValuePair<float, string>[]> dicParamSet = new Dictionary<string, KeyValuePair<float, string>[]>();
  878. private Dictionary<string, string> m_dicParam = new Dictionary<string, string>();
  879. private Dictionary<string, string> m_dicParam2 = new Dictionary<string, string>();
  880. public Transform trsBoneAttach;
  881. public string AttachName;
  882. public bool AttachVisible;
  883. public int AttachSlotIdx;
  884. private Quaternion AttachRotation;
  885. public Vector3 m_vDefScaleLocal;
  886. public Vector3 m_vScaleRate;
  887. public Vector3 m_vTempAttachPointScale;
  888. public Vector3 m_vDefPosLocal;
  889. public Vector3 m_vPosLocal;
  890. public Vector3 m_vCenterPosLocal;
  891. public Vector3 m_vTempAttachPointPos;
  892. public Quaternion m_qDefRotLocal;
  893. public Quaternion m_qRotLocal;
  894. public Quaternion m_qTempAttachPointRot;
  895. public int RID;
  896. public int SyojiType;
  897. public string m_strModelFileName = string.Empty;
  898. public MPN m_ParentMPN;
  899. public MaidProp m_mp;
  900. private bool m_bMan;
  901. private List<Material> m_listManAlphaMat = new List<Material>();
  902. public InfinityColorTextureCache TextureCache;
  903. private bool m_bEnablePartPosEdit;
  904. public Dictionary<string, float> m_BonehairBodyhitScaleBackup = new Dictionary<string, float>();
  905. public Dictionary<string, TMorph.TempAttachPos> m_dicTempAttachPoint = new Dictionary<string, TMorph.TempAttachPos>();
  906. private Transform m_trMaid;
  907. private Transform m_trMaidOffs;
  908. private Dictionary<int, Shader> m_dicBackupShader = new Dictionary<int, Shader>();
  909. private bool m_bTemp;
  910. public TBodySkin.OriVert m_OriVert = new TBodySkin.OriVert();
  911. public TBodySkin.HairLengthCtrl m_HairLengthCtrl;
  912. private Animation m_animItem;
  913. private List<Renderer> m_listRnederTemp = new List<Renderer>(4);
  914. public class HairLengthCtrl
  915. {
  916. public HairLengthCtrl(TBodySkin f_trTbodySkin)
  917. {
  918. this.m_tbskin = f_trTbodySkin;
  919. this.m_maid = this.m_tbskin.body.maid;
  920. }
  921. public bool IsHairLengthEditable
  922. {
  923. get
  924. {
  925. return this.m_dicHairLenght != null && this.m_dicHairLenght.Count != 0;
  926. }
  927. }
  928. public Dictionary<string, TBodySkin.HairLengthCtrl.HairLength> HairLengthGroupList
  929. {
  930. get
  931. {
  932. return this.m_dicHairLenght;
  933. }
  934. }
  935. public void NotExistThenClearHairLength()
  936. {
  937. if (this.m_maid.NotExistThenClearHairLengthMP(this.m_tbskin.m_ParentMPN, this.m_tbskin.SlotId))
  938. {
  939. }
  940. this.m_dicHairLenght.Clear();
  941. }
  942. public void SearchAndAddHairLengthTarget(string f_strGroupName, string f_strBoneSearchType, string f_strBoneName, Vector3 f_vScaleMin, Vector3 f_vScaleMax)
  943. {
  944. if (this.m_tbskin == null || this.m_tbskin.obj_tr == null)
  945. {
  946. NDebug.Assert("髪ボーン拡縮検索 親が未だありません。", false);
  947. }
  948. string pattern = f_strBoneName.Replace("*", ".*");
  949. TBodySkin.HairLengthCtrl.SerchMode mode = TBodySkin.HairLengthCtrl.SerchMode.ALL;
  950. if (f_strBoneSearchType == "fbrother")
  951. {
  952. mode = TBodySkin.HairLengthCtrl.SerchMode.FIRST_BROTHER;
  953. }
  954. else if (f_strBoneSearchType == "fchild")
  955. {
  956. mode = TBodySkin.HairLengthCtrl.SerchMode.FIRST_CHILD;
  957. }
  958. else if (f_strBoneSearchType == "all")
  959. {
  960. mode = TBodySkin.HairLengthCtrl.SerchMode.ALL;
  961. }
  962. else
  963. {
  964. NDebug.Assert("髪ボーン検索タイプが不正です。 " + f_strBoneSearchType, false);
  965. }
  966. this.SearchObjName(f_strGroupName, this.m_tbskin.obj_tr, new Regex(pattern), mode);
  967. TBodySkin.HairLengthCtrl.HairLength hairLength;
  968. if (this.m_dicHairLenght.TryGetValue(f_strGroupName, out hairLength))
  969. {
  970. hairLength.vScaleMin = f_vScaleMin;
  971. hairLength.vScaleMax = f_vScaleMax;
  972. }
  973. float lengthRate = 0.5f;
  974. if (this.m_maid.GetHairLengthFromMP(this.m_tbskin.m_ParentMPN, this.m_tbskin.SlotId, f_strGroupName, out lengthRate))
  975. {
  976. hairLength.SetLengthRate(lengthRate);
  977. }
  978. else
  979. {
  980. this.m_maid.ClearHairLengthMP(this.m_tbskin.m_ParentMPN, this.m_tbskin.SlotId);
  981. }
  982. this.HairLenghtBlend();
  983. }
  984. private Transform SearchObjName(string f_strGroupName, Transform t, Regex regex, TBodySkin.HairLengthCtrl.SerchMode mode)
  985. {
  986. string name = t.name;
  987. if (regex.IsMatch(name))
  988. {
  989. TBodySkin.HairLengthCtrl.HairLength hairLength;
  990. if (!this.m_dicHairLenght.TryGetValue(f_strGroupName, out hairLength))
  991. {
  992. hairLength = new TBodySkin.HairLengthCtrl.HairLength(this.m_tbskin, f_strGroupName);
  993. this.m_dicHairLenght[f_strGroupName] = hairLength;
  994. }
  995. hairLength.listTarget.Add(new TBodySkin.HairLengthCtrl.HairLengthTarget
  996. {
  997. trTarget = t,
  998. vScaleDef = t.localScale
  999. });
  1000. if (mode == TBodySkin.HairLengthCtrl.SerchMode.FIRST_BROTHER || mode == TBodySkin.HairLengthCtrl.SerchMode.FIRST_CHILD)
  1001. {
  1002. return t;
  1003. }
  1004. }
  1005. for (int i = 0; i < t.childCount; i++)
  1006. {
  1007. Transform child = t.GetChild(i);
  1008. Transform transform = this.SearchObjName(f_strGroupName, child, regex, mode);
  1009. if (transform != null && mode == TBodySkin.HairLengthCtrl.SerchMode.FIRST_CHILD)
  1010. {
  1011. return transform;
  1012. }
  1013. }
  1014. return null;
  1015. }
  1016. public void HairLenghtBlend()
  1017. {
  1018. foreach (KeyValuePair<string, TBodySkin.HairLengthCtrl.HairLength> keyValuePair in this.m_dicHairLenght)
  1019. {
  1020. float lengthRate = keyValuePair.Value.GetLengthRate();
  1021. for (int i = 0; i < keyValuePair.Value.listTarget.Count; i++)
  1022. {
  1023. TBodySkin.HairLengthCtrl.HairLengthTarget hairLengthTarget = keyValuePair.Value.listTarget[i];
  1024. Vector3 localScale = hairLengthTarget.vScaleDef;
  1025. if (lengthRate < 0.5f)
  1026. {
  1027. localScale = Vector3.Lerp(keyValuePair.Value.vScaleMin, hairLengthTarget.vScaleDef, lengthRate / 0.5f);
  1028. }
  1029. else if (0.5f < lengthRate)
  1030. {
  1031. localScale = Vector3.Lerp(hairLengthTarget.vScaleDef, keyValuePair.Value.vScaleMax, (lengthRate - 0.5f) / 0.5f);
  1032. }
  1033. hairLengthTarget.trTarget.localScale = localScale;
  1034. }
  1035. }
  1036. }
  1037. private Dictionary<string, TBodySkin.HairLengthCtrl.HairLength> m_dicHairLenght = new Dictionary<string, TBodySkin.HairLengthCtrl.HairLength>();
  1038. private TBodySkin m_tbskin;
  1039. private Maid m_maid;
  1040. public class HairLengthTarget
  1041. {
  1042. public Transform trTarget;
  1043. public Vector3 vScaleDef;
  1044. }
  1045. public class HairLength
  1046. {
  1047. public HairLength(TBodySkin f_tbskin, string f_strGroupName)
  1048. {
  1049. this.m_tbskin = f_tbskin;
  1050. this.strGroupName = f_strGroupName;
  1051. }
  1052. public float GetLengthRate()
  1053. {
  1054. return this.fLenghtRate;
  1055. }
  1056. public void SetLengthRate(float f_fRate)
  1057. {
  1058. Maid maid = this.m_tbskin.body.maid;
  1059. MPN parentMPN = this.m_tbskin.m_ParentMPN;
  1060. TBody.SlotID slotId = this.m_tbskin.SlotId;
  1061. string f_strName = this.strGroupName;
  1062. this.fLenghtRate = f_fRate;
  1063. maid.SetHairLengthSaveToMP(parentMPN, slotId, f_strName, f_fRate);
  1064. }
  1065. private TBodySkin m_tbskin;
  1066. private string strGroupName;
  1067. private float fLenghtRate = 0.5f;
  1068. public Vector3 vScaleMin;
  1069. public Vector3 vScaleMax;
  1070. public List<TBodySkin.HairLengthCtrl.HairLengthTarget> listTarget = new List<TBodySkin.HairLengthCtrl.HairLengthTarget>();
  1071. }
  1072. private enum SerchMode
  1073. {
  1074. FIRST_CHILD,
  1075. FIRST_BROTHER,
  1076. ALL
  1077. }
  1078. }
  1079. public class OriVert
  1080. {
  1081. public void Clear()
  1082. {
  1083. this.VCount = 0;
  1084. this.vOriVert = null;
  1085. this.vOriNorm = null;
  1086. this.nSubMeshCount = 0;
  1087. this.nSubMeshOriTri = null;
  1088. this.bwWeight = null;
  1089. }
  1090. public int VCount;
  1091. public Vector3[] vOriVert;
  1092. public Vector3[] vOriNorm;
  1093. public int nSubMeshCount;
  1094. public int[][] nSubMeshOriTri;
  1095. public BoneWeight[] bwWeight;
  1096. }
  1097. }