예제 #1
0
        public bool AppendBodyModelItem(BodyModelItem pBodyModelItem, List <string> pPuppetTextures, bool pLoadAnimations, out string pErrorText)
        {
            // string puppetName = pBodyModelItem.PuppetName;
            BodyModelSumPuppet puppet = null;

            if (Puppets != null)
            {
                puppet = SearchPuppet(pBodyModelItem.PuppetName);
            }
            else
            {
                Puppets = new List <BodyModelSumPuppet>();
            }

            if (puppet == null)
            {
                puppet = new BodyModelSumPuppet(pBodyModelItem.PuppetName, Archiver);
                Puppets.Add(puppet);
            }

            return(puppet.AppendData(pBodyModelItem, pPuppetTextures, pLoadAnimations, out pErrorText));
        }
예제 #2
0
        public bool AppendData(BodyModelItem pBodyModelItem, List <string> pAddonTextures, bool pLoadAnimations, out string pErrorText)
        {
            pErrorText = null;

            bool onlyGestures = !pLoadAnimations;

            if (!InsertAnimations(pBodyModelItem.Animations, onlyGestures, out pErrorText))
            {
                return(false);
            }

            List <string> puppetTextures = new List <string>();

            foreach (string addonTextureFile in pAddonTextures)
            {
                if (addonTextureFile.StartsWith(PuppetPath))
                {
                    puppetTextures.Add(addonTextureFile);
                }
            }

            return(InsertParts(pBodyModelItem.Parts, puppetTextures, out pErrorText));
        }