Commit graph

78 commits

Author SHA1 Message Date
Andrii Doroshenko (Xrayez) 69d5de632e Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-27 14:28:34 +03: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 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
Rémi Verschelde fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde 0a2fa4d892 Fix more -Wmaybe-uninitialized warnings with target=release_debug
I have no idea why those don't get triggered in target=debug builds.

Fixes #37461.
2020-03-31 13:52:42 +02:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -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
Juan Linietsky 8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Rémi Verschelde f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +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
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
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Juan Linietsky e1b3444415 Bugfixes and ability to better specify filter and repeat modes everywhere.
Removes antialiased flag for draw_* methods.
2020-02-11 11:53:28 +01:00
Juan Linietsky 3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Haoyu Qiu b420618c46 Fixes scrollbar positions on HiDPI display
* TextureRegion editor
* Ploygon2D UV editor
2020-01-23 08:55:52 +08:00
Michael Alexsander 34bf81fa7c Cleanup unnecessary code from before the scrollbar overlapping fixes 2020-01-14 18:19:12 -03:00
Michael Alexsander e69593842e Fix more scrollbar anchorings 2020-01-14 08:25:55 -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
Hugo Locurcio 980e962bb8
Increase the TileSet and polygon UV editor zoom limits to 16×
This also changes the TileSet editor's minimum zoom to match
other 2D editors.

This closes #34346.
2019-12-14 20:49:43 +01:00
Hugo Locurcio 558e93f069
Improve the appearance of 2D path editors
- Add new handle icons for path/polygon editors
- Add smooth path point icons and curve tangent icons
- Use a gray color for tangent lines in the Path2D and Path editors
- Use antialiasing for Path2D lines
2019-08-18 22:27:01 +02:00
Hugo Locurcio 5c0ee4a790
Improve line drawing in the 2D editor
- Use antialiasing (only visible when using the GLES3 renderer)
- Scale line widths on hiDPI displays

This also removes some debugging prints.
2019-07-11 16:05:09 +02:00
Guilherme Felipe f662f1505e Fix scroll for texture_region and polygon_2d editor 2019-04-25 10:51:27 -03:00
Rémi Verschelde c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Michael Alexsander Silva Dias 8bef68fe6f Better and non-buggy Polygon2D editing disabling 2019-02-16 16:46:09 -02:00
Michael Alexsander Silva Dias aca756fce8 Revert "Disallow polygon2D editing if internal vertices exists, as suggested in #24853"
This reverts commit 419fb45a3e.
2019-02-16 16:43:51 -02:00
Juan Linietsky 419fb45a3e Disallow polygon2D editing if internal vertices exists, as suggested in #24853 2019-02-13 13:11:39 -03:00
Juan Linietsky 7f69da488e Change some editing display options to make it clearer, as requested in #24853 2019-02-13 11:42:05 -03:00
Juan Linietsky 96445cd90e Clear internal vertex counter when redrawing polygons, closes #24862. 2019-01-15 15:43:55 -03:00
Rémi Verschelde 0222841357 i18n: Sync translation template with current source 2019-01-14 16:42:58 +01:00
Michael Alexsander Silva Dias 7cef10a503 Fix UndoRedo operations for the new features in the Polygon2D UV Editor 2019-01-10 22:20:06 -02:00
Juan Linietsky e46f28e02d Removed splits in Polygon editor, replace by internal vertices and polygon support. 2019-01-08 19:11:08 -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
Rémi Verschelde 28b10ea668 Fix sometimes uninitialized variable warning raised by Xcode 9.4.1
Fixes this warning raised by Travis CI on macOS:
```
editor/plugins/polygon_2d_editor_plugin.cpp:95:6: warning: variable 'skeleton' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (!node->has_node(node->get_skeleton())) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
editor/plugins/polygon_2d_editor_plugin.cpp:106:7: note: uninitialized use occurs here
        if (!skeleton) {
             ^~~~~~~~
editor/plugins/polygon_2d_editor_plugin.cpp:95:2: note: remove the 'if' if its condition is always false
        if (!node->has_node(node->get_skeleton())) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
editor/plugins/polygon_2d_editor_plugin.cpp:94:22: note: initialize the variable 'skeleton' to silence this warning
        Skeleton2D *skeleton;
                            ^
                             = NULL
```
2018-12-17 12:28:11 +01:00
Michael Alexsander Silva Dias e4d0ecce7a General enhancements to the Polygon2D, TextureRegion, and TileSet editors 2018-12-06 03:29:27 -02:00
Juan Linietsky cdafb7bce2 Properly show 2D bone previews in 2D skeleton UV editor, fixes #20950 2018-11-22 22:23:19 -03:00
Rémi Verschelde 7b081a7fc8 Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form:

core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch]
core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch]

Those can be trivial cases where adding a default fallback is the solution,
or more complex issues/hidden bugs where missed values are actually meant
to be handled.
2018-09-27 18:34:30 +02:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
volzhs 4ea8c6b1e1 Fix unable to remove split on Polygon 2D editor after restarting editor 2018-05-27 22:32:58 +09:00
Juan Linietsky 4b5227ff77 -Ability to open resources in the same window
-Plenty of fixes and improvements to new inspector
-Fixes that were needed to make inspector work better
2018-05-17 18:03:05 -03:00
Juan Linietsky 3bd0ca2a2d Skeletal deform working 2018-05-04 11:54:21 -03:00
Juan Linietsky b3e4bc562c Skeleton for 2D WIP 2018-05-03 17:29:56 -03:00
Juan Linietsky 4c3c510a80 WIP Polygon2D weight editing 2018-05-02 11:01:12 -03:00
Juan Linietsky 125fc8cc44 Add a split editor to polygon 2D UV editor, moving an inch closer to adding support for in the future 2018-02-25 12:07:13 -03:00
Juan Linietsky 92ece2e727 Ability to edit Polygon2D shape from within the UV editor, this will eventually make it possible to in the future. 2018-02-22 17:40:54 -03:00