from lnx.logicnode.lnx_nodes import * class AudioHRTFPannerNode(LnxLogicTreeNode): """HRTF Panner""" bl_idname = 'LNAudioHRTFPannerNode' bl_label = 'HRTF Panner' bl_description = 'Create 3D audio HRTF Panner' lnx_category = '3D_Audio' lnx_version = 1 def update_input(self, context): while len(self.inputs) > 5: self.inputs.remove(self.inputs[-1]) if self.property0 == 'Custom': self.add_input('LnxStringSocket', 'File Name', default_value=0) property0: HaxeEnumProperty( 'property0', items = [('Default', 'Default', 'Default .mhr file for HRTF 3D Panner'), ('Custom', 'Custom', 'Custom .mhr file for HRTF 3D Panner')], name='', default='Default', update=update_input) def lnx_init(self, context): self.add_input('LnxNodeSocketAction', 'In') self.add_input('LnxDynamicSocket', 'Audio') self.add_input('LnxNodeSocketObject', 'Cam. Listener') self.add_input('LnxVectorSocket', 'Location') self.add_input('LnxStringSocket', 'Channel', default_value="master") self.add_output('LnxNodeSocketAction', 'Out') self.add_output('LnxDynamicSocket', 'Audio') def draw_buttons(self, context, layout): layout.prop(self, 'property0') def register(): add_category('3D_Audio', icon='SOUND') AudioHRTFPannerNode.on_register()