public void AddMorph(string morphName, IPmxMorphTypeData[] morphs) { var list = MorphArray.ToList( ); list.Add(new PmxMorphData( ) { MorphName = morphName, MorphType = MorphType.UV, SlotType = MorphSlotType.EYE, MorphArray = morphs }); MorphArray = list.ToArray( ); var slot = Array.Find(SlotArray, s => s.SlotName == "表情"); var indList = slot.Indices.ToList( ); indList.Add(MorphArray.Length - 1); slot.Indices = indList.ToArray( ); }
public void AddVertMorph(string morphName, IEnumerable <PmxMorphVertexData> morphs) { var list = MorphArray.ToList( ); list.Add(new PmxMorphData( ) { MorphName = morphName, MorphType = MorphType.VERTEX, SlotType = MorphSlotType.EYE, MorphArray = morphs.Cast <IPmxMorphTypeData>().ToArray() }); MorphArray = list.ToArray( ); var slot = Array.Find(SlotArray, s => s.SlotName == "表情"); var indList = slot.Indices.ToList( ); indList.Add(MorphArray.Length - 1); slot.Indices = indList.ToArray( ); }