armory/blender/arm/logicnode/logic/LN_value_changed.py

16 lines
663 B
Python
Raw Normal View History

2020-11-08 21:37:50 +01:00
from arm.logicnode.arm_nodes import *
class ValueChangedNode(ArmLogicTreeNode):
"""Sends a signal to `Changed` output whether the connected value is changed and a signal to `Unchanged` if the connected value returns to initial. Does not works with `null` value."""
bl_idname = 'LNValueChangedNode'
bl_label = 'Value Changed'
arm_version = 1
def init(self, context):
super(ValueChangedNode, self).init(context)
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('NodeSocketShader', 'Value')
2020-11-17 16:01:15 +01:00
2020-11-08 21:37:50 +01:00
self.add_output('ArmNodeSocketAction', 'Changed')
self.add_output('ArmNodeSocketAction', 'Unchanged')