21 lines
		
	
	
		
			717 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			717 B
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | from lnx.logicnode.lnx_nodes import * | ||
|  | 
 | ||
|  | class LetterboxSetNode(LnxLogicTreeNode): | ||
|  |     """Set the letterbox post-processing settings.""" | ||
|  |     bl_idname = 'LNLetterboxSetNode' | ||
|  |     bl_label = 'Set Letterbox Settings' | ||
|  |     lnx_version = 2 | ||
|  | 
 | ||
|  |     def lnx_init(self, context): | ||
|  |         self.add_input('LnxNodeSocketAction', 'In') | ||
|  |         self.add_input('LnxColorSocket', 'Color', default_value=[0.0, 0.0, 0.0, 1.0]) | ||
|  |         self.add_input('LnxFloatSocket', 'Size', default_value=0.1) | ||
|  | 
 | ||
|  |         self.add_output('LnxNodeSocketAction', 'Out') | ||
|  | 
 | ||
|  |     def get_replacement_node(self, node_tree: bpy.types.NodeTree): | ||
|  |         if self.lnx_version not in (0, 1): | ||
|  |             raise LookupError() | ||
|  | 
 | ||
|  |         return NodeReplacement.Identity(self) |