| 796 | } |
| 797 | |
| 798 | void Object::addNodeConnection(WireNode wireNode, WireConnection nodeConnection) { |
| 799 | if (wireNode.direction == WireDirection::Input) { |
| 800 | m_inputNodes.at(wireNode.nodeIndex).connections.update([&](auto& list) { |
| 801 | if (list.contains(nodeConnection)) |
| 802 | return false; |
| 803 | list.append(nodeConnection); |
| 804 | return true; |
| 805 | }); |
| 806 | } else { |
| 807 | m_outputNodes.at(wireNode.nodeIndex).connections.update([&](auto& list) { |
| 808 | if (list.contains(nodeConnection)) |
| 809 | return false; |
| 810 | list.append(nodeConnection); |
| 811 | return true; |
| 812 | }); |
| 813 | } |
| 814 | m_scriptComponent.invoke("onNodeConnectionChange"); |
| 815 | } |
| 816 | |
| 817 | void Object::removeNodeConnection(WireNode wireNode, WireConnection nodeConnection) { |
| 818 | if (wireNode.direction == WireDirection::Input) { |