forked from LeenkxTeam/LNXSDK
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			609 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			609 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from lnx.logicnode.lnx_nodes import *
 | 
						|
 | 
						|
 | 
						|
class BooleanNode(LnxLogicVariableNodeMixin, LnxLogicTreeNode):
 | 
						|
    """Stores the given boolean as a variable. A boolean value has just two
 | 
						|
    states: `true` and `false`."""
 | 
						|
    bl_idname = 'LNBooleanNode'
 | 
						|
    bl_label = 'Boolean'
 | 
						|
    lnx_version = 1
 | 
						|
 | 
						|
    def lnx_init(self, context):
 | 
						|
        self.add_input('LnxBoolSocket', 'Bool In')
 | 
						|
 | 
						|
        self.add_output('LnxBoolSocket', 'Bool Out', is_var=True)
 | 
						|
 | 
						|
    def synchronize_from_master(self, master_node: LnxLogicVariableNodeMixin):
 | 
						|
        self.inputs[0].default_value_raw = master_node.inputs[0].get_default_value()
 |