diff --git a/.gitignore b/.gitignore index 0b44c3a..70f8f9c 100644 --- a/.gitignore +++ b/.gitignore @@ -337,4 +337,7 @@ TODO.txt release/ bin/ -ReleaseNotes* \ No newline at end of file +ReleaseNotes* + +copy-debug.sh +copy-release.sh \ No newline at end of file diff --git a/PregnancyPlus.sln b/PregnancyPlus.sln index 12e6bd8..aed51e0 100644 --- a/PregnancyPlus.sln +++ b/PregnancyPlus.sln @@ -5,12 +5,6 @@ VisualStudioVersion = 16.0.29806.167 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBD}") = "KK_PregnancyPlus", "PregnancyPlus\KK_PregnancyPlus\KK_PregnancyPlus.csproj", "{930A00A6-2935-4EA0-81F0-B16D3E71B74D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFED}") = "KKS_PregnancyPlus", "PregnancyPlus\KKS_PregnancyPlus\KKS_PregnancyPlus.csproj", "{930A00A6-2935-4EA0-81F0-B16D3E71B77D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFCD}") = "HS2_PregnancyPlus", "PregnancyPlus\HS2_PregnancyPlus\HS2_PregnancyPlus.csproj", "{930A00A6-2935-4EA0-81F0-B16D3E71B75D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFDD}") = "AI_PregnancyPlus", "PregnancyPlus\AI_PregnancyPlus\AI_PregnancyPlus.csproj", "{930A00A6-2935-4EA0-81F0-B16D3E71B76D}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -20,19 +14,7 @@ Global {930A00A6-2935-4EA0-81F0-B16D3E71B74D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {930A00A6-2935-4EA0-81F0-B16D3E71B74D}.Debug|Any CPU.Build.0 = Debug|Any CPU {930A00A6-2935-4EA0-81F0-B16D3E71B74D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B74D}.Release|Any CPU.Build.0 = Release|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B75D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B75D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B75D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B75D}.Release|Any CPU.Build.0 = Release|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B76D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B76D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B76D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B76D}.Release|Any CPU.Build.0 = Release|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B77D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B77D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B77D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {930A00A6-2935-4EA0-81F0-B16D3E71B77D}.Release|Any CPU.Build.0 = Release|Any CPU + {930A00A6-2935-4EA0-81F0-B16D3E71B74D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PregnancyPlus/AI_PregnancyPlus/AI_PregnancyPlus.csproj b/PregnancyPlus/AI_PregnancyPlus/AI_PregnancyPlus.csproj deleted file mode 100644 index 0d09dbb..0000000 --- a/PregnancyPlus/AI_PregnancyPlus/AI_PregnancyPlus.csproj +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - Debug - AnyCPU - {930A00A6-2935-4EA0-81F0-B16D3E71B76D} - Library - Properties - KK_PregnancyPlus - AI_PregnancyPlus - v4.6 - 512 - true - - - - - true - embedded - false - ..\..\bin\AI_PregnancyPlus\BepInEx\plugins - TRACE;DEBUG;AI - prompt - 4 - false - - - - embedded - true - ..\..\bin\AI_PregnancyPlus\BepInEx\plugins - TRACE;AI - prompt - 4 - true - false - - - - - False - ..\..\packages\IllusionLibs.BepInEx.Harmony.2.2.0.1\lib\net35\0Harmony.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.Assembly-CSharp.2020.5.29.2\lib\net46\Assembly-CSharp.dll - False - - - ..\..\packages\IllusionLibs.BepInEx.5.4.4\lib\net35\BepInEx.dll - False - False - - - ..\..\packages\IllusionLibs.BepInEx.Harmony.2.0.3.1\lib\net35\BepInEx.Harmony.dll - False - - - ..\..\packages\ABMX.AIABMX.4.4.1\lib\net46\AIABMX.dll - False - False - - - ..\..\packages\IllusionModdingAPI.AIAPI.1.17.0\lib\net46\AIAPI.dll - False - False - - - ..\..\packages\ExtensibleSaveFormat.AIGirl.16.2.0.2\lib\net46\AI_ExtensibleSaveFormat.dll - False - False - - - ..\..\packages\IllusionLibs.AIGirl.Sirenix.Serialization.2020.5.29.2\lib\net46\Sirenix.Serialization.dll - False - False - - - ..\..\packages\IllusionLibs.AIGirl.UnityEngine.CoreModule.2018.2.21.3\lib\net46\UnityEngine.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.UniRx.2020.5.29.2\lib\net46\UniRx.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.Unity.TextMeshPro.2018.2.21.3\lib\net46\Unity.TextMeshPro.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.UnityEngine.CoreModule.2018.2.21.3\lib\net46\UnityEngine.CoreModule.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.UnityEngine.UI.2018.2.21.3\lib\net46\UnityEngine.UI.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.UnityEngine.IMGUIModule.2018.2.21.3\lib\net46\UnityEngine.IMGUIModule.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.UnityEngine.TextRenderingModule.2018.2.21.3\lib\net46\UnityEngine.TextRenderingModule.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.UnityEngine.PhysicsModule.2018.2.21.3\lib\net46\UnityEngine.PhysicsModule.dll - False - - - ..\..\packages\IllusionLibs.AIGirl.MessagePack.2020.5.29.2\lib\net46\MessagePack.dll - False - - - ..\..\packages\AIPE.dll - False - - - ..\..\packages\MonoMod.RuntimeDetour.20.5.21.5\lib\net35\MonoMod.RuntimeDetour.dll - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PregnancyPlus/AI_PregnancyPlus/packages.config b/PregnancyPlus/AI_PregnancyPlus/packages.config deleted file mode 100644 index 9a2e702..0000000 --- a/PregnancyPlus/AI_PregnancyPlus/packages.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PregnancyPlus/HS2_PregnancyPlus/HS2_PregnancyPlus.csproj b/PregnancyPlus/HS2_PregnancyPlus/HS2_PregnancyPlus.csproj deleted file mode 100644 index b4ca296..0000000 --- a/PregnancyPlus/HS2_PregnancyPlus/HS2_PregnancyPlus.csproj +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - Debug - AnyCPU - {930A00A6-2935-4EA0-81F0-B16D3E71B75D} - Library - Properties - KK_PregnancyPlus - HS2_PregnancyPlus - v4.6 - 512 - true - - - - - true - embedded - false - ..\..\bin\HS2_PregnancyPlus\BepInEx\plugins - TRACE;DEBUG;HS2 - prompt - 4 - false - - - - embedded - true - ..\..\bin\HS2_PregnancyPlus\BepInEx\plugins - TRACE;HS2 - prompt - 4 - true - false - - - - - False - ..\..\packages\IllusionLibs.BepInEx.Harmony.2.0.3.1\lib\net35\0Harmony.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.Assembly-CSharp.2020.5.29.2\lib\net46\Assembly-CSharp.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.Assembly-CSharp-firstpass.2020.5.29.2\lib\net46\Assembly-CSharp-firstpass.dll - False - - - ..\..\packages\IllusionLibs.BepInEx.5.1.0\lib\net35\BepInEx.dll - False - False - - - ..\..\packages\IllusionLibs.BepInEx.Harmony.2.0.3.1\lib\net35\BepInEx.Harmony.dll - False - - - ..\..\packages\ABMX.HS2ABMX.4.4.1\lib\net46\HS2ABMX.dll - False - False - - - ..\..\packages\IllusionModdingAPI.HS2API.1.15.0\lib\net46\HS2API.dll - False - False - - - ..\..\packages\ExtensibleSaveFormat.HoneySelect2.16.2.0.2\lib\net46\HS2_ExtensibleSaveFormat.dll - False - False - - - ..\..\packages\IllusionLibs.HoneySelect2.Sirenix.Serialization.2020.5.29.2\lib\net46\Sirenix.Serialization.dll - False - False - - - ..\..\packages\IllusionLibs.HoneySelect2.UnityEngine.CoreModule.2018.4.11.2\lib\net46\UnityEngine.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.UniRx.2020.5.29.2\lib\net46\UniRx.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.Unity.TextMeshPro.2018.4.11.2\lib\net46\Unity.TextMeshPro.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.UnityEngine.CoreModule.2018.4.11.2\lib\net46\UnityEngine.CoreModule.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.UnityEngine.UI.2018.4.11.2\lib\net46\UnityEngine.UI.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.UnityEngine.IMGUIModule.2018.4.11.2\lib\net46\UnityEngine.IMGUIModule.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.UnityEngine.TextRenderingModule.2018.4.11.2\lib\net46\UnityEngine.TextRenderingModule.dll - False - - - ..\..\packages\IllusionLibs.HoneySelect2.UnityEngine.PhysicsModule.2018.4.11.2\lib\net46\UnityEngine.PhysicsModule.dll - False - - - ..\..\packages\HS2PE.dll - False - - - ..\..\packages\MonoMod.RuntimeDetour.20.5.21.5\lib\net35\MonoMod.RuntimeDetour.dll - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PregnancyPlus/HS2_PregnancyPlus/packages.config b/PregnancyPlus/HS2_PregnancyPlus/packages.config deleted file mode 100644 index 463fd52..0000000 --- a/PregnancyPlus/HS2_PregnancyPlus/packages.config +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PregnancyPlus/KKS_PregnancyPlus/KKS_PregnancyPlus.csproj b/PregnancyPlus/KKS_PregnancyPlus/KKS_PregnancyPlus.csproj deleted file mode 100644 index f5a1a6c..0000000 --- a/PregnancyPlus/KKS_PregnancyPlus/KKS_PregnancyPlus.csproj +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - Debug - AnyCPU - {930A00A6-2935-4EA0-81F0-B16D3E71B77D} - Library - Properties - KKS_PregnancyPlus - KKS_PregnancyPlus - v4.6 - 512 - true - - - - - true - embedded - false - ..\..\bin\KKS_PregnancyPlus\BepInEx\plugins - TRACE;DEBUG;KK;KKS - prompt - 4 - false - - - - embedded - true - ..\..\bin\KKS_PregnancyPlus\BepInEx\plugins - TRACE;KK;KKS - prompt - 4 - true - false - - - - - ..\..\packages\IllusionLibs.BepInEx.Harmony.2.5.4\lib\net35\0Harmony.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.Assembly-CSharp.2021.8.27\lib\net46\Assembly-CSharp.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.Assembly-CSharp-firstpass.2021.8.27\lib\net46\Assembly-CSharp-firstpass.dll - False - - - ..\..\packages\IllusionLibs.BepInEx.5.4.15\lib\net35\BepInEx.dll - False - - - - ..\..\packages\ExtensibleSaveFormat.KoikatsuSunshine.16.3.0\lib\net46\KKS_ExtensibleSaveFormat.dll - False - - - ..\..\packages\IllusionModdingAPI.KKSAPI.1.24.0\lib\net46\KKSAPI.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\lib\net46\Sirenix.Serialization.dll - False - False - - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\lib\net46\UnityEngine.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.Unity.TextMeshPro.2019.4.9\lib\net46\Unity.TextMeshPro.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\lib\net46\UnityEngine.CoreModule.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.PhysicsModule.2019.4.9\lib\net46\UnityEngine.PhysicsModule.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.2019.4.9\lib\net46\UnityEngine.UI.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.2019.4.9\lib\net46\UnityEngine.IMGUIModule.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.TextRenderingModule.2019.4.9\lib\net46\UnityEngine.TextRenderingModule.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.2019.4.9\lib\net46\UnityEngine.InputLegacyModule.dll - False - - - ..\..\packages\IllusionLibs.KoikatsuSunshine.UniRx.2021.8.27\lib\net46\UniRx.dll - False - - - ..\..\packages\KKPE.dll - False - - - ..\..\packages\MonoMod.RuntimeDetour.20.5.21.5\lib\net35\MonoMod.RuntimeDetour.dll - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PregnancyPlus/KKS_PregnancyPlus/packages.config b/PregnancyPlus/KKS_PregnancyPlus/packages.config deleted file mode 100644 index 3881f98..0000000 --- a/PregnancyPlus/KKS_PregnancyPlus/packages.config +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PregnancyPlus/KK_PregnancyPlus/KK_PregnancyPlus.csproj b/PregnancyPlus/KK_PregnancyPlus/KK_PregnancyPlus.csproj index 1673972..282ef6a 100644 --- a/PregnancyPlus/KK_PregnancyPlus/KK_PregnancyPlus.csproj +++ b/PregnancyPlus/KK_PregnancyPlus/KK_PregnancyPlus.csproj @@ -39,6 +39,7 @@ + False ..\..\packages\IllusionLibs.BepInEx.Harmony.2.0.3.1\lib\net35\0Harmony.dll @@ -68,8 +69,8 @@ ..\..\packages\ABMX.KKABMX.4.3.0\lib\net35\KKABMX.dll False - - ..\..\packages\IllusionModdingAPI.KKAPI.1.14.0\lib\net35\KKAPI.dll + + ..\..\packages\IllusionModdingAPI.KKAPI.1.30.0\lib\net35\KKAPI.dll False diff --git a/PregnancyPlus/KK_PregnancyPlus/packages.config b/PregnancyPlus/KK_PregnancyPlus/packages.config index c53345f..f9c70c7 100644 --- a/PregnancyPlus/KK_PregnancyPlus/packages.config +++ b/PregnancyPlus/KK_PregnancyPlus/packages.config @@ -4,7 +4,7 @@ - + diff --git a/PregnancyPlus/PregnancyPlus.Core/GUI/PPGui.Maker.cs b/PregnancyPlus/PregnancyPlus.Core/GUI/PPGui.Maker.cs index 776cf42..da442db 100644 --- a/PregnancyPlus/PregnancyPlus.Core/GUI/PPGui.Maker.cs +++ b/PregnancyPlus/PregnancyPlus.Core/GUI/PPGui.Maker.cs @@ -359,6 +359,9 @@ public static void OnPasteBelly(List _sliders, PregnancyPlusData re //If no belly state has been copied, skip this if (_infConfig == null) return; + //when pasting belly make sure Preg+ is enabled + _infConfig.GameplayEnabled = true; + //For each slider, set to default which will reset the belly shape foreach (var slider in _sliders) { diff --git a/PregnancyPlus/PregnancyPlus.Core/GUI/PPGui.Studio.cs b/PregnancyPlus/PregnancyPlus.Core/GUI/PPGui.Studio.cs index 27fc2b2..d243710 100644 --- a/PregnancyPlus/PregnancyPlus.Core/GUI/PPGui.Studio.cs +++ b/PregnancyPlus/PregnancyPlus.Core/GUI/PPGui.Studio.cs @@ -71,7 +71,14 @@ private static void RegisterStudioControls() .Value.Subscribe(f => { if (f == false) return; if (PregnancyPlusPlugin.copiedBelly != null && PregnancyPlusPlugin.copiedBelly.HasAnyValue()) + { + //when pasting belly make sure Preg+ is enabled for selected character + foreach (var ctrl in StudioAPI.GetSelectedControllers()) + { + ctrl.infConfig.GameplayEnabled = true; + } RestoreSliders(PregnancyPlusPlugin.copiedBelly); + } }); cat.AddControl(new CurrentStateCategorySwitch("Reset Belly", c => diff --git a/PregnancyPlus/PregnancyPlus.Core/GUI/PPPlugin.PluginConfigGui.cs b/PregnancyPlus/PregnancyPlus.Core/GUI/PPPlugin.PluginConfigGui.cs index e5147f4..b20a155 100644 --- a/PregnancyPlus/PregnancyPlus.Core/GUI/PPPlugin.PluginConfigGui.cs +++ b/PregnancyPlus/PregnancyPlus.Core/GUI/PPPlugin.PluginConfigGui.cs @@ -368,7 +368,7 @@ internal void PluginConfig() //Allows us to override the default KK_Pregnancy belly shape with out own. For when we don't want to mix them. - OverrideBelly = Config.Bind(maxBellySizeTitle, overrideBellyShapeTitle, false, + OverrideBelly = Config.Bind(maxBellySizeTitle, overrideBellyShapeTitle, true, new ConfigDescription(overrideBellyShapeDescription, null, new ConfigurationManagerAttributes { Order = 1 }) diff --git a/PregnancyPlus/PregnancyPlus.Core/PPCharaController.FilterVerts.cs b/PregnancyPlus/PregnancyPlus.Core/PPCharaController.FilterVerts.cs index 46b334f..f5e705d 100644 --- a/PregnancyPlus/PregnancyPlus.Core/PPCharaController.FilterVerts.cs +++ b/PregnancyPlus/PregnancyPlus.Core/PPCharaController.FilterVerts.cs @@ -14,7 +14,8 @@ namespace KK_PregnancyPlus public partial class PregnancyPlusCharaController: CharaCustomFunctionController { - const float minBoneWeight = 0.02f; + //Changed to 0f for BP5 uncensor compatibility + const float minBoneWeight = 0f; /// diff --git a/PregnancyPlus/PregnancyPlus.Core/PPCharaController.MeshInflation.Main.cs b/PregnancyPlus/PregnancyPlus.Core/PPCharaController.MeshInflation.Main.cs index 54b218a..b62e84a 100644 --- a/PregnancyPlus/PregnancyPlus.Core/PPCharaController.MeshInflation.Main.cs +++ b/PregnancyPlus/PregnancyPlus.Core/PPCharaController.MeshInflation.Main.cs @@ -332,8 +332,15 @@ internal bool ComputeBindPoseMesh(SkinnedMeshRenderer smr, SkinnedMeshRenderer b //Thread safe lists and objects below var skinnedVerts = md[rendererName].originalVertices; + var bellyVertIndex = md[rendererName].bellyVerticieIndexes; var vertsLength = smr.sharedMesh.vertexCount; var smrTfTransPt = smr.transform.localToWorldMatrix; + + //The highest and lowest a vert can be, to be considerd in the belly area + var preSliderSphereCenter = GetSphereCenter() - GetUserMoveTransform(); + //The lowest a vert can be, to be considerd in the belly area + var yBottomLimit = preSliderSphereCenter.y - (bellyInfo.OriginalSphereRadius * 1.5f); + var ySphereCenter = preSliderSphereCenter.y; nativeDetour.Undo(); @@ -345,6 +352,15 @@ internal bool ComputeBindPoseMesh(SkinnedMeshRenderer smr, SkinnedMeshRenderer b { //Get the skinned vert position from the bindpose matrix we computed earlier skinnedVerts[i] = MeshSkinning.UnskinnedToSkinnedVertex(unskinnedVerts[i], smrTfTransPt, boneMatrices, boneWeights[i]); + + //Hijacking this threaded loop + //If any verts are found near the belly append them to the bellyVertIndexes, + // We need this because verts in clothing like skirts will be missed at first when the clothing has custom bones + //We could only do this after getting the skinned vert position anyway, so this is the best spot + if (isClothingMesh && !bellyVertIndex[i] && (skinnedVerts[i].y > yBottomLimit && skinnedVerts[i].y < ySphereCenter)) + { + bellyVertIndex[i] = true; + } } //When this thread task is complete, execute the below in main thread @@ -584,22 +600,12 @@ internal void PostInflationDebugStuff(SkinnedMeshRenderer smr, MeshData md, bool /// internal Vector3 GetSphereCenter() { - float bbHeight; + #if KK + var bbHeight = 0.97f; + #else + var bbHeight = 10f; + #endif - //in 6.0+ we can use a static sphere center height - if (infConfig.IsPluginVersionBelow(6.0)) - { - //Measure from feet to belly - bbHeight = GetBellyButtonLocalHeight(); - } - else - { - #if KK - bbHeight = 0.97f; - #else - bbHeight = 10f; - #endif - } bellyInfo.BellyButtonHeight = bbHeight; Vector3 bellyButtonPos = Vector3.up * bbHeight; @@ -729,16 +735,11 @@ internal Vector3 SculptInflatedVerticie(PregnancyPlusData infConfigClone, Vector //Don't allow any morphs to move behind the character's.z = 0 + extentOffset position, otherwise skin sometimes pokes out the back side :/ if (backExtentPos.z > smoothedVectorLs.z) - return originalVerticeLs; + return new Vector3(smoothedVectorLs.x, smoothedVectorLs.y, originalVerticeLs.z); //Don't allow any morphs to move behind the original verticie z position, only forward expansion (ignoring ones already behind sphere center) - if (originalVerticeLs.z > smoothedVectorLs.z && originalVerticeLs.z > sphereCenterLs.z) - { - //Get the average(not really average after all...) x and y change to move the new position halfway back to the oiriginal vert (hopefullt less strange triangles near belly to body edge) - var yChangeAvg = (smoothedVectorLs.y - originalVerticeLs.y)/3; - var xChangeAvg = (smoothedVectorLs.x - originalVerticeLs.x)/3; - smoothedVectorLs = new Vector3(smoothedVectorLs.x - xChangeAvg, smoothedVectorLs.y - yChangeAvg, originalVerticeLs.z); - } + if (originalVerticeLs.z > smoothedVectorLs.z && originalVerticeLs.z > sphereCenterLs.z) + smoothedVectorLs = new Vector3(smoothedVectorLs.x, smoothedVectorLs.y, originalVerticeLs.z); return smoothedVectorLs; } diff --git a/PregnancyPlus/PregnancyPlus.Core/PPPlugin.cs b/PregnancyPlus/PregnancyPlus.Core/PPPlugin.cs index 8751693..c5348ab 100644 --- a/PregnancyPlus/PregnancyPlus.Core/PPPlugin.cs +++ b/PregnancyPlus/PregnancyPlus.Core/PPPlugin.cs @@ -1,10 +1,12 @@ using BepInEx; using BepInEx.Logging; using HarmonyLib; +using UnityEngine; using System; using KKAPI; using KKAPI.Studio; using KKAPI.Chara; +using KKAPI.Utilities; #if KK || AI using KKAPI.MainGame; #endif @@ -32,7 +34,7 @@ namespace KK_PregnancyPlus public partial class PregnancyPlusPlugin : BaseUnityPlugin { public const string GUID = "KK_PregnancyPlus"; - public const string Version = "6.3"; + public const string Version = "6.3.1"; internal static new ManualLogSource Logger { get; private set; } @@ -70,7 +72,30 @@ internal void Start() //Set up studio/malker GUI sliders PregnancyPlusGui.InitStudio(hi, this); - PregnancyPlusGui.InitMaker(hi, this); + PregnancyPlusGui.InitMaker(hi, this); + + + //Requires KKAPI 1.30+ and Bepinex 5.4.15 to use the timeline interpolable, but its just a soft depencendy for this plugin + try { + //Set up the timeline imterpolable tool + if (TimelineCompatibility.IsTimelineAvailable()) + { + const string timelineGUID = "PregnancyPlus";//Never change + + TimelineCompatibility.AddCharaFunctionInterpolable( + timelineGUID, + "0", + "Pregnancy+", + (oci, ctrl, leftValue, rightValue, factor) => { + var inflationSize = Mathf.Lerp(leftValue, rightValue, factor); + ctrl.MeshInflate(inflationSize, "timeline_interpolable"); + }, + null, + (oci, ctrl) => (int)ctrl.infConfig.inflationSize + ); + } + } + catch {} } diff --git a/PregnancyPlus/PregnancyPlus.Core/tools/DebugTools.cs b/PregnancyPlus/PregnancyPlus.Core/tools/DebugTools.cs index 020964d..bb51fb3 100644 --- a/PregnancyPlus/PregnancyPlus.Core/tools/DebugTools.cs +++ b/PregnancyPlus/PregnancyPlus.Core/tools/DebugTools.cs @@ -15,6 +15,8 @@ public static class DebugTools public static string lineRendererGOName = "Preg+DebugLineRenderer"; public static string sphereGOName = "Preg+DebugSphere"; + //Game obhect must be in this layer to be visible in KK Studio + public static int studioLayerKK = 10; /// /// Visualize the GameObject tree and components under each (debug only) @@ -143,6 +145,7 @@ internal static void LogParents(GameObject currentGo, int maxLevel = 1, int curr //Makes sphere more visible in KK Maker instead of black //I dont think color works with this sprite sphereRenderer.material = new Material(Shader.Find("Sprites/Default")); + sphere.gameObject.layer = studioLayerKK; #endif return sphere.gameObject; @@ -197,6 +200,10 @@ internal static void LogParents(GameObject currentGo, int maxLevel = 1, int curr if (startColor == null || startColor == default(Color)) startColor = Color.blue; + #if KK + lineRendGO.gameObject.layer = studioLayerKK; + #endif + lineRenderer.useWorldSpace = useWorldSpace; lineRenderer.startColor = startColor; lineRenderer.endColor = Color.red; diff --git a/release.cmd b/release.cmd index ee6bec1..f8e7216 100644 --- a/release.cmd +++ b/release.cmd @@ -1,7 +1,7 @@ ::Zips the dll into the correct directory structure for release ::Make sure to increment the version -set kk_version=6.3 +set kk_version=6.3.1 set kk_name=KK_PregnancyPlus IF EXIST "./bin/%kk_name%/BepinEx/plugins/%kk_name%.dll" "%ProgramFiles%\7-Zip\7z.exe" a -tzip "%HOMEDRIVE%%HOMEPATH%/downloads/%kk_name% v%kk_version%.zip" "./bin/%kk_name%/BepinEx" -mx0