Skip to content

Commit

Permalink
Fix record float params recording not working anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
acidbubbles committed Dec 21, 2020
1 parent 48c2200 commit 33ddfb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/UI/Components/TargetFrame/FloatParamTargetFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ protected override void CreateCustom()
_simpleSlider = slider.AddComponent<SimpleSlider>();
_simpleSlider.onChange.AddListener(val =>
{
if (clip.playbackEnabled) return;
if (plugin.animationEditContext.locked) return;
if (plugin.animationEditContext.locked) return;
if (!target.EnsureAvailable()) return;
SetValue(target.floatParam.min + val * (target.floatParam.max - target.floatParam.min));
});
Expand Down
5 changes: 3 additions & 2 deletions src/UI/Screens/MocapScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,10 @@ private IEnumerator PlayAndRecordFloatParamsCoroutine()
yield return 0;
sctrl.helpText = string.Empty;
animationEditContext.PlayCurrentAndOtherMainsInLayers(false);
while (animation.playTime <= current.animationLength)
while (animation.playTime <= current.animationLength && animation.isPlaying)
yield return 0;
animation.StopAll();
animationEditContext.Stop();
animationEditContext.clipTime = 0f;
_recordingFloatParamsCoroutine = null;
_simplifyFloatParamsOnLoad = true;
ChangeScreen(ScreenName);
Expand Down

0 comments on commit 33ddfb7

Please sign in to comment.