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

Support dropping nodes in the middle of existing links #14

Open
jansol opened this issue Jan 9, 2022 · 1 comment
Open

Support dropping nodes in the middle of existing links #14

jansol opened this issue Jan 9, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@jansol
Copy link
Contributor

jansol commented Jan 9, 2022

Another feature from Blender's node editor that would be neat to have.

When dragging a node and dropping it on top of an existing link, the Blender node editor tries to insert that node between the two endpoints of that link. This should be fairly usable for stuff like building effect chains.

Say you have a graph: A-->B where A has a mono output or monitor and B has a mono input. Now dragging a node with a mono input and output in top of that link would make it easy to disconnect the link and create links A-->C-->B using the matching port names. This can be extended to stereo, 5.1, 7.1 etc as long as the port name suffixes match.

AUXn ports could be considered to match named ones with a simple heuristic like, if there is only one link whatever AUXn is involved matches MONO, if there are two then the one with the lower AUXn number matches FL and the higher one FR, if there are more they match the named ports for 5.1, 7.1 etc in a fixed order starting from the first AUXn index of the existing links between the A and B.

Ports marked as UNK are more complicated, not sure what can be done about those. Is there a port number regardless of names in the pipewire API? Those could be used in this case.

Worst case (i.e. when it's not possible to infer the right ports) could be something like flash the dragged node and the link in question and then not doing anything.

Not sure if/how much modding this requires in egui-nodes. The heuristic for choosing the relevant ports should classify as "good first issue" so the difficulty is going to depend largely on how to do it in egui-nodes.

@jansol
Copy link
Contributor Author

jansol commented Jan 9, 2022

This would be particularly relevant for building effect chains, like in the screenshot in the readme.

@Ax9D Ax9D added the enhancement New feature or request label Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants