Skip to content

Add example of using get_connection_list_from_node #108056

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

Merged

Conversation

JekSun97
Copy link
Contributor

Adds a useful example to the documentation for getting all connections to a specific port in GraphEdit.
Initially, the get_connection_list_from_node function was planned as a method that should get a list of connections to a specific port, but due to the generalization of this method for wider use, it is not easy for beginners to understand how to do this, which is what I encountered and godot-proposals/issues/12207

@JekSun97 JekSun97 requested a review from a team as a code owner June 27, 2025 21:43
@JekSun97 JekSun97 changed the title Add example of using get_connection_list_from_node Add example of using get_connection_list_from_node Jun 27, 2025
@JekSun97 JekSun97 force-pushed the get_connection_list_from_node_doc branch 2 times, most recently from a6e45f4 to b44bd26 Compare June 27, 2025 22:25
@JekSun97 JekSun97 force-pushed the get_connection_list_from_node_doc branch from b44bd26 to ab3df22 Compare June 28, 2025 10:35
Copy link
Member

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is assuming the example itself is correct.
One weird thing is where the example is located. It can't really belong anywhere else except this description because get_connection_list_from_node is required, but this method is really just used as an intermediary to create a method that doesn't exist in GraphEdit's API.

@@ -223,6 +223,25 @@
keep_alive: bool
}
[/codeblock]
[b]Example:[/b] Get all connections on a specific port:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? Due of how out-of-place it feels.

Suggested change
[b]Example:[/b] Get all connections on a specific port:
This method can also be used to get all connections on a specific port:

Copy link
Contributor Author

@JekSun97 JekSun97 Jun 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an auxiliary example that describes one of the ways to use the method, but at the same time it is a solution for many GraphEdit users on how to implement the search for the desired connection.
I think simply indicating that this is an example is enough.

@JekSun97 JekSun97 force-pushed the get_connection_list_from_node_doc branch from ab3df22 to 8f51c22 Compare June 28, 2025 19:38
@JekSun97
Copy link
Contributor Author

PR is essentially ready

@Mickeon
Copy link
Member

Mickeon commented Jun 29, 2025

All in due time. It's a fine Sunday today.

@Repiteo Repiteo merged commit db31324 into godotengine:master Jul 1, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jul 1, 2025

Thanks!

@JekSun97 JekSun97 deleted the get_connection_list_from_node_doc branch July 2, 2025 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants