X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=blender_export.py;h=dcab66f51953ffbf08fa2b2d080b4e34328995ab;hb=eb203257efcfe324217de9e733cc6c1371b99de6;hp=a367cc169a6863b09db6445269a5da7b9e798566;hpb=4b8aac300ee193cfa12011dfe0238cfe7d7ffce7;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/blender_export.py b/blender_export.py index a367cc1..dcab66f 100644 --- a/blender_export.py +++ b/blender_export.py @@ -1249,6 +1249,7 @@ def sr_compile( collection ): compile_obj_transform( obj, audio.transform ) audio.clip_start = audio_clip_count audio.clip_count = len(obj_data.files) + audio_clip_count += audio.clip_count audio.max_channels = obj_data.max_channels audio.volume = obj_data.volume @@ -1265,6 +1266,15 @@ def sr_compile( collection ): elif obj_data.formato == '1': audio.flags |= 0x400 elif obj_data.formato == '2': audio.flags |= 0x1000 + audio.channel_behaviour = int(obj_data.channel_behaviour) + if audio.channel_behaviour >= 1:#{ + audio.group = obj_data.group + #} + if audio.channel_behaviour == 2:#{ + audio.crossfade = obj_data.transition_duration + #} + audio.probability_curve = int(obj_data.probability_curve) + for ci in range(audio.clip_count):#{ entry = obj_data.files[ci] clip = ent_audio_clip() @@ -1892,6 +1902,8 @@ class SR_OBJECT_ENT_AUDIO(bpy.types.PropertyGroup): flag_loop: bpy.props.BoolProperty( name="Loop",default=False ) flag_auto: bpy.props.BoolProperty( name="Play at start",default=False ) flag_nodoppler: bpy.props.BoolProperty( name="No Doppler",default=False ) + + group: bpy.props.IntProperty( name="Group ID", default=0 ) formato: bpy.props.EnumProperty( name="Format", items=[('0','Uncompressed Mono',''), @@ -1928,6 +1940,8 @@ class SR_OBJECT_ENT_AUDIO(bpy.types.PropertyGroup): c.prop( data[0], 'max_channels' ) c = split.column() c.prop( data[0], 'channel_behaviour', text='Behaviour' ) + if data[0].channel_behaviour >= '1': + box.prop( data[0], 'group' ) if data[0].channel_behaviour == '2': box.prop( data[0], 'transition_duration' ) @@ -2788,7 +2802,8 @@ def cv_draw(): cv_ent_volume( obj ) #} elif ent_type == 'ent_audio':#{ - cv_draw_sphere( obj.location, obj.scale[0], (1,1,0) ) + if obj.SR_data.ent_audio[0].flag_3d: + cv_draw_sphere( obj.location, obj.scale[0], (1,1,0) ) #} #} #}