-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Refactor GraphEdit connections #40513
Conversation
d0a34ca
to
4585c68
Compare
I wanted to do it soo badly. Once it's done I will see if I can find time to add these features to VisualScript and VisualShader Editor. Will review it once I have some free time. I have like 2 questions,
Also you can do, "get_connection_spline" instead more technically accurate I think. |
No problem.
Like the old system, there should not be any changes. It still uses
It is inconsistent with the old look: Tell me if that's fine, or if it should be made to look more like the old line.
It's only a spline if you use a Curve2D (the default), but you can add any line, as shown in the examples. |
Needs a rebase on current |
I mean splines can be linear as well, spline represents a set of line segments between the two adjacent data points Aside: If I am wrong pls correct me. :3 |
4585c68
to
3539150
Compare
…rve insteadallow retrieving the points of a connection lineallow custom connections lines
3539150
to
b48ca93
Compare
Done. |
I and @swarnimarun will review on a spare moment. |
RenderingServerCanvas::canvas_item_add_polyline has not implemented width. I'll have to circle back to that. |
I'm hesitant to work on it because I can't test the master branch, and there are some graphical inconsistencies I would need to look into. So closing this, but it's pretty salvageable if anyone would like to pick it up. If I ever get a PC that supports Vulkan I'll rebase and test it. |
There was code to draw bezier curves in graph_edit.cpp, which I removed to use Curve2D instead.
This PR makes it possible to retrieve the points of a connection line between two given points, and to customize how connections are drawn:
Examples of custom connections
When
_get_connection_line
isn't overriden:By adding a way to access the connection line, it makes it possible to implement interaction, like putting nodes in between or adding reroute nodes:
Gist:
https://gist.github.com/Jummit/545d193b9f5119a428862abfefe4be53
Issues to fix:
Example
Example
Slide Comparison: https://imgsli.com/MTkyOTc