|
|
@ -154,6 +154,24 @@ class PlasmaSound(idprops.IDPropMixin, bpy.types.PropertyGroup): |
|
|
|
fade_in = PointerProperty(type=PlasmaSfxFade, options=set()) |
|
|
|
fade_in = PointerProperty(type=PlasmaSfxFade, options=set()) |
|
|
|
fade_out = PointerProperty(type=PlasmaSfxFade, options=set()) |
|
|
|
fade_out = PointerProperty(type=PlasmaSfxFade, options=set()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _get_package_value(self): |
|
|
|
|
|
|
|
if self.sound is not None: |
|
|
|
|
|
|
|
self.package_value = self.sound.plasma_sound.package |
|
|
|
|
|
|
|
return self.package_value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _set_package_value(self, value): |
|
|
|
|
|
|
|
if self.sound is not None: |
|
|
|
|
|
|
|
self.sound.plasma_sound.package = value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This is really a property of the sound itself, not of this particular emitter instance. |
|
|
|
|
|
|
|
# However, to prevent weird UI inconsistencies where the button might be missing or change |
|
|
|
|
|
|
|
# states when clearing the sound pointer, we'll cache the actual value here. |
|
|
|
|
|
|
|
package = BoolProperty(name="Export", |
|
|
|
|
|
|
|
description="Package this file in the age export", |
|
|
|
|
|
|
|
get=_get_package_value, set=_set_package_value, |
|
|
|
|
|
|
|
options=set()) |
|
|
|
|
|
|
|
package_value = BoolProperty(options={"HIDDEN", "SKIP_SAVE"}) |
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
@property |
|
|
|
def channel_override(self): |
|
|
|
def channel_override(self): |
|
|
|
if self.is_stereo and len(self.channel) == 1: |
|
|
|
if self.is_stereo and len(self.channel) == 1: |
|
|
@ -166,7 +184,8 @@ class PlasmaSound(idprops.IDPropMixin, bpy.types.PropertyGroup): |
|
|
|
length = dataSize / header.avgBytesPerSec |
|
|
|
length = dataSize / header.avgBytesPerSec |
|
|
|
|
|
|
|
|
|
|
|
# HAX: Ensure that the sound file is copied to game, if applicable. |
|
|
|
# HAX: Ensure that the sound file is copied to game, if applicable. |
|
|
|
exporter.output.add_sfx(self._sound) |
|
|
|
if self._sound.plasma_sound.package: |
|
|
|
|
|
|
|
exporter.output.add_sfx(self._sound) |
|
|
|
|
|
|
|
|
|
|
|
# There is some bug in the MOUL code that causes a crash if this does not match the expected |
|
|
|
# There is some bug in the MOUL code that causes a crash if this does not match the expected |
|
|
|
# result. There's no sense in debugging that though--the user should never specify |
|
|
|
# result. There's no sense in debugging that though--the user should never specify |
|
|
|