Previously it was only possible to create custom script templates per
editor instance which could lead to certain name collisions, but now one
can create such templates per project tailored for specific use cases.
The default path to search for custom script templates is defined in
project settings via `editor/script_templates_search_path` setting as
`res://script_templates` path, yet this can be configured per project.
Templates have at most two origins now:
1. Project-specific, defined in `ProjectSettings`, for instance:
- res://script_templates/
2. Editor script templates, for instance:
- %APPDATA%/Godot/script_templates/
As script templates can have the same name over different paths,
the override mechanism was also added, enabling project-specific
templates over the editor ones.
- Correctly validate parent/class names
- Trigger parent validation when selecting from buttons
- Fix enabling/disabling parent buttons
- Clear class name if not supported
- Minor cleanup
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
- Make ScriptCreateDialog disable the built-in script checked button if the language does not support it.
- ScriptLanguage's get_template and make_template now receive the script path as class name if the the script language does not have named classes.
Templates will be loaded from .godot/script_templates
For now they're disabled for GDNative.
Ideas for further improvements:
- Add a "Save as Template" option to the script editor, as it can normally only save to res://
- Support more placeholders / custom placeholders
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.
2017-03-05 14:21:25 +01:00
Renamed from tools/editor/script_create_dialog.h (Browse further)