armory/blender/arm/logicnode/array/LN_array_splice.py
Moritz Brückner 96aa0ee890 Use custom sockets for default data types
This allows to listen for socket updates for the live patch system
2021-07-10 21:46:44 +02:00

19 lines
635 B
Python

from arm.logicnode.arm_nodes import *
class ArraySpliceNode(ArmLogicTreeNode):
"""Removes the given amount of elements from the given array.
@see [Haxe API](https://api.haxe.org/Array.html#splice)"""
bl_idname = 'LNArraySpliceNode'
bl_label = 'Array Splice'
arm_version = 1
def init(self, context):
super(ArraySpliceNode, self).init(context)
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('ArmNodeSocketArray', 'Array')
self.add_input('ArmIntSocket', 'Index')
self.add_input('ArmIntSocket', 'Length')
self.add_output('ArmNodeSocketAction', 'Out')