示例#1
0
        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( );
        }
示例#2
0
        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( );
        }