Execute simple script from input and watch output.
This is likely the best way to quickly experiment with GDScript, without having to create a new scene, avoid cluttering your project with temporary files.
Just paste the simplest snippet to Console Input gui , and press run (or ctrl+enter).
Please focus on the key point: being able to quickly run user-defined scripts in the editor is valuable in itself. Stop nitpicking.
Now, this plugin supports loading multiple user script files located at res://addons/console_input/userscripts/*snippets.gd.
This plugin will load those scripts and extract qualified methods to the dynamic popup menu.
Some Tools Preset:
- Scroll scene tree to top or bottom
- Scroll inspector panel to top or bottom
- Toggle node disabled or enabled
- Batch move selected nodes gui ( a xyz dialog )
- You can open snippet source file with one click !
It’s a customizable dynamic menu !
You can run standard gdscript methods now, not just through the simple eval .
the dialog is just a panel added to editor.get_base_control()
snippets tutorial : Godot-Editor-Console/addons/console_input/userscripts/user_snippets.gd at master · KnIfER/Godot-Editor-Console · GitHub
with those two parameters you can craft your own methods :
- editor:EditorInterface
- plugin:EditorPlugin
And below is just some of my personal cheatsheet, u don’t have to use :
(toggle) disable selected node :
kn()
batch move selected nodes by 500u along the z axis:
for node in sns():
node.position.z += 500
print position of selected node:
=sn().position
copy position to clipboard:
FU.setTmpText(sn().position)
put a big arrow in the scene:
DDD.vvv(Vector3(0, 0, 0), Vector3(0, 1, 0), 1)

