Commit graph

50 commits

Author SHA1 Message Date
Paul Joannon b7a6946790 check the params section exist before erasing it in import_dock
related #38864
2020-05-20 01:04:21 +02:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Michael Alexsander 6d6af0ea06 Fix changing the import type of multiple files at once 2020-04-05 15:13:29 -03:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Michael Alexsander d35386263f Fix import changing disabling checking on multiple files 2020-02-28 00:03:55 -03:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Rémi Verschelde c40bd6b775 i18n: Sync translations with Weblate
(cherry picked from commit 1c9132540f)
2020-02-19 10:16:45 +01:00
Michael Alexsander bdd4d28081 Fix multiple issues with the "Import" dock 2020-02-13 23:08:05 -03:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Haoyu Qiu 078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Rémi Verschelde ab3bccdb78 Fix typos with codespell
Using codespell 1.16.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-11-22 08:35:03 +01:00
Michael Alexsander Silva Dias 5f3a55acb7 Add informational messages to various editors 2019-09-04 12:37:11 -03:00
JohnJLight 38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Juan Linietsky 04847ef5f9 Added ability for multiple images to be imported as an atlas
This adds support for groups in the import system, which point to a single file.
Add property hint for saving files in file field
2019-04-19 15:56:34 -03:00
Rémi Verschelde 5fc86026ca Fix typos with codespell
Using codespell 1.14.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-02-13 09:23:29 +01:00
Juan Linietsky b3335e943b Implement missing autorestart in oneshot node, closes #22238 2019-01-25 18:15:29 -03:00
Juan Linietsky b0758b2d73 Stop preview generator before reimporting resources with different type. 2019-01-25 17:27:50 -03:00
Juan Linietsky 5bd3f72878 Properly warn about the effects of changing an import type, as well as force editor restart. Fixes #23874 2019-01-25 17:23:56 -03:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Juan Linietsky ad22ef28a9 Improve import dock usability when selecting multiple files, only change what was modified on re-import. 2018-10-30 13:12:21 -03:00
Rémi Verschelde e7c5aca040 Port ImportDock and ProjectExport to new property editor (2nd try)
Thanks to @ibrahn for helping debug the crashes caused in ProjectExportDialog
by the stray `update_tree()` call, no longer needed in the new inspector.
2018-08-20 10:07:06 +02:00
Rémi Verschelde b3246f13d1
Revert "Port ImportDock and ProjectExport to new property editor" 2018-08-18 15:24:31 +02:00
Rémi Verschelde 0a3d874efd Port ImportDock and ProjectExport to new property editor 2018-08-18 15:07:23 +02:00
volzhs 12fb5f58d9 Make filename clipped on Import dock 2018-05-22 16:56:16 +09:00
Hugo Locurcio 1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +02:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
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.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Michael Alexsander Silva Dias 8987f932d6 Fix not being able to select an editor layout created in another language. 2017-11-26 13:27:48 -02:00
George Marques 4c77f48067
Refresh import options when changing importer 2017-11-13 17:31:00 -02:00
Webster Sheets 21b3d62237 Allow changing importers in the import dock.
Still needs a major refactor to allow editing the properties of the
new importer without having to reimport and re-select the items again.
2017-11-10 15:53:01 -05:00
Peter Todorov 73f27632f6 Fix for disappearing import panel contents (#11451) 2017-11-10 12:16:58 +02:00
Juan Linietsky 3d87b70f7a Added the set/get_setting function in Editor/Project settings. Renamed has() to has_setting. Fixes #11844 2017-10-05 15:34:34 -03:00
Rémi Verschelde 4536c608f2 Merge pull request #10821 from rtroncoso/fix-import-defaults
Fix import dock "Set as default" actions
2017-09-01 08:14:28 +02:00
Rodrigo Troncoso 00a3ef44da Fix import dock defaults: Set as default actions 2017-08-31 11:59:59 -03:00
toger5 85cc4e823e fixed update import label in importer dock 2017-08-31 16:58:43 +02:00
Rémi Verschelde b7f4dcbdd1 Merge pull request #10096 from toger5/label_stylebox
fixed Import LineEdit to label + label stylebox
2017-08-31 13:58:52 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
toger5 9fdc4874b2 fixed Import LineEdit to label + label stylebox
- added a normal stylebox to label. default is StyleBoxEmpty
 - changed drawing so that it draws correct with styleboxes with margins
 - changed the LineEdit in the import to use a label with the lineEdit
   stylebox
2017-08-17 00:15:11 +02:00
Juan Linietsky 66009706c9 -Ability to set default import presets for type
-More presets for scene importer
-Option in scene importer to export root nodes as separate scenes
-Fixed MeshInstance preview
2017-07-23 18:50:25 -03:00
Poommetee Ketson a572eb6453 Suppress get_edited_scene_root error 2017-07-23 22:11:34 +07:00
Juan Linietsky bbada82f80 -Reorganized all properties of project settings (Sorry, Again).
(Lot's of bloat accumulated, so it was time for clean up.)
-Made EditorSettings and ProjectSettings search more useful (search in sections too)
2017-07-17 22:18:58 -03:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
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
2017-03-05 16:44:50 +01:00
Rémi Verschelde e1c1d7d1d7 Add a bunch of missing Godot headers in own files 2017-03-05 15:47:28 +01:00
Rémi Verschelde 49c065d29c Refactoring: rename tools/editor/ to editor/
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/import_dock.cpp (Browse further)