23 lines
		
	
	
		
			701 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			23 lines
		
	
	
		
			701 B
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | from lnx.logicnode.lnx_nodes import * | ||
|  | 
 | ||
|  | 
 | ||
|  | class AudioPlayNode(LnxLogicTreeNode): | ||
|  |     """Play Audio""" | ||
|  |     bl_idname = 'LNAudioPlayNode' | ||
|  |     bl_label = 'Play Audio' | ||
|  |     bl_description = 'Trigger the play function on audio' | ||
|  |     lnx_category = '3D_Audio' | ||
|  |     lnx_version = 1 | ||
|  | 
 | ||
|  | 
 | ||
|  |     def lnx_init(self, context): | ||
|  |         self.add_input('LnxNodeSocketAction', 'In') | ||
|  |         self.add_input('LnxDynamicSocket', 'Audio')    | ||
|  |         self.add_input('LnxBoolSocket', 'Re-trigger')            | ||
|  | 
 | ||
|  |         self.add_output('LnxNodeSocketAction', 'Out') | ||
|  |         self.add_output('LnxDynamicSocket', 'Audio')    | ||
|  | 
 | ||
|  | def register(): | ||
|  |     add_category('3D_Audio', icon='SOUND') | ||
|  |     AudioPlayNode.on_register() |