diff --git a/Sources/armory/logicnode/GateNode.hx b/Sources/armory/logicnode/GateNode.hx index 22f43100..a9ffd6ab 100644 --- a/Sources/armory/logicnode/GateNode.hx +++ b/Sources/armory/logicnode/GateNode.hx @@ -19,6 +19,8 @@ class GateNode extends LogicNode { switch (property0) { case "Equal": cond = Std.isOfType(v1, Vec4) ? v1.equals(v2) : v1 == v2; + case "Not Equal": + cond = Std.isOfType(v1, Vec4) ? !v1.equals(v2) : v1 != v2; case "Almost Equal": cond = Std.isOfType(v1, Vec4) ? v1.almostEquals(v2, property1) : Math.abs(v1 - v2) < property1; case "Greater": diff --git a/blender/arm/logicnode/logic/LN_gate.py b/blender/arm/logicnode/logic/LN_gate.py index 794e6531..6aff2073 100644 --- a/blender/arm/logicnode/logic/LN_gate.py +++ b/blender/arm/logicnode/logic/LN_gate.py @@ -11,7 +11,7 @@ def remove_extra_inputs(self, context): class GateNode(ArmLogicTreeNode): """Logic nodes way to do "if" statements. When activated, it compares if its two inputs are being Equal, Greater Equal, - Less Equal, Not Equal or Between regardless of variable type, and passes + Less Equal, Not Equal, or Between, regardless of variable type, and passes through its active input to the output that matches the result of the comparison. @@ -25,6 +25,7 @@ class GateNode(ArmLogicTreeNode): property0: HaxeEnumProperty( 'property0', items = [('Equal', 'Equal', 'Equal'), + ('Not Equal', 'Not Equal', 'Not Equal'), ('Almost Equal', 'Almost Equal', 'Almost Equal'), ('Greater', 'Greater', 'Greater'), ('Greater Equal', 'Greater Equal', 'Greater Equal'), @@ -62,7 +63,7 @@ class GateNode(ArmLogicTreeNode): op.socket_type = 'ArmDynamicSocket' op2 = row.operator('arm.node_remove_input', text='', icon='X', emboss=True) op2.node_index = str(id(self)) - + def get_replacement_node(self, node_tree: bpy.types.NodeTree): if self.arm_version not in (0, 1): raise LookupError()