2018-02-20 18:46:16 +01:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class ToBoolNode(ArmLogicTreeNode):
|
2020-09-28 15:58:41 +02:00
|
|
|
"""Converts a signal to a boolean value. If the input signal is
|
|
|
|
active, the boolean is `true`; if not, the boolean is `false`."""
|
2018-02-20 18:46:16 +01:00
|
|
|
bl_idname = 'LNToBoolNode'
|
2020-10-26 15:20:50 +01:00
|
|
|
bl_label = 'To Boolean'
|
2020-09-13 11:27:58 +02:00
|
|
|
arm_version = 1
|
2018-02-20 18:46:16 +01:00
|
|
|
|
|
|
|
def init(self, context):
|
2020-09-13 11:27:58 +02:00
|
|
|
super(ToBoolNode, self).init(context)
|
2020-09-08 21:49:02 +02:00
|
|
|
self.add_input('ArmNodeSocketAction', 'In')
|
|
|
|
self.add_output('NodeSocketBool', 'Bool')
|