armory/blender/arm/logicnode/array/LN_array_set.py
2020-09-23 17:12:25 -03:00

17 lines
607 B
Python

from arm.logicnode.arm_nodes import *
class ArraySetNode(ArmLogicTreeNode):
"""Use to set the value of an array element by index."""
bl_idname = 'LNArraySetNode'
bl_label = 'Array Set'
arm_version = 1
def init(self, context):
super(ArraySetNode, self).init(context)
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('ArmNodeSocketArray', 'Array')
self.add_input('NodeSocketInt', 'Index')
self.add_input('NodeSocketShader', 'Value')
self.add_output('ArmNodeSocketAction', 'Out')
add_node(ArraySetNode, category=PKG_AS_CATEGORY)