Browse Source

Fix incorrect stero sound name lookup.

pull/385/head v0.15-beta3
Adam Johnson 1 year ago
parent
commit
2319bcf450
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 6
      korman/properties/modifiers/sound.py

6
korman/properties/modifiers/sound.py

@ -695,11 +695,11 @@ class PlasmaSoundEmitter(PlasmaModifierProperties):
if sound is None: if sound is None:
sound = next((i for i in self.sounds if i.name == name), None) sound = next((i for i in self.sounds if i.name == name), None)
if sound is None: if sound is None:
raise ValueError(name) raise ValueError(f"{self.id_data.name}: Sound {name}")
if sound.is_3d_stereo: if sound.is_3d_stereo:
yield from self.stereize_left.plasma_modifiers.soundemit.get_sound_keys(exporter, sound.name) yield from self.stereize_left.plasma_modifiers.soundemit.get_sound_keys(exporter, f"{sound.name}:L")
yield from self.stereize_right.plasma_modifiers.soundemit.get_sound_keys(exporter, sound.name) yield from self.stereize_right.plasma_modifiers.soundemit.get_sound_keys(exporter, f"{sound.name}:R")
else: else:
for i, j in enumerate(filter(lambda x: x.enabled, self.sounds)): for i, j in enumerate(filter(lambda x: x.enabled, self.sounds)):
if sound == j: if sound == j:

Loading…
Cancel
Save