Browse Source

Merge pull request #295 from DoobesURU/AddLocalOnly

Add Local Only to Sound Emitter Modifier
pull/323/head
Adam Johnson 3 years ago committed by GitHub
parent
commit
fb85d60a06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      korman/properties/modifiers/sound.py
  2. 1
      korman/ui/modifiers/sound.py

6
korman/properties/modifiers/sound.py

@ -243,6 +243,10 @@ class PlasmaSound(idprops.IDPropMixin, bpy.types.PropertyGroup):
description="Loop the sound",
default=False,
options=set())
local_only = BoolProperty(name"Local Only",
description="Sounds only plays for local avatar",
default=False,
options=set())
inner_cone = FloatProperty(name="Inner Angle",
description="Angle of the inner cone from the negative Z-axis",
@ -368,6 +372,8 @@ class PlasmaSound(idprops.IDPropMixin, bpy.types.PropertyGroup):
sound.properties |= plSound.kPropLooping
if self.incidental:
sound.properties |= plSound.kPropIncidental
if self.local_only:
sound.properties |= plSound.kPropLocalOnly
sound.dataBuffer = self._find_sound_buffer(exporter, so, wavHeader, dataSize, channel)
# Cone effect

1
korman/ui/modifiers/sound.py

@ -110,6 +110,7 @@ def soundemit(modifier, layout, context):
col.prop(sound, "auto_start")
col.prop(sound, "incidental")
col.prop(sound, "loop")
col.prop(sound, "local_only")
col.separator()
_draw_fade_ui(sound.fade_in, col, "Fade In:")

Loading…
Cancel
Save