armory/blender/arm/logicnode/array_length.py

17 lines
461 B
Python
Raw Normal View History

2017-11-02 23:32:36 +01:00
import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class ArrayLengthNode(Node, ArmLogicTreeNode):
'''Array length node'''
bl_idname = 'LNArrayLengthNode'
bl_label = 'Array Length'
2018-12-18 23:48:38 +01:00
bl_icon = 'QUESTION'
2017-11-02 23:32:36 +01:00
def init(self, context):
2018-06-12 23:16:28 +02:00
self.inputs.new('ArmNodeSocketArray', 'Array')
2017-11-02 23:32:36 +01:00
self.outputs.new('NodeSocketInt', 'Length')
2017-11-02 23:43:01 +01:00
add_node(ArrayLengthNode, category='Array')