armory/blender/arm/logicnode/logic/LN_while_true.py
2020-11-17 12:01:15 -03:00

25 lines
746 B
Python

from arm.logicnode.arm_nodes import *
class WhileNode(ArmLogicTreeNode):
"""Loops while the condition is `true`.
@seeNode Loop
@seeNode Loop Break
@input Condition: boolean that resembles the result of the condition
@output Loop: Activated on every iteration step
@output Done: Activated when the loop is done executing"""
bl_idname = 'LNWhileNode'
bl_label = 'While True'
arm_section = 'flow'
arm_version = 1
def init(self, context):
super(WhileNode, self).init(context)
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('NodeSocketBool', 'Condition')
self.add_output('ArmNodeSocketAction', 'Loop')
self.add_output('ArmNodeSocketAction', 'Done')