Merge pull request #450 from guzzard/speaker-play-on-start-prop

Speaker "play on start" property
This commit is contained in:
Lubos Lenco 2018-01-03 00:36:47 +01:00 committed by GitHub
commit b7fa285452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -1687,6 +1687,7 @@ class ArmoryExporter:
o['volume'] = objref.volume
o['pitch'] = objref.pitch
o['attenuation'] = objref.attenuation
o['play_on_start'] = objref.arm_play_on_start
self.output['speaker_datas'].append(o)
def make_default_mat(self, mat_name, mat_objs):

View File

@ -186,6 +186,7 @@ def init_properties():
bpy.types.Object.arm_proxy_sync_traits = bpy.props.BoolProperty(name="Traits", description="Keep traits synchronized with proxy object", default=True, update=proxy_sync_traits)
bpy.types.Object.arm_cached = bpy.props.BoolProperty(name="Object Cached", description="No need to reexport object data", default=True)
# For speakers
bpy.types.Speaker.arm_play_on_start = bpy.props.BoolProperty(name="Play on start", description="Play this sound automatically", default=False)
bpy.types.Speaker.arm_loop = bpy.props.BoolProperty(name="Loop", description="Loop this sound", default=False)
bpy.types.Speaker.arm_stream = bpy.props.BoolProperty(name="Stream", description="Stream this sound", default=False)
# For mesh

View File

@ -177,6 +177,7 @@ class DataPropsPanel(bpy.types.Panel):
layout.prop(wrd, 'arm_lamp_ies_texture')
layout.prop(wrd, 'arm_lamp_clouds_texture')
elif obj.type == 'SPEAKER':
layout.prop(obj.data, 'arm_play_on_start')
layout.prop(obj.data, 'arm_loop')
layout.prop(obj.data, 'arm_stream')
elif obj.type == 'ARMATURE':