VisualScriptEditor and VisualScriptCustomNodes after namespaces
Describe the project you are working on
General VisualScript Improvements
Describe the problem or limitation you are having in your project
After https://github.com/godotengine/godot/pull/52023 There now are 2 singletons for accessing VisualScriptEditor.
I think the name 'VisualScriptCustomNodes' is misleading as you want to reference the editor not a list of nodes or a specific script.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Remove Class VisualScriptCustomNodes
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Move the exposed add_custom_node function to VisualScriptEditor. Move the exposed remove_custom_node function to VisualScriptEditor. Move the private add_custom_node function to VisualScriptEditor. Remove VisualScriptEditor Keep VisualScriptEditor singleton exposed
If this enhancement will not be used often, can it be worked around with a few lines of script?
Enhancement for clarity and ease of maintenance.
Is there a reason why this should be core and not an add-on in the asset library?
Class VisualScriptCustomNodes is cleaning up the core excess
CC: @mhilbrunner
Just to clarify:
After godotengine/godot#52023 There now are 2 singletons for accessing VisualScriptEditor.
No, there is the VisualScriptEditor singleton, just as before that bunch of PRs. Its type (class) changed from _VisualScriptEditor to VisualScriptCustomNodes, because it just allows to manage custom nodes, and has as such nothing to do with an editor.
However, even before those PRs, there were those two classes: VisualScriptEditor and _VisualScriptEditor. Both were bound and exposed, the latter as a singleton.
The latter is now called VisualScriptEditorCustomNodes, but as it has only a few methods, the question is indeed whether both classes are necessary of if they could be merged.