Be able to have a node (or subcomposition) execute another node (or subcomposition). Some examples where this would be useful…
Provide higher-level nodes that encapsulate bigger tasks, so that you can save time by using these nodes instead of having to build up the same composition structures over and over. For example, a “Slideshow” node could input a list of images and a list of nodes that transition between images.
Another higher-level node, suggested by @ajm, is a “Filter” node that could input a list of data and a node that outputs a boolean (yes/no) to decide if each data item should be passed through to the output list or filtered out.
Select between different nodes to execute, such as different image filters. You can do this currently with the Select
nodes, but it can be clumsy to build a composition that does it optimally (only executing the currently selected node).
“For Each” node (or “Map” node, mentioned by @ajm) — Do something with each item in a list. A different way (perhaps more convenient in some cases) to accomplish the same thing as Iteration: Turn most nodes into iterators by allowing single-value ports to accept lists.
Implementation:
- Add a special output port to some/all nodes — “function port”.
- Enable a node to have an input port that can be connected with a cable to another node’s function port.
- Enable a node or subcomposition to execute a node passed in through a function port.
To be determined:
- Will all nodes have function ports, or only certain ones (such as stateless nodes)?
- Many design and UI issues.