willnationsdev / log

A log of my ongoing and planned development efforts.
MIT License
0 stars 0 forks source link

GodotConsole: An interactive console for scripting Godot Editor Behaviors #23

Open willnationsdev opened 5 years ago

willnationsdev commented 5 years ago

This Issue is about adding a full-on integrated console to the Godot Editor, as a built-in feature (ideally).

There is an existing "godot editor scripting" system based on the EditorScript class; however, this system is deeply flawed. The scripts themselves are relatively difficult to execute (you have to have the script actively open in the ScriptEditor and then you have to press a key combination or menu selection to trigger the "execute" functionality. This also means that you can't run it while your code has another script file open (yikes!). In addition, the scripts don't have any way of accepting parameters (drastically decreasing their utility) and therefore, no way of chaining together subsequent commands (again, decreasing its capabilities).

This could all be fixed by creating a dedicated console REPL editor in the bottom panel of the Godot Editor and allowing users to define execution methods that can accept an arbitrary list of parameters (probably presented as a PoolStringArray). This stands to make interacting with Godot projects MUCH more effective as making a bash-like interface that is also aware of the editor's context would be extremely powerful. We'd probably need to be able to dock and undock something like this from the bottom panel, so that one can also add scripted functionality for manipulating other elements in the bottom panel (like the Animation editor, etc.).