LNXSDK/leenkx/blender/lnx/logicnode/array/LN_array_insert.py

16 lines
620 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class ArrayInsertNode(LnxLogicTreeNode):
"""Inserts the value of the given array at the given index and increases the length of the array."""
bl_idname = 'LNArrayInsertNode'
bl_label = 'Array Insert'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketArray', 'Array')
self.add_input('LnxIntSocket', 'Index')
self.add_input('LnxDynamicSocket', 'Value')
self.add_output('LnxNodeSocketAction', 'Out')
self.add_output('LnxNodeSocketArray', 'Array')