Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macros #46

Open
liamhuber opened this issue Sep 8, 2022 · 1 comment
Open

Macros #46

liamhuber opened this issue Sep 8, 2022 · 1 comment
Assignees
Labels
feature request request partner of "enhancement"

Comments

@liamhuber
Copy link
Member

Be able to collapse multiple nodes into a macro node. After being collapsed only IO that is not sourced from/channeled to another node inside the macro should be exposed, e.g. with labels like subnode_name_1.input_name_4; subnode_name_3.input_name_0. It would also be great to then be able to generate the underlying node code from the macro, so that it can be saved to a module file, imported, registered, and used in other graphs later.

The main ryven author, Leon Thomm, has considered and rejected macros, at least for now. Personally, I think they're important/cool enough that we should push on them anyhow and one of ryven's comeptitors, PyGraph, does include support for 'subgraphs' -- i.e. macros, so I believe it is a soluble problem. I appreciate in particular, however, Leon Thomm's open question about how one should handle data vs exec flows.

@liamhuber liamhuber added the feature request request partner of "enhancement" label Sep 8, 2022
@liamhuber liamhuber self-assigned this Sep 8, 2022
@liamhuber
Copy link
Member Author

One way we could get pseudo-macros quite easily is to introduce a new passing node that takes a script, node, and output value as input, and gives that output value as output. The script/node/output could probably even be automatically and sequentially populated with dropdown menus quite easily.

This is not a true macro as it would still require the user to force the different scripts to run, and would only work sequentially, but it does allow for using different tabs to focus on getting particular results, and then aggregating/using these results elsewhere at a more abstracted level.

Might be useful as a stopgap until we have real macros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request request partner of "enhancement"
Projects
None yet
Development

No branches or pull requests

1 participant