Skip to content

GDScript: Allow export nodes to be dropped in with ALT key #106080

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cruglet
Copy link
Contributor

@cruglet cruglet commented May 4, 2025

Resolves proposal #11897.

This allows for the ALT or OPTION (macOS) key to be used as a way to drop @export variables automatically into the GDScript editor. CTRL takes precedence, so having both ALT and CTRL pressed will create an @onready variable.

A possible extension of this implementation would be to automatically assign the corresponding node property to all nodes who share the same script in the current scene through the _find_all_node_for_script method. However, a large issue is that you would have to wait for the property_list_changed signal before actually applying anything, having to connect & disconnect independently for each node. In addition, I also found that setting the properties manually would not actually apply the changes properly, as saving the script/scene would reset these variables back to null. (Some advice as to how this could be implemented would be greatly appreciated 🙏)

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.

2 participants