armory/blender/arm/logicnode/logic/LN_branch.py
Moritz Brückner 96aa0ee890 Use custom sockets for default data types
This allows to listen for socket updates for the live patch system
2021-07-10 21:46:44 +02:00

18 lines
543 B
Python

from arm.logicnode.arm_nodes import *
class BranchNode(ArmLogicTreeNode):
"""Activates its `true` or `false` output, according
to the state of the plugged-in boolean."""
bl_idname = 'LNBranchNode'
bl_label = 'Branch'
arm_version = 1
def init(self, context):
super(BranchNode, self).init(context)
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('ArmBoolSocket', 'Bool')
self.add_output('ArmNodeSocketAction', 'True')
self.add_output('ArmNodeSocketAction', 'False')