From 9caf43c99f618bb6372dcb0b8055528479bcadcc Mon Sep 17 00:00:00 2001 From: Evgeny Kochetkov Date: Tue, 30 Oct 2018 17:35:12 +0300 Subject: [PATCH] fix(xod-project): create buses from links leading to variadic pins Fixes #1414 --- packages/xod-project/src/Buses.re | 2 +- packages/xod-project/src/Patch.re | 6 + packages/xod-project/src/Patch.rei | 2 + packages/xod-project/src/index.js | 1 + .../test/fixtures/jumperize.expected.xodball | 662 ++++++----- .../test/fixtures/jumperize.xodball | 790 +++++++------ .../split-links-to-buses.expected.xodball | 1048 ++++++++++------- .../fixtures/split-links-to-buses.xodball | 671 ++++++----- 8 files changed, 1878 insertions(+), 1304 deletions(-) diff --git a/packages/xod-project/src/Buses.re b/packages/xod-project/src/Buses.re index b66b4b06..2dd53e48 100644 --- a/packages/xod-project/src/Buses.re +++ b/packages/xod-project/src/Buses.re @@ -202,7 +202,7 @@ let splitLinksToBuses: destinationNode |> Project.getPatchByNode(project) |. Option.flatMap( - Patch.getPinByKey(_, destinationPinKey), + Patch.getVariadicPinByKey(_, destinationNode, destinationPinKey), ) |. Option.map(destinationPin => { let fromBusPosition = diff --git a/packages/xod-project/src/Patch.re b/packages/xod-project/src/Patch.re index ddec1802..19f6de21 100644 --- a/packages/xod-project/src/Patch.re +++ b/packages/xod-project/src/Patch.re @@ -63,6 +63,12 @@ external _getPinByKey : (Pin.key, t) => Maybe.t(Pin.t) = "getPinByKey"; let getPinByKey = (patch, pinKey) => _getPinByKey(pinKey, patch) |> Maybe.toOption; +[@bs.module ".."] +external _getVariadicPinByKey : (Node.t, Pin.key, t) => Maybe.t(Pin.t) = "getVariadicPinByKey"; + +let getVariadicPinByKey = (patch, node, pinKey) => + _getVariadicPinByKey(node, pinKey, patch) |> Maybe.toOption; + let listInputPins = patch => patch |. listPins |. List.keep(pin => Pin.getDirection(pin) == Pin.Input); diff --git a/packages/xod-project/src/Patch.rei b/packages/xod-project/src/Patch.rei index dee0de9f..0433248f 100644 --- a/packages/xod-project/src/Patch.rei +++ b/packages/xod-project/src/Patch.rei @@ -28,6 +28,8 @@ let listPins: t => list(Pin.t); let getPinByKey: (t, Pin.key) => option(Pin.t); +let getVariadicPinByKey: (t, Node.t, Pin.key) => option(Pin.t); + let listInputPins: t => list(Pin.t); let listOutputPins: t => list(Pin.t); diff --git a/packages/xod-project/src/index.js b/packages/xod-project/src/index.js index 90b52fcc..b7c38d1f 100644 --- a/packages/xod-project/src/index.js +++ b/packages/xod-project/src/index.js @@ -23,6 +23,7 @@ export { getNodeByIdUnsafe, getPinByKey, getPinByKeyUnsafe, + getVariadicPinByKey, listPins, listInputPins, listOutputPins, diff --git a/packages/xod-project/test/fixtures/jumperize.expected.xodball b/packages/xod-project/test/fixtures/jumperize.expected.xodball index c285680e..7a05d306 100644 --- a/packages/xod-project/test/fixtures/jumperize.expected.xodball +++ b/packages/xod-project/test/fixtures/jumperize.expected.xodball @@ -1,299 +1,23 @@ { + "name": "jumperize", "patches": { - "@/main": { - "links": { - "rJlvompFSm": { - "id": "rJlvompFSm", - "output": { - "nodeId": "BkDj7pFrQ", - "pinKey": "__out__" - }, - "input": { - "nodeId": "S17o7aYSm", - "pinKey": "SyVBQTFr7" - } - }, - "S1eqaQ6FSm": { - "id": "S1eqaQ6FSm", - "output": { - "nodeId": "B1nOm6Frm", - "pinKey": "SyuuQatrm" - }, - "input": { - "nodeId": "SJ9aQpYB7", - "pinKey": "__in__" - } - }, - "Sygy-VaFH7": { - "id": "Sygy-VaFH7", - "output": { - "nodeId": "B1nOm6Frm", - "pinKey": "BJwD7TtHQ" - }, - "input": { - "nodeId": "S1J-VaYS7", - "pinKey": "__in__" - } - }, - "SJxdEEaKHm": { - "id": "SJxdEEaKHm", - "output": { - "nodeId": "ByEm4pYH7", - "pinKey": "BJwD7TtHQ" - }, - "input": { - "nodeId": "SkdNNatH7", - "pinKey": "__in__" - } - }, - "BkeOONpFH7": { - "id": "BkeOONpFH7", - "output": { - "nodeId": "ByEm4pYH7", - "pinKey": "SyuuQatrm" - }, - "input": { - "nodeId": "Bku_NpKHX", - "pinKey": "__in__" - } - }, - "BJB4ITFrX": { - "id": "BJB4ITFrX", - "output": { - "nodeId": "SJ9aQpYB7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "Bke5LmTYrX", - "pinKey": "SyVBQTFr7" - } - }, - "ryxBEITKH7": { - "id": "ryxBEITKH7", - "output": { - "nodeId": "SJ9aQpYB7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "S158XptBX", - "pinKey": "SyVBQTFr7" - } - }, - "SJZHNLptr7": { - "id": "SJZHNLptr7", - "output": { - "nodeId": "SJ9aQpYB7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "H1P8QaFHX", - "pinKey": "SyVBQTFr7" - } - }, - "SkzB4IaYSQ": { - "id": "SkzB4IaYSQ", - "output": { - "nodeId": "Bku_NpKHX", - "pinKey": "__out__" - }, - "input": { - "nodeId": "HyZo4pYS7", - "pinKey": "__in__" - } - }, - "HJ7HVITFrQ": { - "id": "HJ7HVITFrQ", - "output": { - "nodeId": "HyZo4pYS7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "HyfKEaFB7", - "pinKey": "SyVBQTFr7" - } - }, - "BJINUTFSQ": { - "id": "BJINUTFSQ", - "output": { - "nodeId": "SkdNNatH7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "rJWXNaYrm", - "pinKey": "HyRFXaFS7" - } - }, - "SJeL4IaYr7": { - "id": "SJeL4IaYr7", - "output": { - "nodeId": "SkdNNatH7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "S1PlFQNatrm", - "pinKey": "HyRFXaFS7" - } - } - }, - "nodes": { - "H1P8QaFHX": { - "id": "H1P8QaFHX", - "type": "@/foo", - "position": { - "x": 34, - "y": 306 - } - }, - "S158XptBX": { - "id": "S158XptBX", - "type": "@/foo", - "position": { - "x": 102, - "y": 306 - } - }, - "Bke5LmTYrX": { - "id": "Bke5LmTYrX", - "type": "@/foo", - "position": { - "x": 204, - "y": 306 - } - }, - "B1nOm6Frm": { - "id": "B1nOm6Frm", - "type": "@/bar", - "position": { - "x": 102, - "y": 0 - } - }, - "S17o7aYSm": { - "id": "S17o7aYSm", - "type": "@/foo", - "position": { - "x": 340, - "y": 306 - } - }, - "BkDj7pFrQ": { - "label": "ORHP", - "id": "BkDj7pFrQ", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 340, - "y": 204 - } - }, - "SJ9aQpYB7": { - "id": "SJ9aQpYB7", - "type": "xod/patch-nodes/jumper", - "position": { - "x": 136, - "y": 102 - } - }, - "S1J-VaYS7": { - "label": "LNLY", - "id": "S1J-VaYS7", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 34, - "y": 102 - } - }, - "rJWXNaYrm": { - "id": "rJWXNaYrm", - "type": "@/baz", - "position": { - "x": 476, - "y": 306 - } - }, - "ByEm4pYH7": { - "id": "ByEm4pYH7", - "type": "@/bar", - "position": { - "x": 476, - "y": 0 - } - }, - "S1PlFQNatrm": { - "id": "S1PlFQNatrm", - "type": "@/baz", - "position": { - "x": 510, - "y": 306 - } - }, - "SkdNNatH7": { - "label": "B", - "id": "SkdNNatH7", - "type": "xod/patch-nodes/jumper", - "position": { - "x": 476, - "y": 102 - } - }, - "Bku_NpKHX": { - "label": "1", - "id": "Bku_NpKHX", - "type": "xod/patch-nodes/jumper", - "position": { - "x": 578, - "y": 102 - } - }, - "HyfKEaFB7": { - "id": "HyfKEaFB7", - "type": "@/foo", - "position": { - "x": 714, - "y": 306 - } - }, - "HyZo4pYS7": { - "label": "2", - "id": "HyZo4pYS7", - "type": "xod/patch-nodes/jumper", - "position": { - "x": 646, - "y": 204 - } - } - }, - "path": "@/main" - }, - "@/foo": { - "nodes": { - "SyVBQTFr7": { - "id": "SyVBQTFr7", - "type": "xod/patch-nodes/input-number", - "position": { - "x": 68, - "y": 0 - } - } - }, - "path": "@/foo" - }, "@/bar": { "nodes": { "BJwD7TtHQ": { "id": "BJwD7TtHQ", - "type": "xod/patch-nodes/output-pulse", "position": { "x": 34, "y": 204 - } + }, + "type": "xod/patch-nodes/output-pulse" }, "SyuuQatrm": { "id": "SyuuQatrm", - "type": "xod/patch-nodes/output-number", "position": { "x": 136, "y": 204 - } + }, + "type": "xod/patch-nodes/output-number" } }, "path": "@/bar" @@ -302,15 +26,381 @@ "nodes": { "HyRFXaFS7": { "id": "HyRFXaFS7", - "type": "xod/patch-nodes/input-pulse", "position": { "x": 136, "y": 0 - } + }, + "type": "xod/patch-nodes/input-pulse" } }, "path": "@/baz" + }, + "@/foo": { + "nodes": { + "SyVBQTFr7": { + "id": "SyVBQTFr7", + "position": { + "x": 68, + "y": 0 + }, + "type": "xod/patch-nodes/input-number" + } + }, + "path": "@/foo" + }, + "@/main": { + "links": { + "B1xxB1I2X": { + "id": "B1xxB1I2X", + "input": { + "nodeId": "BJzJS183m", + "pinKey": "BJxPFmJUh7" + }, + "output": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__out__" + } + }, + "BJB4ITFrX": { + "id": "BJB4ITFrX", + "input": { + "nodeId": "Bke5LmTYrX", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__out__" + } + }, + "BJINUTFSQ": { + "id": "BJINUTFSQ", + "input": { + "nodeId": "rJWXNaYrm", + "pinKey": "HyRFXaFS7" + }, + "output": { + "nodeId": "SkdNNatH7", + "pinKey": "__out__" + } + }, + "BkVxrJ83X": { + "id": "BkVxrJ83X", + "input": { + "nodeId": "BJzJS183m", + "pinKey": "BJxPFmJUh7-$3" + }, + "output": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__out__" + } + }, + "BkeOONpFH7": { + "id": "BkeOONpFH7", + "input": { + "nodeId": "Bku_NpKHX", + "pinKey": "__in__" + }, + "output": { + "nodeId": "ByEm4pYH7", + "pinKey": "SyuuQatrm" + } + }, + "H17eSkLhQ": { + "id": "H17eSkLhQ", + "input": { + "nodeId": "BJzJS183m", + "pinKey": "BJxPFmJUh7-$2" + }, + "output": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__out__" + } + }, + "HJ7HVITFrQ": { + "id": "HJ7HVITFrQ", + "input": { + "nodeId": "HyfKEaFB7", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "HyZo4pYS7", + "pinKey": "__out__" + } + }, + "S1eqaQ6FSm": { + "id": "S1eqaQ6FSm", + "input": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__in__" + }, + "output": { + "nodeId": "B1nOm6Frm", + "pinKey": "SyuuQatrm" + } + }, + "SJZHNLptr7": { + "id": "SJZHNLptr7", + "input": { + "nodeId": "H1P8QaFHX", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__out__" + } + }, + "SJeL4IaYr7": { + "id": "SJeL4IaYr7", + "input": { + "nodeId": "S1PlFQNatrm", + "pinKey": "HyRFXaFS7" + }, + "output": { + "nodeId": "SkdNNatH7", + "pinKey": "__out__" + } + }, + "SJxdEEaKHm": { + "id": "SJxdEEaKHm", + "input": { + "nodeId": "SkdNNatH7", + "pinKey": "__in__" + }, + "output": { + "nodeId": "ByEm4pYH7", + "pinKey": "BJwD7TtHQ" + } + }, + "SkzB4IaYSQ": { + "id": "SkzB4IaYSQ", + "input": { + "nodeId": "HyZo4pYS7", + "pinKey": "__in__" + }, + "output": { + "nodeId": "Bku_NpKHX", + "pinKey": "__out__" + } + }, + "Sygy-VaFH7": { + "id": "Sygy-VaFH7", + "input": { + "nodeId": "S1J-VaYS7", + "pinKey": "__in__" + }, + "output": { + "nodeId": "B1nOm6Frm", + "pinKey": "BJwD7TtHQ" + } + }, + "rJlvompFSm": { + "id": "rJlvompFSm", + "input": { + "nodeId": "S17o7aYSm", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "BkDj7pFrQ", + "pinKey": "__out__" + } + }, + "rkZgrkU3m": { + "id": "rkZgrkU3m", + "input": { + "nodeId": "BJzJS183m", + "pinKey": "BJxPFmJUh7-$1" + }, + "output": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__out__" + } + }, + "ryxBEITKH7": { + "id": "ryxBEITKH7", + "input": { + "nodeId": "S158XptBX", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__out__" + } + } + }, + "nodes": { + "B1nOm6Frm": { + "id": "B1nOm6Frm", + "position": { + "x": 102, + "y": 0 + }, + "type": "@/bar" + }, + "BJzJS183m": { + "arityLevel": 4, + "id": "BJzJS183m", + "position": { + "x": 272, + "y": 306 + }, + "type": "@/var" + }, + "BkDj7pFrQ": { + "id": "BkDj7pFrQ", + "label": "ORHP", + "position": { + "x": 510, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "Bke5LmTYrX": { + "id": "Bke5LmTYrX", + "position": { + "x": 204, + "y": 306 + }, + "type": "@/foo" + }, + "Bku_NpKHX": { + "id": "Bku_NpKHX", + "label": "1", + "position": { + "x": 748, + "y": 102 + }, + "type": "xod/patch-nodes/jumper" + }, + "ByEm4pYH7": { + "id": "ByEm4pYH7", + "position": { + "x": 646, + "y": 0 + }, + "type": "@/bar" + }, + "H1P8QaFHX": { + "id": "H1P8QaFHX", + "position": { + "x": 34, + "y": 306 + }, + "type": "@/foo" + }, + "HyZo4pYS7": { + "id": "HyZo4pYS7", + "label": "2", + "position": { + "x": 816, + "y": 204 + }, + "type": "xod/patch-nodes/jumper" + }, + "HyfKEaFB7": { + "id": "HyfKEaFB7", + "position": { + "x": 884, + "y": 306 + }, + "type": "@/foo" + }, + "S158XptBX": { + "id": "S158XptBX", + "position": { + "x": 102, + "y": 306 + }, + "type": "@/foo" + }, + "S17o7aYSm": { + "id": "S17o7aYSm", + "position": { + "x": 510, + "y": 306 + }, + "type": "@/foo" + }, + "S1J-VaYS7": { + "id": "S1J-VaYS7", + "label": "LNLY", + "position": { + "x": 34, + "y": 102 + }, + "type": "xod/patch-nodes/to-bus" + }, + "S1PlFQNatrm": { + "id": "S1PlFQNatrm", + "position": { + "x": 680, + "y": 306 + }, + "type": "@/baz" + }, + "SJ9aQpYB7": { + "id": "SJ9aQpYB7", + "position": { + "x": 136, + "y": 102 + }, + "type": "xod/patch-nodes/jumper" + }, + "SkdNNatH7": { + "id": "SkdNNatH7", + "label": "B", + "position": { + "x": 646, + "y": 102 + }, + "type": "xod/patch-nodes/jumper" + }, + "rJWXNaYrm": { + "id": "rJWXNaYrm", + "position": { + "x": 646, + "y": 306 + }, + "type": "@/baz" + } + }, + "path": "@/main" + }, + "@/var": { + "nodes": { + "BJxPFmJUh7": { + "id": "BJxPFmJUh7", + "position": { + "x": 33, + "y": -1 + }, + "type": "xod/patch-nodes/input-number" + }, + "Bygim1I3Q": { + "id": "Bygim1I3Q", + "position": { + "x": 0, + "y": 102 + }, + "type": "xod/patch-nodes/variadic-1" + }, + "rJPKX1L3m": { + "id": "rJPKX1L3m", + "position": { + "x": -1, + "y": -1 + }, + "type": "xod/patch-nodes/input-number" + }, + "rJq57J837": { + "id": "rJq57J837", + "position": { + "x": 0, + "y": 204 + }, + "type": "xod/patch-nodes/output-number" + } + }, + "path": "@/var" } - }, - "name": "jumperize" -} \ No newline at end of file + } +} diff --git a/packages/xod-project/test/fixtures/jumperize.xodball b/packages/xod-project/test/fixtures/jumperize.xodball index 204b4106..bfe9ae17 100644 --- a/packages/xod-project/test/fixtures/jumperize.xodball +++ b/packages/xod-project/test/fixtures/jumperize.xodball @@ -1,351 +1,23 @@ { + "name": "jumperize", "patches": { - "@/main": { - "nodes": { - "H1P8QaFHX": { - "id": "H1P8QaFHX", - "type": "@/foo", - "position": { - "x": 34, - "y": 306 - } - }, - "S158XptBX": { - "id": "S158XptBX", - "type": "@/foo", - "position": { - "x": 102, - "y": 306 - } - }, - "Bke5LmTYrX": { - "id": "Bke5LmTYrX", - "type": "@/foo", - "position": { - "x": 204, - "y": 306 - } - }, - "B1nOm6Frm": { - "id": "B1nOm6Frm", - "type": "@/bar", - "position": { - "x": 102, - "y": 0 - } - }, - "S17o7aYSm": { - "id": "S17o7aYSm", - "type": "@/foo", - "position": { - "x": 340, - "y": 306 - } - }, - "BkDj7pFrQ": { - "id": "BkDj7pFrQ", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 340, - "y": 204 - }, - "label": "ORHP" - }, - "ryr5pm6KSQ": { - "id": "ryr5pm6KSQ", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 204, - "y": 204 - } - }, - "H1Xqa76KBQ": { - "id": "H1Xqa76KBQ", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 68, - "y": 204 - } - }, - "SJ9aQpYB7": { - "id": "SJ9aQpYB7", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 136, - "y": 102 - } - }, - "S1J-VaYS7": { - "id": "S1J-VaYS7", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 34, - "y": 102 - }, - "label": "LNLY" - }, - "rJWXNaYrm": { - "id": "rJWXNaYrm", - "type": "@/baz", - "position": { - "x": 476, - "y": 306 - } - }, - "ByEm4pYH7": { - "id": "ByEm4pYH7", - "type": "@/bar", - "position": { - "x": 476, - "y": 0 - } - }, - "S1PlFQNatrm": { - "id": "S1PlFQNatrm", - "type": "@/baz", - "position": { - "x": 510, - "y": 306 - } - }, - "rJE4V6YSQ": { - "id": "rJE4V6YSQ", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 476, - "y": 204 - }, - "label": "B" - }, - "S17GHENpKSX": { - "id": "S17GHENpKSX", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 510, - "y": 204 - }, - "label": "B" - }, - "SkdNNatH7": { - "id": "SkdNNatH7", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 476, - "y": 102 - }, - "label": "B" - }, - "Bku_NpKHX": { - "id": "Bku_NpKHX", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 578, - "y": 102 - }, - "label": "1" - }, - "HyfKEaFB7": { - "id": "HyfKEaFB7", - "type": "@/foo", - "position": { - "x": 714, - "y": 306 - } - }, - "SylMKEpFHm": { - "id": "SylMKEpFHm", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 714, - "y": 204 - }, - "label": "2" - }, - "SJxQV9ETKBm": { - "id": "SJxQV9ETKBm", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 646, - "y": 102 - }, - "label": "1" - }, - "HyZo4pYS7": { - "id": "HyZo4pYS7", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 646, - "y": 204 - }, - "label": "2" - } - }, - "links": { - "rJlvompFSm": { - "id": "rJlvompFSm", - "output": { - "nodeId": "BkDj7pFrQ", - "pinKey": "__out__" - }, - "input": { - "nodeId": "S17o7aYSm", - "pinKey": "SyVBQTFr7" - } - }, - "S1I5p7TYH7": { - "id": "S1I5p7TYH7", - "output": { - "nodeId": "ryr5pm6KSQ", - "pinKey": "__out__" - }, - "input": { - "nodeId": "Bke5LmTYrX", - "pinKey": "SyVBQTFr7" - } - }, - "Sy4caQTYrQ": { - "id": "Sy4caQTYrQ", - "output": { - "nodeId": "H1Xqa76KBQ", - "pinKey": "__out__" - }, - "input": { - "nodeId": "S158XptBX", - "pinKey": "SyVBQTFr7" - } - }, - "S1eqaQ6FSm": { - "id": "S1eqaQ6FSm", - "output": { - "nodeId": "B1nOm6Frm", - "pinKey": "SyuuQatrm" - }, - "input": { - "nodeId": "SJ9aQpYB7", - "pinKey": "__in__" - } - }, - "SyFbpTQpKHQ": { - "id": "SyFbpTQpKHQ", - "output": { - "nodeId": "H1Xqa76KBQ", - "pinKey": "__out__" - }, - "input": { - "nodeId": "H1P8QaFHX", - "pinKey": "SyVBQTFr7" - } - }, - "Sygy-VaFH7": { - "id": "Sygy-VaFH7", - "output": { - "nodeId": "B1nOm6Frm", - "pinKey": "BJwD7TtHQ" - }, - "input": { - "nodeId": "S1J-VaYS7", - "pinKey": "__in__" - } - }, - "BJxVNE6tSX": { - "id": "BJxVNE6tSX", - "output": { - "nodeId": "rJE4V6YSQ", - "pinKey": "__out__" - }, - "input": { - "nodeId": "rJWXNaYrm", - "pinKey": "HyRFXaFS7" - } - }, - "rkNGBVEaFS7": { - "id": "rkNGBVEaFS7", - "output": { - "nodeId": "S17GHENpKSX", - "pinKey": "__out__" - }, - "input": { - "nodeId": "S1PlFQNatrm", - "pinKey": "HyRFXaFS7" - } - }, - "SJxdEEaKHm": { - "id": "SJxdEEaKHm", - "output": { - "nodeId": "ByEm4pYH7", - "pinKey": "BJwD7TtHQ" - }, - "input": { - "nodeId": "SkdNNatH7", - "pinKey": "__in__" - } - }, - "BkeOONpFH7": { - "id": "BkeOONpFH7", - "output": { - "nodeId": "ByEm4pYH7", - "pinKey": "SyuuQatrm" - }, - "input": { - "nodeId": "Bku_NpKHX", - "pinKey": "__in__" - } - }, - "HyWzKNpYrQ": { - "id": "HyWzKNpYrQ", - "output": { - "nodeId": "SylMKEpFHm", - "pinKey": "__out__" - }, - "input": { - "nodeId": "HyfKEaFB7", - "pinKey": "SyVBQTFr7" - } - }, - "r1e-o4TtBX": { - "id": "r1e-o4TtBX", - "output": { - "nodeId": "SJxQV9ETKBm", - "pinKey": "__out__" - }, - "input": { - "nodeId": "HyZo4pYS7", - "pinKey": "__in__" - } - } - }, - "path": "@/main" - }, - "@/foo": { - "nodes": { - "SyVBQTFr7": { - "id": "SyVBQTFr7", - "type": "xod/patch-nodes/input-number", - "position": { - "x": 68, - "y": 0 - } - } - }, - "path": "@/foo" - }, "@/bar": { "nodes": { "BJwD7TtHQ": { "id": "BJwD7TtHQ", - "type": "xod/patch-nodes/output-pulse", "position": { "x": 34, "y": 204 - } + }, + "type": "xod/patch-nodes/output-pulse" }, "SyuuQatrm": { "id": "SyuuQatrm", - "type": "xod/patch-nodes/output-number", "position": { "x": 136, "y": 204 - } + }, + "type": "xod/patch-nodes/output-number" } }, "path": "@/bar" @@ -354,15 +26,457 @@ "nodes": { "HyRFXaFS7": { "id": "HyRFXaFS7", - "type": "xod/patch-nodes/input-pulse", "position": { "x": 136, "y": 0 - } + }, + "type": "xod/patch-nodes/input-pulse" } }, "path": "@/baz" + }, + "@/foo": { + "nodes": { + "SyVBQTFr7": { + "id": "SyVBQTFr7", + "position": { + "x": 68, + "y": 0 + }, + "type": "xod/patch-nodes/input-number" + } + }, + "path": "@/foo" + }, + "@/main": { + "links": { + "BJxVNE6tSX": { + "id": "BJxVNE6tSX", + "input": { + "nodeId": "rJWXNaYrm", + "pinKey": "HyRFXaFS7" + }, + "output": { + "nodeId": "rJE4V6YSQ", + "pinKey": "__out__" + } + }, + "BkeOONpFH7": { + "id": "BkeOONpFH7", + "input": { + "nodeId": "Bku_NpKHX", + "pinKey": "__in__" + }, + "output": { + "nodeId": "ByEm4pYH7", + "pinKey": "SyuuQatrm" + } + }, + "Byuoh7JIhQ": { + "id": "Byuoh7JIhQ", + "input": { + "nodeId": "ByrsXyI2X", + "pinKey": "BJxPFmJUh7-$3" + }, + "output": { + "nodeId": "Hkwj3Qy837", + "pinKey": "__out__" + } + }, + "H1Vo3mk8hm": { + "id": "H1Vo3mk8hm", + "input": { + "nodeId": "ByrsXyI2X", + "pinKey": "BJxPFmJUh7-$1" + }, + "output": { + "nodeId": "Skmj37yU2Q", + "pinKey": "__out__" + } + }, + "HyWzKNpYrQ": { + "id": "HyWzKNpYrQ", + "input": { + "nodeId": "HyfKEaFB7", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "SylMKEpFHm", + "pinKey": "__out__" + } + }, + "S1I5p7TYH7": { + "id": "S1I5p7TYH7", + "input": { + "nodeId": "Bke5LmTYrX", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "ryr5pm6KSQ", + "pinKey": "__out__" + } + }, + "S1eqaQ6FSm": { + "id": "S1eqaQ6FSm", + "input": { + "nodeId": "SJ9aQpYB7", + "pinKey": "__in__" + }, + "output": { + "nodeId": "B1nOm6Frm", + "pinKey": "SyuuQatrm" + } + }, + "SJxdEEaKHm": { + "id": "SJxdEEaKHm", + "input": { + "nodeId": "SkdNNatH7", + "pinKey": "__in__" + }, + "output": { + "nodeId": "ByEm4pYH7", + "pinKey": "BJwD7TtHQ" + } + }, + "Sy4caQTYrQ": { + "id": "Sy4caQTYrQ", + "input": { + "nodeId": "S158XptBX", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "H1Xqa76KBQ", + "pinKey": "__out__" + } + }, + "SyFbpTQpKHQ": { + "id": "SyFbpTQpKHQ", + "input": { + "nodeId": "H1P8QaFHX", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "H1Xqa76KBQ", + "pinKey": "__out__" + } + }, + "SyXaX182Q": { + "id": "SyXaX182Q", + "input": { + "nodeId": "ByrsXyI2X", + "pinKey": "BJxPFmJUh7-$2" + }, + "output": { + "nodeId": "Hkwj3Qy837", + "pinKey": "__out__" + } + }, + "Sygy-VaFH7": { + "id": "Sygy-VaFH7", + "input": { + "nodeId": "S1J-VaYS7", + "pinKey": "__in__" + }, + "output": { + "nodeId": "B1nOm6Frm", + "pinKey": "BJwD7TtHQ" + } + }, + "r1e-o4TtBX": { + "id": "r1e-o4TtBX", + "input": { + "nodeId": "HyZo4pYS7", + "pinKey": "__in__" + }, + "output": { + "nodeId": "SJxQV9ETKBm", + "pinKey": "__out__" + } + }, + "r1fo2mk837": { + "id": "r1fo2mk837", + "input": { + "nodeId": "ByrsXyI2X", + "pinKey": "BJxPFmJUh7" + }, + "output": { + "nodeId": "ryZjhXyI3X", + "pinKey": "__out__" + } + }, + "rJlvompFSm": { + "id": "rJlvompFSm", + "input": { + "nodeId": "S17o7aYSm", + "pinKey": "SyVBQTFr7" + }, + "output": { + "nodeId": "BkDj7pFrQ", + "pinKey": "__out__" + } + }, + "rkNGBVEaFS7": { + "id": "rkNGBVEaFS7", + "input": { + "nodeId": "S1PlFQNatrm", + "pinKey": "HyRFXaFS7" + }, + "output": { + "nodeId": "S17GHENpKSX", + "pinKey": "__out__" + } + } + }, + "nodes": { + "B1nOm6Frm": { + "id": "B1nOm6Frm", + "position": { + "x": 102, + "y": 0 + }, + "type": "@/bar" + }, + "BkDj7pFrQ": { + "id": "BkDj7pFrQ", + "label": "ORHP", + "position": { + "x": 510, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "Bke5LmTYrX": { + "id": "Bke5LmTYrX", + "position": { + "x": 204, + "y": 306 + }, + "type": "@/foo" + }, + "Bku_NpKHX": { + "id": "Bku_NpKHX", + "label": "1", + "position": { + "x": 748, + "y": 102 + }, + "type": "xod/patch-nodes/to-bus" + }, + "ByEm4pYH7": { + "id": "ByEm4pYH7", + "position": { + "x": 646, + "y": 0 + }, + "type": "@/bar" + }, + "ByrsXyI2X": { + "arityLevel": 4, + "id": "ByrsXyI2X", + "position": { + "x": 272, + "y": 306 + }, + "type": "@/var" + }, + "H1P8QaFHX": { + "id": "H1P8QaFHX", + "position": { + "x": 34, + "y": 306 + }, + "type": "@/foo" + }, + "H1Xqa76KBQ": { + "id": "H1Xqa76KBQ", + "position": { + "x": 68, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "Hkwj3Qy837": { + "id": "Hkwj3Qy837", + "position": { + "x": 408, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "HyZo4pYS7": { + "id": "HyZo4pYS7", + "label": "2", + "position": { + "x": 816, + "y": 204 + }, + "type": "xod/patch-nodes/to-bus" + }, + "HyfKEaFB7": { + "id": "HyfKEaFB7", + "position": { + "x": 884, + "y": 306 + }, + "type": "@/foo" + }, + "S158XptBX": { + "id": "S158XptBX", + "position": { + "x": 102, + "y": 306 + }, + "type": "@/foo" + }, + "S17GHENpKSX": { + "id": "S17GHENpKSX", + "label": "B", + "position": { + "x": 680, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "S17o7aYSm": { + "id": "S17o7aYSm", + "position": { + "x": 510, + "y": 306 + }, + "type": "@/foo" + }, + "S1J-VaYS7": { + "id": "S1J-VaYS7", + "label": "LNLY", + "position": { + "x": 34, + "y": 102 + }, + "type": "xod/patch-nodes/to-bus" + }, + "S1PlFQNatrm": { + "id": "S1PlFQNatrm", + "position": { + "x": 680, + "y": 306 + }, + "type": "@/baz" + }, + "SJ9aQpYB7": { + "id": "SJ9aQpYB7", + "position": { + "x": 136, + "y": 102 + }, + "type": "xod/patch-nodes/to-bus" + }, + "SJxQV9ETKBm": { + "id": "SJxQV9ETKBm", + "label": "1", + "position": { + "x": 816, + "y": 102 + }, + "type": "xod/patch-nodes/from-bus" + }, + "SkdNNatH7": { + "id": "SkdNNatH7", + "label": "B", + "position": { + "x": 646, + "y": 102 + }, + "type": "xod/patch-nodes/to-bus" + }, + "Skmj37yU2Q": { + "id": "Skmj37yU2Q", + "position": { + "x": 340, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "SylMKEpFHm": { + "id": "SylMKEpFHm", + "label": "2", + "position": { + "x": 884, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "rJE4V6YSQ": { + "id": "rJE4V6YSQ", + "label": "B", + "position": { + "x": 646, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "rJWXNaYrm": { + "id": "rJWXNaYrm", + "position": { + "x": 646, + "y": 306 + }, + "type": "@/baz" + }, + "ryZjhXyI3X": { + "id": "ryZjhXyI3X", + "position": { + "x": 306, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + }, + "ryr5pm6KSQ": { + "id": "ryr5pm6KSQ", + "position": { + "x": 204, + "y": 204 + }, + "type": "xod/patch-nodes/from-bus" + } + }, + "path": "@/main" + }, + "@/var": { + "nodes": { + "BJxPFmJUh7": { + "id": "BJxPFmJUh7", + "position": { + "x": 33, + "y": -1 + }, + "type": "xod/patch-nodes/input-number" + }, + "Bygim1I3Q": { + "id": "Bygim1I3Q", + "position": { + "x": 0, + "y": 102 + }, + "type": "xod/patch-nodes/variadic-1" + }, + "rJPKX1L3m": { + "id": "rJPKX1L3m", + "position": { + "x": -1, + "y": -1 + }, + "type": "xod/patch-nodes/input-number" + }, + "rJq57J837": { + "id": "rJq57J837", + "position": { + "x": 0, + "y": 204 + }, + "type": "xod/patch-nodes/output-number" + } + }, + "path": "@/var" } - }, - "name": "jumperize" -} \ No newline at end of file + } +} diff --git a/packages/xod-project/test/fixtures/split-links-to-buses.expected.xodball b/packages/xod-project/test/fixtures/split-links-to-buses.expected.xodball index 968d2c23..6ff3fc39 100644 --- a/packages/xod-project/test/fixtures/split-links-to-buses.expected.xodball +++ b/packages/xod-project/test/fixtures/split-links-to-buses.expected.xodball @@ -1,421 +1,39 @@ { "patches": { - "@/main": { - "links": { - "H1iGEqFHX": { - "id": "H1iGEqFHX", - "output": { - "nodeId": "HyVl45tr7", - "pinKey": "H1kkE5FB7" - }, - "input": { - "nodeId": "rJYzE9tBQ", - "pinKey": "__in__" - } - }, - "SJIDgX6FSX": { - "id": "SJIDgX6FSX", - "output": { - "nodeId": "rySwlQTtHX", - "pinKey": "__out__" - }, - "input": { - "nodeId": "Bygt7rcYrm", - "pinKey": "HJvvXcKrm" - } - }, - "ryEDlmaKrm": { - "id": "ryEDlmaKrm", - "output": { - "nodeId": "SkmveQaFB7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "S1F7rcYBQ", - "pinKey": "HJvvXcKrm" - } - }, - "ByGveXpFrQ": { - "id": "ByGveXpFrQ", - "output": { - "nodeId": "By87H9KHX", - "pinKey": "S1WveB9YHQ" - }, - "input": { - "nodeId": "BybwlQatHQ", - "pinKey": "__in__" - } - }, - "Hy3DgmaKHQ": { - "id": "Hy3DgmaKHQ", - "output": { - "nodeId": "H1owlmpYBX", - "pinKey": "__out__" - }, - "input": { - "nodeId": "Bygt7rcYrm", - "pinKey": "rklOQcKB7" - } - }, - "r1qDxXpFHX": { - "id": "r1qDxXpFHX", - "output": { - "nodeId": "r1tDeXTtrX", - "pinKey": "__out__" - }, - "input": { - "nodeId": "S1F7rcYBQ", - "pinKey": "rklOQcKB7" - } - }, - "BJdDlQTFrQ": { - "id": "BJdDlQTFrQ", - "output": { - "nodeId": "By87H9KHX", - "pinKey": "SJxvxScFB7" - }, - "input": { - "nodeId": "SJvDgXatHm", - "pinKey": "__in__" - } - }, - "rklgDlXatrX": { - "id": "rklgDlXatrX", - "output": { - "nodeId": "ryJeDl7TFrQ", - "pinKey": "__out__" - }, - "input": { - "nodeId": "BylqXqKBm", - "pinKey": "HJvvXcKrm" - } - }, - "ry0Dg7TKSm": { - "id": "ry0Dg7TKSm", - "output": { - "nodeId": "BJTPxmTFBm", - "pinKey": "__out__" - }, - "input": { - "nodeId": "B1sYQ9tSX", - "pinKey": "HJvvXcKrm" - } - }, - "HkIlvx76KSX": { - "id": "HkIlvx76KSX", - "output": { - "nodeId": "BkHgvlQ6KSm", - "pinKey": "__out__" - }, - "input": { - "nodeId": "BylqXqKBm", - "pinKey": "rklOQcKB7" - } - }, - "rJ4gPx7atSm": { - "id": "rJ4gPx7atSm", - "output": { - "nodeId": "HJmxwl7aKr7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "B1sYQ9tSX", - "pinKey": "rklOQcKB7" - } - }, - "S1flPgQTKBQ": { - "id": "S1flPgQTKBQ", - "output": { - "nodeId": "HyVl45tr7", - "pinKey": "S1pR7cKS7" - }, - "input": { - "nodeId": "rkZlwgQTKHX", - "pinKey": "__in__" - } - }, - "rk9xvl76FS7": { - "id": "rk9xvl76FS7", - "output": { - "nodeId": "rJFewlXaFHm", - "pinKey": "__out__" - }, - "input": { - "nodeId": "SyNgzpYr7", - "pinKey": "HJvvXcKrm" - } - }, - "S1ulDgmpYHm": { - "id": "S1ulDgmpYHm", - "output": { - "nodeId": "r1lIz6Kr7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "BkDgwlQpFH7", - "pinKey": "__in__" - } - } - }, - "nodes": { - "B1sYQ9tSX": { - "id": "B1sYQ9tSX", - "type": "@/foo", - "position": { - "x": 136, - "y": 408 - } - }, - "BylqXqKBm": { - "id": "BylqXqKBm", - "type": "@/foo", - "position": { - "x": 340, - "y": 408 - } - }, - "HyVl45tr7": { - "id": "HyVl45tr7", - "type": "@/bar", - "position": { - "x": 340, - "y": 102 - } - }, - "rJYzE9tBQ": { - "label": "XSTG", - "id": "rJYzE9tBQ", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 442, - "y": 204 - } - }, - "By87H9KHX": { - "id": "By87H9KHX", - "type": "@/baz", - "position": { - "x": 646, - "y": 102 - } - }, - "S1F7rcYBQ": { - "id": "S1F7rcYBQ", - "type": "@/foo", - "position": { - "x": 578, - "y": 408 - } - }, - "Bygt7rcYrm": { - "id": "Bygt7rcYrm", - "type": "@/foo", - "position": { - "x": 714, - "y": 408 - } - }, - "SyNgzpYr7": { - "id": "SyNgzpYr7", - "type": "@/foo", - "position": { - "x": 918, - "y": 408 - } - }, - "r1lIz6Kr7": { - "label": "LBL", - "id": "r1lIz6Kr7", - "type": "xod/patch-nodes/input-pulse", - "position": { - "x": 918, - "y": 102 - } - }, - "rySwlQTtHX": { - "id": "rySwlQTtHX", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 744, - "y": 308 - } - }, - "SkmveQaFB7": { - "id": "SkmveQaFB7", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 608, - "y": 308 - } - }, - "BybwlQatHQ": { - "id": "BybwlQatHQ", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 676, - "y": 202 - } - }, - "H1owlmpYBX": { - "id": "H1owlmpYBX", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 714, - "y": 308 - } - }, - "r1tDeXTtrX": { - "id": "r1tDeXTtrX", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 578, - "y": 308 - } - }, - "SJvDgXatHm": { - "id": "SJvDgXatHm", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 646, - "y": 202 - } - }, - "ryJeDl7TFrQ": { - "id": "ryJeDl7TFrQ", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 370, - "y": 308 - }, - "label": "XSTG" - }, - "BJTPxmTFBm": { - "id": "BJTPxmTFBm", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 166, - "y": 308 - }, - "label": "XSTG" - }, - "BkHgvlQ6KSm": { - "id": "BkHgvlQ6KSm", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 340, - "y": 308 - }, - "label": "A" - }, - "HJmxwl7aKr7": { - "id": "HJmxwl7aKr7", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 136, - "y": 308 - }, - "label": "A" - }, - "rkZlwgQTKHX": { - "id": "rkZlwgQTKHX", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 340, - "y": 202 - }, - "label": "A" - }, - "rJFewlXaFHm": { - "id": "rJFewlXaFHm", - "type": "xod/patch-nodes/from-bus", - "position": { - "x": 948, - "y": 308 - }, - "label": "LBL" - }, - "BkDgwlQpFH7": { - "id": "BkDgwlQpFH7", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 918, - "y": 202 - }, - "label": "LBL" - } - }, - "path": "@/main" - }, - "@/foo": { - "attachments": [ - { - "filename": "patch.cpp", - "encoding": "utf-8", - "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n" - } - ], - "nodes": { - "BJGB7cYrX": { - "id": "BJGB7cYrX", - "type": "xod/patch-nodes/not-implemented-in-xod", - "position": { - "x": 0, - "y": 102 - } - }, - "HJvvXcKrm": { - "id": "HJvvXcKrm", - "type": "xod/patch-nodes/input-pulse", - "position": { - "x": 68, - "y": 0 - } - }, - "rklOQcKB7": { - "id": "rklOQcKB7", - "type": "xod/patch-nodes/input-number", - "position": { - "x": 0, - "y": 0 - } - } - }, - "path": "@/foo" - }, "@/bar": { "attachments": [ { - "filename": "patch.cpp", + "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n", "encoding": "utf-8", - "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n" + "filename": "patch.cpp" } ], "nodes": { - "ry2SX9KB7": { - "id": "ry2SX9KB7", - "type": "xod/patch-nodes/not-implemented-in-xod", + "H1kkE5FB7": { + "label": "B", + "id": "H1kkE5FB7", "position": { - "x": 0, - "y": 0 - } + "x": 68, + "y": 102 + }, + "type": "xod/patch-nodes/output-pulse" }, "S1pR7cKS7": { "label": "A", "id": "S1pR7cKS7", - "type": "xod/patch-nodes/output-number", "position": { "x": 0, "y": 102 - } + }, + "type": "xod/patch-nodes/output-number" }, - "H1kkE5FB7": { - "label": "B", - "id": "H1kkE5FB7", - "type": "xod/patch-nodes/output-pulse", + "ry2SX9KB7": { + "id": "ry2SX9KB7", "position": { - "x": 68, - "y": 102 - } + "x": 0, + "y": 0 + }, + "type": "xod/patch-nodes/not-implemented-in-xod" } }, "path": "@/bar" @@ -423,38 +41,642 @@ "@/baz": { "attachments": [ { - "filename": "patch.cpp", + "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n", "encoding": "utf-8", - "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n" + "filename": "patch.cpp" } ], "nodes": { "HJDxScKr7": { "id": "HJDxScKr7", - "type": "xod/patch-nodes/not-implemented-in-xod", "position": { "x": 0, "y": 0 - } - }, - "SJxvxScFB7": { - "id": "SJxvxScFB7", - "type": "xod/patch-nodes/output-number", - "position": { - "x": -1, - "y": 101 - } + }, + "type": "xod/patch-nodes/not-implemented-in-xod" }, "S1WveB9YHQ": { "id": "S1WveB9YHQ", - "type": "xod/patch-nodes/output-pulse", "position": { "x": 68, "y": 102 - } + }, + "type": "xod/patch-nodes/output-pulse" + }, + "SJxvxScFB7": { + "id": "SJxvxScFB7", + "position": { + "x": -1, + "y": 101 + }, + "type": "xod/patch-nodes/output-number" } }, "path": "@/baz" + }, + "@/foo": { + "attachments": [ + { + "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n", + "encoding": "utf-8", + "filename": "patch.cpp" + } + ], + "nodes": { + "BJGB7cYrX": { + "id": "BJGB7cYrX", + "position": { + "x": 0, + "y": 102 + }, + "type": "xod/patch-nodes/not-implemented-in-xod" + }, + "HJvvXcKrm": { + "id": "HJvvXcKrm", + "position": { + "x": 68, + "y": 0 + }, + "type": "xod/patch-nodes/input-pulse" + }, + "rklOQcKB7": { + "id": "rklOQcKB7", + "position": { + "x": 0, + "y": 0 + }, + "type": "xod/patch-nodes/input-number" + } + }, + "path": "@/foo" + }, + "@/main": { + "links": { + "H1iGEqFHX": { + "id": "H1iGEqFHX", + "input": { + "nodeId": "rJYzE9tBQ", + "pinKey": "__in__" + }, + "output": { + "nodeId": "HyVl45tr7", + "pinKey": "H1kkE5FB7" + } + }, + "SkYgpcJ8n7": { + "id": "SkYgpcJ8n7", + "output": { + "nodeId": "ByOgaqkLnX", + "pinKey": "__out__" + }, + "input": { + "nodeId": "S1F7rcYBQ", + "pinKey": "HJvvXcKrm" + } + }, + "B1PeT9JU3m": { + "id": "B1PeT9JU3m", + "output": { + "nodeId": "rkLg65yI2m", + "pinKey": "__out__" + }, + "input": { + "nodeId": "Bygt7rcYrm", + "pinKey": "HJvvXcKrm" + } + }, + "rJSla5kInQ": { + "id": "rJSla5kInQ", + "output": { + "nodeId": "By87H9KHX", + "pinKey": "S1WveB9YHQ" + }, + "input": { + "nodeId": "rkEga9kL3Q", + "pinKey": "__in__" + } + }, + "BkJxep5y827": { + "id": "BkJxep5y827", + "output": { + "nodeId": "S10eacyI2X", + "pinKey": "__out__" + }, + "input": { + "nodeId": "S1F7rcYBQ", + "pinKey": "rklOQcKB7" + } + }, + "rkpxa5kUhm": { + "id": "rkpxa5kUhm", + "output": { + "nodeId": "rJ2xp918hm", + "pinKey": "__out__" + }, + "input": { + "nodeId": "Bygt7rcYrm", + "pinKey": "rklOQcKB7" + } + }, + "Bksxpq183m": { + "id": "Bksxpq183m", + "output": { + "nodeId": "By87H9KHX", + "pinKey": "SJxvxScFB7" + }, + "input": { + "nodeId": "Syqxa9J83X", + "pinKey": "__in__" + } + }, + "H1Qeep5JUnQ": { + "id": "H1Qeep5JUnQ", + "output": { + "nodeId": "H1Gll65y8n7", + "pinKey": "__out__" + }, + "input": { + "nodeId": "BylqXqKBm", + "pinKey": "HJvvXcKrm" + } + }, + "ryZxxT5JLhX": { + "id": "ryZxxT5JLhX", + "output": { + "nodeId": "H1glxpqJU2Q", + "pinKey": "__out__" + }, + "input": { + "nodeId": "B1sYQ9tSX", + "pinKey": "HJvvXcKrm" + } + }, + "ByKglT5kU2m": { + "id": "ByKglT5kU2m", + "output": { + "nodeId": "Hk_xxT91I37", + "pinKey": "__out__" + }, + "input": { + "nodeId": "BylqXqKBm", + "pinKey": "rklOQcKB7" + } + }, + "Skvllac1I37": { + "id": "Skvllac1I37", + "output": { + "nodeId": "ByIgx65kUnX", + "pinKey": "__out__" + }, + "input": { + "nodeId": "B1sYQ9tSX", + "pinKey": "rklOQcKB7" + } + }, + "H1Sgga5y8nX": { + "id": "H1Sgga5y8nX", + "output": { + "nodeId": "HyVl45tr7", + "pinKey": "S1pR7cKS7" + }, + "input": { + "nodeId": "ByVxl6qJI27", + "pinKey": "__in__" + } + }, + "H1plxac182m": { + "id": "H1plxac182m", + "output": { + "nodeId": "rk3ge6q1837", + "pinKey": "__out__" + }, + "input": { + "nodeId": "SyNgzpYr7", + "pinKey": "HJvvXcKrm" + } + }, + "ryixepckL2m": { + "id": "ryixepckL2m", + "output": { + "nodeId": "r1lIz6Kr7", + "pinKey": "__out__" + }, + "input": { + "nodeId": "HyqxgaqJ837", + "pinKey": "__in__" + } + }, + "BJ6bepck8h7": { + "id": "BJ6bepck8h7", + "output": { + "nodeId": "Sk2WgTcyI2X", + "pinKey": "__out__" + }, + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$5" + } + }, + "H1sWeT5yU2X": { + "id": "H1sWeT5yU2X", + "output": { + "nodeId": "HJ9-eT5JI2m", + "pinKey": "__out__" + }, + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$2" + } + }, + "SytZeTqJUnm": { + "id": "SytZeTqJUnm", + "output": { + "nodeId": "rkuWlacy8h7", + "pinKey": "__out__" + }, + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "rJPKX1L3m" + } + }, + "rJDWx65yLhX": { + "id": "rJDWx65yLhX", + "output": { + "nodeId": "BJLWeT9JIhm", + "pinKey": "__out__" + }, + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$3" + } + }, + "HkSZe65kI3X": { + "id": "HkSZe65kI3X", + "output": { + "nodeId": "HyEWg651UnQ", + "pinKey": "__out__" + }, + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$4" + } + }, + "rkQbgp91I3Q": { + "id": "rkQbgp91I3Q", + "output": { + "nodeId": "rJGWxp5kIh7", + "pinKey": "__out__" + }, + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7" + } + }, + "H1bWgpqkInm": { + "id": "H1bWgpqkInm", + "output": { + "nodeId": "Byx-lTq1U2m", + "pinKey": "__out__" + }, + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$1" + } + }, + "rkJblp91Uh7": { + "id": "rkJblp91Uh7", + "output": { + "nodeId": "rknBLyIhm", + "pinKey": "__out__" + }, + "input": { + "nodeId": "H1Cex6cyLnm", + "pinKey": "__in__" + } + } + }, + "nodes": { + "B1sYQ9tSX": { + "id": "B1sYQ9tSX", + "position": { + "x": 136, + "y": 408 + }, + "type": "@/foo" + }, + "By87H9KHX": { + "id": "By87H9KHX", + "position": { + "x": 646, + "y": 102 + }, + "type": "@/baz" + }, + "Bygt7rcYrm": { + "id": "Bygt7rcYrm", + "position": { + "x": 714, + "y": 408 + }, + "type": "@/foo" + }, + "BylqXqKBm": { + "id": "BylqXqKBm", + "position": { + "x": 340, + "y": 408 + }, + "type": "@/foo" + }, + "H1jQ8JLhX": { + "arityLevel": 6, + "id": "H1jQ8JLhX", + "position": { + "x": 136, + "y": 816 + }, + "type": "@/var" + }, + "HyVl45tr7": { + "id": "HyVl45tr7", + "position": { + "x": 340, + "y": 102 + }, + "type": "@/bar" + }, + "S1F7rcYBQ": { + "id": "S1F7rcYBQ", + "position": { + "x": 578, + "y": 408 + }, + "type": "@/foo" + }, + "SyNgzpYr7": { + "id": "SyNgzpYr7", + "position": { + "x": 918, + "y": 408 + }, + "type": "@/foo" + }, + "r1lIz6Kr7": { + "label": "LBL", + "id": "r1lIz6Kr7", + "position": { + "x": 918, + "y": 102 + }, + "type": "xod/patch-nodes/input-pulse" + }, + "rJYzE9tBQ": { + "label": "XSTG", + "id": "rJYzE9tBQ", + "position": { + "x": 442, + "y": 204 + }, + "type": "xod/patch-nodes/to-bus" + }, + "rknBLyIhm": { + "label": "V", + "id": "rknBLyIhm", + "position": { + "x": 238, + "y": 510 + }, + "type": "xod/patch-nodes/input-number" + }, + "ByOgaqkLnX": { + "id": "ByOgaqkLnX", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 608, + "y": 308 + } + }, + "rkLg65yI2m": { + "id": "rkLg65yI2m", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 744, + "y": 308 + } + }, + "rkEga9kL3Q": { + "id": "rkEga9kL3Q", + "type": "xod/patch-nodes/to-bus", + "position": { + "x": 676, + "y": 202 + } + }, + "S10eacyI2X": { + "id": "S10eacyI2X", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 578, + "y": 308 + } + }, + "rJ2xp918hm": { + "id": "rJ2xp918hm", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 714, + "y": 308 + } + }, + "Syqxa9J83X": { + "id": "Syqxa9J83X", + "type": "xod/patch-nodes/to-bus", + "position": { + "x": 646, + "y": 202 + } + }, + "H1Gll65y8n7": { + "id": "H1Gll65y8n7", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 370, + "y": 308 + }, + "label": "XSTG" + }, + "H1glxpqJU2Q": { + "id": "H1glxpqJU2Q", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 166, + "y": 308 + }, + "label": "XSTG" + }, + "Hk_xxT91I37": { + "id": "Hk_xxT91I37", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 340, + "y": 308 + }, + "label": "A" + }, + "ByIgx65kUnX": { + "id": "ByIgx65kUnX", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 136, + "y": 308 + }, + "label": "A" + }, + "ByVxl6qJI27": { + "id": "ByVxl6qJI27", + "type": "xod/patch-nodes/to-bus", + "position": { + "x": 340, + "y": 202 + }, + "label": "A" + }, + "rk3ge6q1837": { + "id": "rk3ge6q1837", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 948, + "y": 308 + }, + "label": "LBL" + }, + "HyqxgaqJ837": { + "id": "HyqxgaqJ837", + "type": "xod/patch-nodes/to-bus", + "position": { + "x": 918, + "y": 202 + }, + "label": "LBL" + }, + "Sk2WgTcyI2X": { + "id": "Sk2WgTcyI2X", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 316, + "y": 716 + }, + "label": "V" + }, + "HJ9-eT5JI2m": { + "id": "HJ9-eT5JI2m", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 226, + "y": 716 + }, + "label": "V" + }, + "rkuWlacy8h7": { + "id": "rkuWlacy8h7", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 136, + "y": 716 + }, + "label": "V" + }, + "BJLWeT9JIhm": { + "id": "BJLWeT9JIhm", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 256, + "y": 716 + }, + "label": "V" + }, + "HyEWg651UnQ": { + "id": "HyEWg651UnQ", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 286, + "y": 716 + }, + "label": "V" + }, + "rJGWxp5kIh7": { + "id": "rJGWxp5kIh7", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 166, + "y": 716 + }, + "label": "V" + }, + "Byx-lTq1U2m": { + "id": "Byx-lTq1U2m", + "type": "xod/patch-nodes/from-bus", + "position": { + "x": 196, + "y": 716 + }, + "label": "V" + }, + "H1Cex6cyLnm": { + "id": "H1Cex6cyLnm", + "type": "xod/patch-nodes/to-bus", + "position": { + "x": 238, + "y": 610 + }, + "label": "V" + } + }, + "path": "@/main" + }, + "@/var": { + "attachments": [ + { + "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n", + "encoding": "utf-8", + "filename": "patch.cpp" + } + ], + "nodes": { + "BJxPFmJUh7": { + "id": "BJxPFmJUh7", + "position": { + "x": 33, + "y": -1 + }, + "type": "xod/patch-nodes/input-number" + }, + "Bygim1I3Q": { + "id": "Bygim1I3Q", + "position": { + "x": 0, + "y": 102 + }, + "type": "xod/patch-nodes/variadic-1" + }, + "rJPKX1L3m": { + "id": "rJPKX1L3m", + "position": { + "x": -1, + "y": -1 + }, + "type": "xod/patch-nodes/input-number" + }, + "rJq57J837": { + "id": "rJq57J837", + "position": { + "x": 0, + "y": 204 + }, + "type": "xod/patch-nodes/output-number" + } + }, + "path": "@/var" } }, "name": "split-links-to-buses" diff --git a/packages/xod-project/test/fixtures/split-links-to-buses.xodball b/packages/xod-project/test/fixtures/split-links-to-buses.xodball index ff9d2753..fa8822ce 100644 --- a/packages/xod-project/test/fixtures/split-links-to-buses.xodball +++ b/packages/xod-project/test/fixtures/split-links-to-buses.xodball @@ -1,266 +1,40 @@ { + "name": "split-links-to-buses", "patches": { - "@/main": { - "links": { - "ByUg49KS7": { - "id": "ByUg49KS7", - "output": { - "nodeId": "HyVl45tr7", - "pinKey": "S1pR7cKS7" - }, - "input": { - "nodeId": "B1sYQ9tSX", - "pinKey": "rklOQcKB7" - } - }, - "SJwe45FSQ": { - "id": "SJwe45FSQ", - "output": { - "nodeId": "HyVl45tr7", - "pinKey": "S1pR7cKS7" - }, - "input": { - "nodeId": "BylqXqKBm", - "pinKey": "rklOQcKB7" - } - }, - "H1iGEqFHX": { - "id": "H1iGEqFHX", - "output": { - "nodeId": "HyVl45tr7", - "pinKey": "H1kkE5FB7" - }, - "input": { - "nodeId": "rJYzE9tBQ", - "pinKey": "__in__" - } - }, - "B1Jm4qFSm": { - "id": "B1Jm4qFSm", - "output": { - "nodeId": "HyVl45tr7", - "pinKey": "H1kkE5FB7" - }, - "input": { - "nodeId": "B1sYQ9tSX", - "pinKey": "HJvvXcKrm" - } - }, - "rJ-7N9Frm": { - "id": "rJ-7N9Frm", - "output": { - "nodeId": "HyVl45tr7", - "pinKey": "H1kkE5FB7" - }, - "input": { - "nodeId": "BylqXqKBm", - "pinKey": "HJvvXcKrm" - } - }, - "ryhEB5trm": { - "id": "ryhEB5trm", - "output": { - "nodeId": "By87H9KHX", - "pinKey": "SJxvxScFB7" - }, - "input": { - "nodeId": "S1F7rcYBQ", - "pinKey": "rklOQcKB7" - } - }, - "H1TVB5FBm": { - "id": "H1TVB5FBm", - "output": { - "nodeId": "By87H9KHX", - "pinKey": "S1WveB9YHQ" - }, - "input": { - "nodeId": "S1F7rcYBQ", - "pinKey": "HJvvXcKrm" - } - }, - "ry1SBcYBQ": { - "id": "ry1SBcYBQ", - "output": { - "nodeId": "By87H9KHX", - "pinKey": "SJxvxScFB7" - }, - "input": { - "nodeId": "Bygt7rcYrm", - "pinKey": "rklOQcKB7" - } - }, - "BJxHH5FHm": { - "id": "BJxHH5FHm", - "output": { - "nodeId": "By87H9KHX", - "pinKey": "S1WveB9YHQ" - }, - "input": { - "nodeId": "Bygt7rcYrm", - "pinKey": "HJvvXcKrm" - } - }, - "By7IGpKB7": { - "id": "By7IGpKB7", - "output": { - "nodeId": "r1lIz6Kr7", - "pinKey": "__out__" - }, - "input": { - "nodeId": "SyNgzpYr7", - "pinKey": "HJvvXcKrm" - } - } - }, - "nodes": { - "B1sYQ9tSX": { - "id": "B1sYQ9tSX", - "type": "@/foo", - "position": { - "x": 136, - "y": 408 - } - }, - "BylqXqKBm": { - "id": "BylqXqKBm", - "type": "@/foo", - "position": { - "x": 340, - "y": 408 - } - }, - "HyVl45tr7": { - "id": "HyVl45tr7", - "type": "@/bar", - "position": { - "x": 340, - "y": 102 - } - }, - "rJYzE9tBQ": { - "label": "XSTG", - "id": "rJYzE9tBQ", - "type": "xod/patch-nodes/to-bus", - "position": { - "x": 442, - "y": 204 - } - }, - "By87H9KHX": { - "id": "By87H9KHX", - "type": "@/baz", - "position": { - "x": 646, - "y": 102 - } - }, - "S1F7rcYBQ": { - "id": "S1F7rcYBQ", - "type": "@/foo", - "position": { - "x": 578, - "y": 408 - } - }, - "Bygt7rcYrm": { - "id": "Bygt7rcYrm", - "type": "@/foo", - "position": { - "x": 714, - "y": 408 - } - }, - "SyNgzpYr7": { - "id": "SyNgzpYr7", - "type": "@/foo", - "position": { - "x": 918, - "y": 408 - } - }, - "r1lIz6Kr7": { - "id": "r1lIz6Kr7", - "type": "xod/patch-nodes/input-pulse", - "position": { - "x": 918, - "y": 102 - }, - "label": "LBL" - } - }, - "path": "@/main" - }, - "@/foo": { - "attachments": [ - { - "filename": "patch.cpp", - "encoding": "utf-8", - "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n" - } - ], - "nodes": { - "BJGB7cYrX": { - "id": "BJGB7cYrX", - "type": "xod/patch-nodes/not-implemented-in-xod", - "position": { - "x": 0, - "y": 102 - } - }, - "HJvvXcKrm": { - "id": "HJvvXcKrm", - "type": "xod/patch-nodes/input-pulse", - "position": { - "x": 68, - "y": 0 - } - }, - "rklOQcKB7": { - "id": "rklOQcKB7", - "type": "xod/patch-nodes/input-number", - "position": { - "x": 0, - "y": 0 - } - } - }, - "path": "@/foo" - }, "@/bar": { "attachments": [ { - "filename": "patch.cpp", + "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n", "encoding": "utf-8", - "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n" + "filename": "patch.cpp" } ], "nodes": { - "ry2SX9KB7": { - "id": "ry2SX9KB7", - "type": "xod/patch-nodes/not-implemented-in-xod", - "position": { - "x": 0, - "y": 0 - } - }, - "S1pR7cKS7": { - "label": "A", - "id": "S1pR7cKS7", - "type": "xod/patch-nodes/output-number", - "position": { - "x": 0, - "y": 102 - } - }, "H1kkE5FB7": { - "label": "B", "id": "H1kkE5FB7", - "type": "xod/patch-nodes/output-pulse", + "label": "B", "position": { "x": 68, "y": 102 - } + }, + "type": "xod/patch-nodes/output-pulse" + }, + "S1pR7cKS7": { + "id": "S1pR7cKS7", + "label": "A", + "position": { + "x": 0, + "y": 102 + }, + "type": "xod/patch-nodes/output-number" + }, + "ry2SX9KB7": { + "id": "ry2SX9KB7", + "position": { + "x": 0, + "y": 0 + }, + "type": "xod/patch-nodes/not-implemented-in-xod" } }, "path": "@/bar" @@ -268,39 +42,404 @@ "@/baz": { "attachments": [ { - "filename": "patch.cpp", + "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n", "encoding": "utf-8", - "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n" + "filename": "patch.cpp" } ], "nodes": { "HJDxScKr7": { "id": "HJDxScKr7", - "type": "xod/patch-nodes/not-implemented-in-xod", "position": { "x": 0, "y": 0 - } - }, - "SJxvxScFB7": { - "id": "SJxvxScFB7", - "type": "xod/patch-nodes/output-number", - "position": { - "x": -1, - "y": 101 - } + }, + "type": "xod/patch-nodes/not-implemented-in-xod" }, "S1WveB9YHQ": { "id": "S1WveB9YHQ", - "type": "xod/patch-nodes/output-pulse", "position": { "x": 68, "y": 102 - } + }, + "type": "xod/patch-nodes/output-pulse" + }, + "SJxvxScFB7": { + "id": "SJxvxScFB7", + "position": { + "x": -1, + "y": 101 + }, + "type": "xod/patch-nodes/output-number" } }, "path": "@/baz" + }, + "@/foo": { + "attachments": [ + { + "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n", + "encoding": "utf-8", + "filename": "patch.cpp" + } + ], + "nodes": { + "BJGB7cYrX": { + "id": "BJGB7cYrX", + "position": { + "x": 0, + "y": 102 + }, + "type": "xod/patch-nodes/not-implemented-in-xod" + }, + "HJvvXcKrm": { + "id": "HJvvXcKrm", + "position": { + "x": 68, + "y": 0 + }, + "type": "xod/patch-nodes/input-pulse" + }, + "rklOQcKB7": { + "id": "rklOQcKB7", + "position": { + "x": 0, + "y": 0 + }, + "type": "xod/patch-nodes/input-number" + } + }, + "path": "@/foo" + }, + "@/main": { + "links": { + "B1Jm4qFSm": { + "id": "B1Jm4qFSm", + "input": { + "nodeId": "B1sYQ9tSX", + "pinKey": "HJvvXcKrm" + }, + "output": { + "nodeId": "HyVl45tr7", + "pinKey": "H1kkE5FB7" + } + }, + "BJxHH5FHm": { + "id": "BJxHH5FHm", + "input": { + "nodeId": "Bygt7rcYrm", + "pinKey": "HJvvXcKrm" + }, + "output": { + "nodeId": "By87H9KHX", + "pinKey": "S1WveB9YHQ" + } + }, + "By7IGpKB7": { + "id": "By7IGpKB7", + "input": { + "nodeId": "SyNgzpYr7", + "pinKey": "HJvvXcKrm" + }, + "output": { + "nodeId": "r1lIz6Kr7", + "pinKey": "__out__" + } + }, + "ByUg49KS7": { + "id": "ByUg49KS7", + "input": { + "nodeId": "B1sYQ9tSX", + "pinKey": "rklOQcKB7" + }, + "output": { + "nodeId": "HyVl45tr7", + "pinKey": "S1pR7cKS7" + } + }, + "H1SUIkU37": { + "id": "H1SUIkU37", + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$1" + }, + "output": { + "nodeId": "rknBLyIhm", + "pinKey": "__out__" + } + }, + "H1TVB5FBm": { + "id": "H1TVB5FBm", + "input": { + "nodeId": "S1F7rcYBQ", + "pinKey": "HJvvXcKrm" + }, + "output": { + "nodeId": "By87H9KHX", + "pinKey": "S1WveB9YHQ" + } + }, + "H1iGEqFHX": { + "id": "H1iGEqFHX", + "input": { + "nodeId": "rJYzE9tBQ", + "pinKey": "__in__" + }, + "output": { + "nodeId": "HyVl45tr7", + "pinKey": "H1kkE5FB7" + } + }, + "HJIII1UnQ": { + "id": "HJIII1UnQ", + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7" + }, + "output": { + "nodeId": "rknBLyIhm", + "pinKey": "__out__" + } + }, + "HyqI81837": { + "id": "HyqI81837", + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$4" + }, + "output": { + "nodeId": "rknBLyIhm", + "pinKey": "__out__" + } + }, + "S1KIIkL2m": { + "id": "S1KIIkL2m", + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$3" + }, + "output": { + "nodeId": "rknBLyIhm", + "pinKey": "__out__" + } + }, + "SJwe45FSQ": { + "id": "SJwe45FSQ", + "input": { + "nodeId": "BylqXqKBm", + "pinKey": "rklOQcKB7" + }, + "output": { + "nodeId": "HyVl45tr7", + "pinKey": "S1pR7cKS7" + } + }, + "SyZvIyL37": { + "id": "SyZvIyL37", + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "rJPKX1L3m" + }, + "output": { + "nodeId": "rknBLyIhm", + "pinKey": "__out__" + } + }, + "Sy_UU1UhQ": { + "id": "Sy_UU1UhQ", + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$2" + }, + "output": { + "nodeId": "rknBLyIhm", + "pinKey": "__out__" + } + }, + "r1ODIkL37": { + "id": "r1ODIkL37", + "input": { + "nodeId": "H1jQ8JLhX", + "pinKey": "BJxPFmJUh7-$5" + }, + "output": { + "nodeId": "rknBLyIhm", + "pinKey": "__out__" + } + }, + "rJ-7N9Frm": { + "id": "rJ-7N9Frm", + "input": { + "nodeId": "BylqXqKBm", + "pinKey": "HJvvXcKrm" + }, + "output": { + "nodeId": "HyVl45tr7", + "pinKey": "H1kkE5FB7" + } + }, + "ry1SBcYBQ": { + "id": "ry1SBcYBQ", + "input": { + "nodeId": "Bygt7rcYrm", + "pinKey": "rklOQcKB7" + }, + "output": { + "nodeId": "By87H9KHX", + "pinKey": "SJxvxScFB7" + } + }, + "ryhEB5trm": { + "id": "ryhEB5trm", + "input": { + "nodeId": "S1F7rcYBQ", + "pinKey": "rklOQcKB7" + }, + "output": { + "nodeId": "By87H9KHX", + "pinKey": "SJxvxScFB7" + } + } + }, + "nodes": { + "B1sYQ9tSX": { + "id": "B1sYQ9tSX", + "position": { + "x": 136, + "y": 408 + }, + "type": "@/foo" + }, + "By87H9KHX": { + "id": "By87H9KHX", + "position": { + "x": 646, + "y": 102 + }, + "type": "@/baz" + }, + "Bygt7rcYrm": { + "id": "Bygt7rcYrm", + "position": { + "x": 714, + "y": 408 + }, + "type": "@/foo" + }, + "BylqXqKBm": { + "id": "BylqXqKBm", + "position": { + "x": 340, + "y": 408 + }, + "type": "@/foo" + }, + "H1jQ8JLhX": { + "arityLevel": 6, + "id": "H1jQ8JLhX", + "position": { + "x": 136, + "y": 816 + }, + "type": "@/var" + }, + "HyVl45tr7": { + "id": "HyVl45tr7", + "position": { + "x": 340, + "y": 102 + }, + "type": "@/bar" + }, + "S1F7rcYBQ": { + "id": "S1F7rcYBQ", + "position": { + "x": 578, + "y": 408 + }, + "type": "@/foo" + }, + "SyNgzpYr7": { + "id": "SyNgzpYr7", + "position": { + "x": 918, + "y": 408 + }, + "type": "@/foo" + }, + "r1lIz6Kr7": { + "id": "r1lIz6Kr7", + "label": "LBL", + "position": { + "x": 918, + "y": 102 + }, + "type": "xod/patch-nodes/input-pulse" + }, + "rJYzE9tBQ": { + "id": "rJYzE9tBQ", + "label": "XSTG", + "position": { + "x": 442, + "y": 204 + }, + "type": "xod/patch-nodes/to-bus" + }, + "rknBLyIhm": { + "id": "rknBLyIhm", + "label": "V", + "position": { + "x": 238, + "y": 510 + }, + "type": "xod/patch-nodes/input-number" + } + }, + "path": "@/main" + }, + "@/var": { + "attachments": [ + { + "content": "\nstruct State {\n};\n\n{{ GENERATED_CODE }}\n\nvoid evaluate(Context ctx) {\n //auto inValue = getValue(ctx);\n //emitValue(ctx, inValue);\n}\n", + "encoding": "utf-8", + "filename": "patch.cpp" + } + ], + "nodes": { + "BJxPFmJUh7": { + "id": "BJxPFmJUh7", + "position": { + "x": 33, + "y": -1 + }, + "type": "xod/patch-nodes/input-number" + }, + "Bygim1I3Q": { + "id": "Bygim1I3Q", + "position": { + "x": 0, + "y": 102 + }, + "type": "xod/patch-nodes/variadic-1" + }, + "rJPKX1L3m": { + "id": "rJPKX1L3m", + "position": { + "x": -1, + "y": -1 + }, + "type": "xod/patch-nodes/input-number" + }, + "rJq57J837": { + "id": "rJq57J837", + "position": { + "x": 0, + "y": 204 + }, + "type": "xod/patch-nodes/output-number" + } + }, + "path": "@/var" } - }, - "name": "split-links-to-buses" -} \ No newline at end of file + } +}