-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Expose reload_scripts
as reload_open_files
#83267
base: master
Are you sure you want to change the base?
Conversation
Please remove the special characters from the commit message and make it match the title of the PR Also please open a proper proposal as asked on the issue, having a proper proposal where the proper arguments for this feature is important to gauge if this is needed |
@twaritwaikar do you recall if exposing this (i.e. making public) in 3.x was meant to be used in scripting, or was it renamed since it was made public on the c++ side? This was done in #53900 but only for the 3.x side, so the fact that this was not done in 4.x to me implies that it was not intended to be exposed as such Edit: these changes were ported to 4.x in #62157 where this was not exposed |
This is useful (and used) for all plugins that modify any (active) scripts. |
Exposing internal methods, especially in the editor, binds the development to maintain compatibility and stability, so that's why I asked for a proposal to gauge the need and justification for this If it can be worked around, how needed it is, etc. Because exposing a method isn't a trivial thing that comes with possible issues and a burden of maintenance |
2f93ffe
to
3a245a9
Compare
What can I do to make the Linux check pass? |
See the error message, you need to reorder the entries of the documentation, they need to be ge sorted |
Sorry for that unnecessary check, I hope I got it now 😅 |
Don't see a solid reason against exposing this for plugins, but I'm thinking we should start moving away from the So we should bind it as |
467d9ea
to
5e07dcb
Compare
ScriptEditor.reload_scripts()
reload_scripts
as reload_open_files
Thanks, @Paulb23 - I went ahead and changed it to your suggestion. Is there something to do now on the project converter side? |
04d8004
to
7631d87
Compare
I added the function to the rename map, I hope we can get this merged for 4.3 👀 |
e369043
to
2687a6c
Compare
Expose the reload_scripts method to match the current state of the 3.x branch. Bind it as `reload_open_files` in contrast to `reload_scripts` in 3.x to more accurately reflect its function. closes godotengine/godot-proposals#8111 clarifies the description of the method's internals Co-authored-by: Chris Cranford <[email protected]>
2687a6c
to
8c32133
Compare
Expose the
reload_scripts
method to match the current state of the 3.x branch.As described in #83118, it is possible to replicate this method with GDScript:
and set the
text_editor/behavior/files/auto_reload_scripts_on_external_change
setting totrue
.Personally, I would prefer calling
EditorInterface.get_script_editor().reload_scripts()
, but I might not be aware of possible pitfalls caused by exposing this method.This would also improve the porting of existing 3.5 plugins.
closes godotengine/godot-proposals#8111