From 09e7418e72bc3c9367fa7a74e930d4c7b0e75f6d Mon Sep 17 00:00:00 2001 From: Patrick Dulebohn Date: Wed, 14 Oct 2020 17:30:36 -0400 Subject: [PATCH] Fix volume conversion Keyframes need negative values in order for sound volume animations to work properly, and this change, per Hoikas, will fix this. --- korman/exporter/animation.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/korman/exporter/animation.py b/korman/exporter/animation.py index 6740da9..9f8a608 100644 --- a/korman/exporter/animation.py +++ b/korman/exporter/animation.py @@ -293,11 +293,7 @@ class AnimationConverter: if not fcurves: return None - def convert_volume(value): - if value == 0.0: - return 0.0 - else: - return math.log10(value) * 20.0 + convert_volume = lambda x: math.log10(max(.01, x / 100.0)) * 20.0 for sound in soundemit.sounds: path = "{}.volume".format(sound.path_from_id())