Skip to content

Commit

Permalink
fix: one more soft body physics place
Browse files Browse the repository at this point in the history
  • Loading branch information
lfe999 committed Jun 21, 2022
1 parent 6ea9a31 commit 04f3583
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/HeightMeasurePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,23 +230,29 @@ public void Update() {

bool globalSoftPhysicsEnabled = UserPreferences.singleton.softPhysics;
if(!globalSoftPhysicsEnabled) {
SuperController.LogMessage($"forcing soft physics on for Height Measure plugin");
SuperController.LogMessage($"forcing global soft physics on (main User Preferfences) for Height Measure plugin");
UserPreferences.singleton.softPhysics = true;
}

var breastPhysics = containingAtom.GetStorableByID("BreastPhysicsMesh") as DAZPhysicsMesh;
if(breastPhysics != null && !breastPhysics.on) {
SuperController.LogMessage($"forcing soft breast physics on for Height Measure plugin");
SuperController.LogMessage($"forcing soft breast physics (F Breast Physics 2 screen) on for Height Measure plugin");
breastPhysics.on = true;

}

var glutePhysics = containingAtom.GetStorableByID("LowerPhysicsMesh") as DAZPhysicsMesh;
if(glutePhysics != null && !glutePhysics.on) {
SuperController.LogMessage($"forcing soft glute physics on for Height Measure plugin");
SuperController.LogMessage($"forcing soft glute physics (F Glute Physics screen) on for Height Measure plugin");
glutePhysics.on = true;
}

var physicsMeshesEnable = containingAtom.GetStorableByID("SoftBodyPhysicsEnabler") as DAZPhysicsMeshesEnable;
if(physicsMeshesEnable != null && !physicsMeshesEnable.enabledJSON.val) {
SuperController.LogMessage($"forcing soft physics on (Control & Physics 1 screen) for Height Measure plugin");
physicsMeshesEnable.enabledJSON.val = true;
}

bool sexWasChanged = false;
bool targetHeadMorphChanged = false;
if(_autoMeasurements != null) {
Expand Down

0 comments on commit 04f3583

Please sign in to comment.