-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Fix VisualScriptEditor after namespaces #52023
Conversation
Posted in the visual script discord for review. |
Can confirm these operations work:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked basic operations.
I wonder if the proxy name suffix is the standard pattern in godot. Not a blocker issue.
Solves the issues posted.
It could probably be named The fix would be the same though, as long as they have different names, not the same, everything should work again like before the change. Thanks for the review and passing it on! |
9c29d8a
to
f92c5f2
Compare
f92c5f2
to
bd7831d
Compare
Naming the class to be exactly what it does sounds like a good idea. |
Need to fix the docs for this. |
|
a530d43
to
5da2697
Compare
Renamed to |
5da2697
to
c314203
Compare
Renamed the singleton variable. Eventually, we should consider renaming the exposed singleton from |
I do not understand why there is a new reference to VisualScriptEditor! So after some figuring out, I think I understand.
I'm sorry if I am missing something here. PS: I think the name 'VisualScriptCustomNodes' is misleading as you want to reference the editor not a list of nodes or a specific script. |
Don't be sorry, its confusing. Previously, there was the We got rid of all underscores in class names, because in all other cases, the underscored classes were just proxy classes (e.g. In this case, however, this doesn't work: if we get rid of the underscore, there are now two With this change, the proper This all is highly confusing, I don't particularly like the implementation of these two classes, and IMO we should see about refactoring this. But in the end, for users nothing changes with this - |
So why have VisualScriptCustomNodes at all? |
I agree and it seems like it, thats outside the scope of this fix however. We should see about moving it into VisualScriptEditor proper (although there may be valid reasons its not part of that) or have a general |
Merging this now so the Visual Script Editor works again in |
New iteration on a fix for the VisualScript editor after the move to namespaces.
As both
VisualScriptEditor
classes need to be exposed to GDScript, this renames the small one toVisualScriptCustomNodes
, but it still is bound as theVisualScriptEditor
singleton like it previously was. This seems to fix the issues.The
vs_bind
namespace is removed, as its then no longer needed.As added in the code comment previously, we may want to refactor these two classes, but still is a fix until then.
Properly fixes #51894, after #51627 broke it
Also reverts #51916, as both classes need to be exposed