forked from LeenkxTeam/LNXSDK
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			847 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			847 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from lnx.logicnode.lnx_nodes import *
 | 
						|
 | 
						|
class ArraySpliceNode(LnxLogicTreeNode):
 | 
						|
    """Removes the given amount of elements from the given array and returns it.
 | 
						|
 | 
						|
    @see [Haxe API](https://api.haxe.org/Array.html#splice)"""
 | 
						|
    bl_idname = 'LNArraySpliceNode'
 | 
						|
    bl_label = 'Array Splice'
 | 
						|
    lnx_version = 2
 | 
						|
 | 
						|
    def lnx_init(self, context):
 | 
						|
        self.add_input('LnxNodeSocketAction', 'In')
 | 
						|
        self.add_input('LnxNodeSocketArray', 'Array')
 | 
						|
        self.add_input('LnxIntSocket', 'Index')
 | 
						|
        self.add_input('LnxIntSocket', 'Length')
 | 
						|
 | 
						|
        self.add_output('LnxNodeSocketAction', 'Out')
 | 
						|
        self.add_output('LnxNodeSocketArray', 'Array')
 | 
						|
 | 
						|
    def get_replacement_node(self, node_tree: bpy.types.NodeTree):
 | 
						|
        if self.lnx_version not in (0, 1):
 | 
						|
            raise LookupError()
 | 
						|
 | 
						|
        return NodeReplacement.Identity(self) |