2020-09-08 17:03:24 +02:00
|
|
|
from bpy.types import Node
|
|
|
|
|
2017-04-04 23:11:31 +02:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 17:03:24 +02:00
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class ArrayLoopNode(ArmLogicTreeNode):
|
2020-09-08 17:03:24 +02:00
|
|
|
"""ArrayLoop node"""
|
2017-04-04 23:11:31 +02:00
|
|
|
bl_idname = 'LNArrayLoopNode'
|
|
|
|
bl_label = 'Array Loop'
|
2020-04-11 17:49:17 +02:00
|
|
|
|
2017-04-04 23:11:31 +02:00
|
|
|
def init(self, context):
|
2017-04-08 20:05:35 +02:00
|
|
|
self.inputs.new('ArmNodeSocketAction', 'In')
|
2018-06-12 23:16:28 +02:00
|
|
|
self.inputs.new('ArmNodeSocketArray', 'Array')
|
2017-04-08 20:05:35 +02:00
|
|
|
self.outputs.new('ArmNodeSocketAction', 'Loop')
|
2020-04-11 17:49:17 +02:00
|
|
|
self.outputs.new('NodeSocketShader', 'Value')
|
|
|
|
self.outputs.new('NodeSocketInt', 'Index')
|
2017-04-08 20:05:35 +02:00
|
|
|
self.outputs.new('ArmNodeSocketAction', 'Done')
|
2017-04-04 23:11:31 +02:00
|
|
|
|
2020-09-08 17:03:24 +02:00
|
|
|
|
|
|
|
add_node(ArrayLoopNode, category=MODULE_AS_CATEGORY)
|