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

17 lines
509 B
Python

from arm.logicnode.arm_nodes import *
class AlternateNode(ArmLogicTreeNode):
"""Activates the outputs `0` and `1` alternating every time it is active."""
bl_idname = 'LNAlternateNode'
bl_label = 'Alternate Output'
arm_section = 'flow'
arm_version = 1
def init(self, context):
super(AlternateNode, self).init(context)
self.add_input('ArmNodeSocketAction', 'In')
self.add_output('ArmNodeSocketAction', '0')
self.add_output('ArmNodeSocketAction', '1')