-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[WIP/Demo] GraphEdit/GraphNode refactor #61414
Conversation
5c8574e
to
df6f66b
Compare
e7b5bbb
to
dbda38c
Compare
dbda38c
to
cedf567
Compare
Do you have any ideas where one would integrate sub grouping into this refactor? I'm currently using the terms from https://membraneframework.org/guide/v0.7/bins.html#content, but the terms needs to be translated to graph edit style. I honestly believe that subgraph needs to be fully integrated and not defined separately. |
@fire Do you mean node groups like they are present in Blender? That could be implemented with a special GraphNodeGroup (inherited from GraphNode, since it needs inputs/outputs) node which holds a tree of graph nodes (of type GraphNodeBase). GraphEdit then needs to be modified to be able to switch to different "view roots", meaning you can set the view to a given GraphNodeGroup. Or you could just use another GraphEdit to display the subgraph. |
Did you run |
Here's a graphic drawn in nomnoml.
|
To make it easier to review I recommend breaking up the features:
Feel free to take this as a suggestion. You can divide it other ways. |
The idea is to split this up when the general direction is approved. |
These enhancements seems split-able.
I want to separate the GraphNode split-up from the rest of these enhancements to keep the review light. |
Yes, that's what I meant, those you listed would each go in their own PR :) I think I will do 1-3 first, then the GraphNode split-up and after that the titlebar rework (since the implementation depends on whether the split-up is merged). |
This is great! I have an idea for a project that would use GraphEdit, so any improvements to it are very much appreciated :) About the potential titlebar rework, I have a few suggestions:
|
Two other prs were merged from the list. Yay! |
1-3 is done. Is it time for the GraphNode split-up? |
I think I will do the comment node sorting/connection layering next, but I am not sure yet since there were some issues with my approach which I have to fix first. |
Superseded by #67152. |
The main goal of this PR is to provide a discussion ground for some essential changes to improve the usability of GraphNode/GraphEdit for 4.0 which may break compatibility; hence it is marked as a draft. I know this PR is quite big, but it contains some interdependent changes, which I had to test together. It can be seen as a proof-of-concept PR to demonstrate some features as a whole (the code is a bit messy and there are still some bugs present). Any suggestions regarding design, structure or features are welcome.
There are still some things I have planned, primarily a customizable titlebar or at least a dedicated titlebar stylebox, but for now I just wanted to get this out and wait for feedback regarding the general direction/implementation.
Although some changes depend on each other we can still decide what could be split into separate PRs.
Detailed changes:
is_comment()
-branching/ cleans up theme constants)Fix comment node moving nodes outside of its bounding box at different zoom levelsImplemented in Fix enclosed GraphNodes calculation of GraphEdit comment nodes #61629
Improve connection bezier curve generation (small distances) [similar to 3.x behavior with some tweaks]Implemented in Improve Graphedit connection lines #61541
Improve node connection hot zones (approach similar to AutomaticImplemented in Improve and fix port hotzones of GraphNode #61515GraphEdit
node connection hot zone height 2 #49722)