Browse Source

Fix volume conversion

Keyframes need negative values in order for sound volume animations to work properly, and this change, per Hoikas, will fix this.
pull/225/head
Patrick Dulebohn 4 years ago
parent
commit
09e7418e72
  1. 6
      korman/exporter/animation.py

6
korman/exporter/animation.py

@ -293,11 +293,7 @@ class AnimationConverter:
if not fcurves: if not fcurves:
return None return None
def convert_volume(value): convert_volume = lambda x: math.log10(max(.01, x / 100.0)) * 20.0
if value == 0.0:
return 0.0
else:
return math.log10(value) * 20.0
for sound in soundemit.sounds: for sound in soundemit.sounds:
path = "{}.volume".format(sound.path_from_id()) path = "{}.volume".format(sound.path_from_id())

Loading…
Cancel
Save