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

16 lines
537 B
Python
Raw Normal View History

2019-03-01 00:44:29 +01:00
from arm.logicnode.arm_nodes import *
2020-09-08 23:29:50 +02:00
class ArrayContainsNode(ArmLogicTreeNode):
2020-10-05 19:55:56 +02:00
"""Returns whether the given array contains the given value."""
2019-03-01 00:44:29 +01:00
bl_idname = 'LNArrayInArrayNode'
2020-09-08 23:29:50 +02:00
bl_label = 'Array Contains'
arm_version = 1
2019-03-01 00:44:29 +01:00
def init(self, context):
super(ArrayContainsNode, self).init(context)
2020-09-08 21:49:02 +02:00
self.add_input('ArmNodeSocketArray', 'Array')
self.add_input('NodeSocketShader', 'Value')
2020-09-20 20:10:01 +02:00
self.add_output('NodeSocketBool', 'Contains')
2019-03-01 00:44:29 +01:00
add_node(ArrayContainsNode, category=PKG_AS_CATEGORY)