示例#1
0
        CustomMenu.SmCustomLoad.FileInfo [] PresetList(bool body)
        {
            var    presetList   = new List <CustomMenu.SmCustomLoad.FileInfo>(32);
            var    folderAssist = new FolderAssist();
            string folder       = UserData.Path + "custom/female/";

            string[] searchPattern = body ? new string [] { "*.body" } : new string [] { "*.face" };
            folderAssist.CreateFolderInfoEx(folder, searchPattern, true);
            var type = (byte)(body ? 0 : 1);            // 0 for body 1 for face

            CustomMenu.SmCustomLoad.CustomData customData = new CustomMenu.SmCustomLoad.CustomDataFemale(type);

            for (int i = 0; i < folderAssist.lstFile.Count; i++)
            {
                customData.Load(folderAssist.lstFile[i].FullPath, null);
                var fileInfo = new CustomMenu.SmCustomLoad.FileInfo();
                fileInfo.no       = i;
                fileInfo.fullPath = folderAssist.lstFile[i].FullPath;
                fileInfo.fileName = folderAssist.lstFile[i].FileName;
                fileInfo.time     = folderAssist.lstFile[i].time;
                fileInfo.type     = (int)type;
                fileInfo.comment  = customData.comment;
                presetList.Add(fileInfo);
            }
            return(presetList.ToArray());
        }
示例#2
0
        void SavePreset(bool body)
        {
            var    setName   = (presetName == String.Empty) ? "unnamed" : presetName;
            var    type      = (byte)(body ? 0 : 1);
            string extension = body ? ".body" : ".face";

            CustomMenu.SmCustomLoad.CustomData customData = new CustomMenu.SmCustomLoad.CustomDataFemale(type);
            string filePath = UserData.Path + "custom/female/f_" + setName + "_" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + extension;

            customData.comment = setName;
            customData.Save(filePath, charaFemale.customInfo);
            presetName = String.Empty;
        }
示例#3
0
        void LoadPreset(bool body, string path)
        {
            var mouth = charaFemale.chaBody.mouthCtrl.FixedRate;
            var eyes  = charaFemale.chaBody.eyesCtrl.OpenMax;
            var type  = (byte)(body ? 0 : 1);

            CustomMenu.SmCustomLoad.CustomData customData = new CustomMenu.SmCustomLoad.CustomDataFemale(type);
            if (onlySliderValues)
            {
                var temporaryPizda = new CharFileInfoCustomFemale();
                customData.Load(path, temporaryPizda);
                if (body)
                {
                    for (int i = 0; i < charaFemale.customInfo.shapeValueBody.Length; i++)
                    {
                        charaFemale.customInfo.shapeValueBody[i] = temporaryPizda.shapeValueBody[i];
                    }
                    charaFemale.femaleCustomInfo.bustWeight   = temporaryPizda.bustWeight;
                    charaFemale.femaleCustomInfo.bustSoftness = temporaryPizda.bustSoftness;
                }
                else
                {
                    for (int i = 0; i < charaFemale.customInfo.shapeValueFace.Length; i++)
                    {
                        charaFemale.customInfo.shapeValueFace[i] = temporaryPizda.shapeValueFace[i];
                    }
                }
            }
            else
            {
                customData.Load(path, charaFemale.customInfo);
            }

            charaFemale.Reload(true, false, true);
            charaFemale.UpdateBustSoftnessAndGravity();
            charaFemale.chaBody.mouthCtrl.FixedRate = mouth;
            charaFemale.chaBody.eyesCtrl.OpenMax    = eyes;
        }