14 lines
		
	
	
		
			435 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			14 lines
		
	
	
		
			435 B
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | from lnx.logicnode.lnx_nodes import * | ||
|  | 
 | ||
|  | class ToBoolNode(LnxLogicTreeNode): | ||
|  |     """Converts a signal to a boolean value. If the input signal is
 | ||
|  |     active, the boolean is `true`; if not, the boolean is `false`."""
 | ||
|  |     bl_idname = 'LNToBoolNode' | ||
|  |     bl_label = 'Output to Boolean' | ||
|  |     lnx_version = 1 | ||
|  | 
 | ||
|  |     def lnx_init(self, context): | ||
|  |         self.add_input('LnxNodeSocketAction', 'In') | ||
|  | 
 | ||
|  |         self.add_output('LnxBoolSocket', 'Bool') |