39 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			39 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | from lnx.logicnode.lnx_nodes import * | ||
|  | 
 | ||
|  | 
 | ||
|  | class LeenkxMessageParserNode(LnxLogicTreeNode): | ||
|  |     """Leenkx Message Parser""" | ||
|  |     bl_idname = 'LNLeenkxMessageParserNode' | ||
|  |     bl_label = 'Leenkx Message Parser' | ||
|  |     bl_description = 'Parses messages incoming from the Leenkx network' | ||
|  |     lnx_category = 'Leenkx' | ||
|  |     lnx_version = 1 | ||
|  | 
 | ||
|  |     property0: HaxeEnumProperty( | ||
|  |         'property0', | ||
|  |         items = [('string', 'String', 'Event for a string over the network'), | ||
|  |                  ('vector', 'Vector', 'Event for a vector over the network'), | ||
|  |                  ('float', 'Float', 'Event for a float over the network'), | ||
|  |                  ('integer', 'Integer', 'Event for an integer over the network'), | ||
|  |                  ('boolean', 'Boolean', 'Event for a boolean over the network'), | ||
|  |                  ('transform', 'Transform', 'Event for a transform over the network'), | ||
|  |                  ('rotation', 'Rotation', 'Event for a rotation over the network')], | ||
|  |         name='', default='string') | ||
|  | 
 | ||
|  | 
 | ||
|  |     def lnx_init(self, context): | ||
|  |         self.add_input('LnxNodeSocketAction', 'In') | ||
|  |         self.add_input('LnxStringSocket', 'API') | ||
|  |         self.add_input('LnxDynamicSocket', 'Data') | ||
|  | 
 | ||
|  |         self.add_output('LnxNodeSocketAction', 'Out') | ||
|  |         self.add_output('LnxDynamicSocket', 'API') | ||
|  |         self.add_output('LnxDynamicSocket', 'Data') | ||
|  | 
 | ||
|  | 
 | ||
|  |     def draw_buttons(self, context, layout): | ||
|  |         layout.prop(self, 'property0') | ||
|  | 
 | ||
|  | def register(): | ||
|  |     add_category('Leenkx', icon='ORIENTATION_CURSOR') | ||
|  |     LeenkxMessageParserNode.on_register() |