| 
									
										
										
										
											2025-03-24 16:22:49 +00:00
										 |  |  | from lnx.logicnode.lnx_nodes import * | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class BlendActionNode(LnxLogicTreeNode): | 
					
						
							|  |  |  |     """Interpolates between the two given actions.""" | 
					
						
							|  |  |  |     bl_idname = 'LNBlendActionNode' | 
					
						
							|  |  |  |     bl_label = 'Blend Action' | 
					
						
							|  |  |  |     lnx_version = 2 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def lnx_init(self, context): | 
					
						
							|  |  |  |         self.add_input('LnxNodeSocketObject', 'Object') | 
					
						
							|  |  |  |         self.add_input('LnxNodeSocketAnimTree', 'Action 1') | 
					
						
							|  |  |  |         self.add_input('LnxNodeSocketAnimTree', 'Action 2') | 
					
						
							|  |  |  |         self.add_input('LnxFactorSocket', 'Factor', default_value = 0.5) | 
					
						
							|  |  |  |         self.add_input('LnxIntSocket', 'Bone Group', default_value = -1) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         self.add_output('LnxNodeSocketAnimTree', 'Result') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def get_replacement_node(self, node_tree: bpy.types.NodeTree): | 
					
						
							|  |  |  |         if self.lnx_version not in (0, 1): | 
					
						
							|  |  |  |             raise LookupError() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return NodeReplacement( | 
					
						
							|  |  |  |             'LNBlendActionNode', self.lnx_version, 'LNBlendActionNode', 2, | 
					
						
							|  |  |  |             in_socket_mapping={}, out_socket_mapping={} | 
					
						
							|  |  |  |         ) |