armory/blender/arm/logicnode/array/LN_array_length.py

15 lines
454 B
Python
Raw Normal View History

2017-11-02 23:32:36 +01:00
from arm.logicnode.arm_nodes import *
class ArrayLengthNode(ArmLogicTreeNode):
2020-10-05 19:55:56 +02:00
"""Returns the length of the given array."""
2017-11-02 23:32:36 +01:00
bl_idname = 'LNArrayLengthNode'
bl_label = 'Array Length'
arm_version = 1
2017-11-02 23:32:36 +01:00
def init(self, context):
super(ArrayLengthNode, self).init(context)
2020-09-08 21:49:02 +02:00
self.add_input('ArmNodeSocketArray', 'Array')
self.add_output('NodeSocketInt', 'Length')
2017-11-02 23:32:36 +01:00
add_node(ArrayLengthNode, category=PKG_AS_CATEGORY)