Commit graph

441 commits

Author SHA1 Message Date
Rémi Verschelde 49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
lawnjelly b5edbe0301 Fix BVH physics project setting
Move the GLOBAL_DEF for the `godot_physics/use_bvh` to occur before GLOBAL_GET.

This prevents a warning occurring and the selection not being used.
2021-01-13 09:22:17 +00:00
Rémi Verschelde d6fecf7686
Main: Create user data dir in setup()
Custom backport of #39563 with preliminary change to make
`OS::ensure_user_data_dir()` public as done in f8a79a9.

Fixes #32488.
2021-01-08 10:24:48 +01:00
Rémi Verschelde 66bfe855a8
Revert "Add a project setting to enable stdout flushing in release builds"
This reverts commit 341b9cf15a.

This makes the logger crash when used during cleanup: #44850.
2021-01-05 21:33:33 +01:00
Rémi Verschelde 3032b38b52
Merge pull request #44690 from lawnjelly/transform_snap2
[3.2] Improve 2d snapping
2021-01-05 17:19:44 +01:00
Hugo Locurcio 42053bdb66
Fix warning spam when using --help or --version command line argument
When a project setting is not found, a warning message is printed.
This moves the default value declaration so it can be found when
the `--help` or `--version` command line arguments are used.

(cherry picked from commit 5cd37de125)
2020-12-30 09:33:54 +01:00
Hugo Locurcio f5f04a10f5
Add a project setting to enable stdout flushing in release builds
This can be used in server builds for journalctl compatibility.

(cherry picked from commit 341b9cf15a)
2020-12-29 16:02:00 +01:00
lawnjelly a237c671bb Improve 2d snapping
Partially revert change allowing sprite get_rect snapping to be controlled by `pixel_snap` again rather than `transform_snap` (to prevent breaking compatibility). Adds a final `use_camera_snap` project setting to allow snapping viewports as in reduz original PR.
2020-12-25 18:53:00 +00:00
Rémi Verschelde afbca1216e
Revert "Don't open editor window when using --export, --doctool, or --gdnative-generate-json-api"
This reverts commit 27393de36e.

Fixes #44403.
2020-12-16 15:02:10 +01:00
Rémi Verschelde 36662f3b4d
Don't force GLES2 in Project Manager, causes issues on macOS.
This partially reverts #44041.

Also fix the bogus label about lack of GLES3 support being always shown...
It was meant to be behind a check but I had left it out while testing, and
forgot to put it back.
2020-12-11 22:32:41 +01:00
Rémi Verschelde 0c7a9bd283
doc: Sync classref with current source
And fix broken doctool after #43948.
2020-12-10 14:22:31 +01:00
Rémi Verschelde e8fb0c3230
Merge pull request #43948 from name-here/no-window-on-export-3.2
Don't open editor window when using --export or --doctool
2020-12-09 11:21:55 +01:00
Rémi Verschelde 8b1ee204cf
Use GLES2 by default in the project manager
This only applies to the project manager instance, what driver is used is otherwise
still defined by the project settings for a running game/editor.

Should help users who have issues with buggy GLES3 drivers to still use the project
manager to create and edit GLES2 projects.
2020-12-02 18:15:54 +01:00
Andrii Doroshenko (Xrayez) c663b3d5f8
Fix doctool misleading error message
(cherry picked from commit b0e8177306)
2020-12-01 09:00:54 +01:00
name-here 27393de36e Don't open editor window when using --export, --doctool, or --gdnative-generate-json-api 2020-11-29 16:53:38 -05:00
Fabio Alessandrelli f32c878ef7
Fix CLI export when export_path is in preset.
Export presets contains the export_path option, to specify the default
export location, but the CLI export option disregarded that, and always
required and export path to be specified.
After this commit, if the export path is not specified in the command,
the one in the preset will be used, erroring only if it's not present or
invalid.

(cherry picked from commit 032a1c5dc3)
2020-11-17 22:23:09 +01:00
Rémi Verschelde 4d667dadb9
Merge pull request #43554 from lawnjelly/refactor_pixel_snap
Add 2d snap transforms option
2020-11-16 18:24:10 +01:00
Rémi Verschelde fc5b106369
Merge pull request #42168 from madmiraal/fix-42108-3.2
[3.2]  Remove the unnecessary sync() and the restrictions it imposes on 3D Physics.
2020-11-16 09:33:17 +01:00
lawnjelly a79293e0fc Add 2d snap transforms option
This is a cut back backport of reduz snapping PR #43194.

It just offers a global project setting for transform snapping.
2020-11-15 09:40:07 +00:00
Hugo Locurcio b7a3df473d
Allow using SVG images as project icon
Since exporters will save their own icon, the target platforms
don't have to support SVG to display the icon correctly.

This closes #23068.

(cherry picked from commit 0f9432f060)
2020-11-11 15:30:57 +01:00
Pedro J. Estébanez 3ec62c82a3 Implement no-window mode for X11 and MacOS
Bonus: Homogeinize and improve OS::alert() for no-window mode
2020-11-09 20:56:12 +01:00
Rémi Verschelde 9da889ff29
Merge pull request #40555 from RandomShaper/fix_debugger_autofocus_3.2
Fix debugger not getting focused on break on Windows (3.2)
2020-10-01 13:54:38 +02:00
Sergey Minakov 42de81e235 iOS: move touch delay to settings 2020-10-01 12:36:57 +03:00
Fabio Alessandrelli 6dffc1ef46
Ignore thread models when compiling with NO_THREAD
The thread model option for physics (2D) and rendering (single-unsafe,
single-safe, multithread), was causing crashes/locks when set as
multithreaded and exported for a platform that does not support threads
(namely HTML5).

This commit ensures that when threads support is not available, that
option is ignored, and the equivalent of "single-unsafe" is always used
instead.

(cherry picked from commit f3c6ac1d71)
2020-09-24 14:43:08 +02:00
Marcel Admiraal fc72c3fdf5 Remove the unnecessary sync() and the restrictions it imposes on 3D Physics. 2020-09-18 10:42:59 +01:00
Pedro J. Estébanez 633b75c9e1 Fix debugger not getting focused on break on Windows
This is a revert of 9d78274e06, which was an attempt to fix #21431, but in the end it seems a different problem was the root of the issue.

Renewing focus steal allowance every time is needed on Windows.
2020-07-21 01:09:17 +02:00
Hugo Locurcio a8188265c2 Disable file logging for the project manager
Due to `user://` returning the current working directory when no
project is open, this caused logs to be written to `$HOME`
most of the time.

This closes #40305.

(cherry picked from commit b89dc6ae00)
2020-07-15 12:14:51 +02:00
Hugo Locurcio c2a4ce9380 Enable file logging by default on desktops to help with troubleshooting
- Use the `.log` file extension (recognized on Windows out of the box)
  to better hint that generated files are logs. Some editors provide
  dedicated syntax highlighting for those files.
- Use an underscore to separate the basename from the date and
  the date from the time in log filenames. This makes the filename
  easier to read.
- Keep only 5 log files by default to decrease disk usage in case
  messages are spammed.

(cherry picked from commit 20af28ec06)
2020-07-10 11:03:32 +02:00
PouleyKetchoupp fe0adc4f77 Keep debug & verbose options after loading project from project manager
(cherry picked from commit b2d27214aa)
2020-07-10 08:51:21 +02:00
Fabio Alessandrelli dc8b7b3b17 Move frame delaying functions from Main to OS.
Will allow specific platforms to override it and avoid blocking on the
main/GUI thread.

(cherry picked from commit 1b6e3458b2)
2020-07-02 13:52:02 +02:00
Hugo Locurcio 087a83fd54 Improve the low processor mode sleep precision
The Low Processor Usage Mode Sleep Usec setting is now used as a
FPS limiter rather than a constant sleep duration.

This will increase CPU/GPU usage slightly due to the higher
effective FPS, but the increase in overall smoothness is worth it.

If both Force Fps and Low Processor Usage Mode settings are enabled
in the project settings, only the setting that causes the highest
sleep duration will be retained.

This closes #11030.

(cherry picked from commit 1c28b269d8)
2020-06-24 23:15:53 +02:00
Rémi Verschelde 530307e7ec Main::cleanup: Move MessageQueue deletion further down where it's safer
Partial revert of #15702 which triggered the issue.

Fixes #39786.

(cherry picked from commit 6480efba45)
2020-06-24 22:52:05 +02:00
Ev1lbl0w 17c87d2ec1
Expose disable_render_loop property to GDScript 2020-06-18 11:59:29 +01:00
Hugo Locurcio a6a29f97fe Add a suffix to the window title when running from a debug build
Since projects started from the editor or exported in debug mode
run slower than those exported in release mode, this should be
clearly presented to the user.

This partially addresses #20219.

(cherry picked from commit a9c60007a9)
2020-06-18 10:46:01 +02:00
Andrii Doroshenko (Xrayez) 133997654c Add custom_modules build option to compile external user modules
This patch adds ability to include external, user-defined C++ modules
to be compiled as part of Godot via `custom_modules` build option
which can be passed to `scons`.

```
scons platform=x11 tools=yes custom_modules="../project/modules"
```

Features:

- detects all available modules under `custom_modules` directory the
same way as it does for built-in modules (not recursive);
- works with both relative and absolute paths on the filesystem;
- multiple search paths can be specified as a comma-separated list.

Module custom documentation and editor icons collection and generation
process is adapted to work with absolute paths needed by such modules.
Also fixed doctool bug mixing absolute and relative paths respectively.

Implementation details:

- `env.module_list` is a dictionary now, which holds both module name as
  key and either a relative or absolute path to a module as a value.
- `methods.detect_modules` is run twice: once for built-in modules, and
  second for external modules, all combined later.
- `methods.detect_modules` was not doing what it says on the tin. It is
  split into `detect_modules` which collects a list of available modules
  and `write_modules` which generates `register_types` sources for each.
- whether a module is built-in or external is distinguished by relative
  or absolute paths respectively. `custom_modules` scons converter
  ensures that the path is absolute even if relative path is supplied,
  including expanding user paths and symbolic links.
- treats the parent directory as if it was Godot's base directory, so
  that there's no need to change include paths in cases where custom
  modules are included as dependencies in other modules.

(cherry picked from commit a96f0e98d7)
2020-05-25 17:08:38 +03:00
bruvzg 28aabf4f73
[3.2] Block WM_MOUSEMOVE during Windows Ink pen handling. 2020-05-22 14:05:53 +03:00
Rémi Verschelde b6c551e864
Merge pull request #38875 from bruvzg/tab_drv_sel_32
[Windows, 3.2] Add tablet driver selection.
2020-05-20 13:58:26 +02:00
Hugo Locurcio a785641196 Allow .res and .tres extensions in the scene CLI positional argument
This closes #35709.

(cherry picked from commit 653334cc8d)
2020-05-20 12:07:08 +02:00
bruvzg 71b2abbfa3
[Windows, 3.2] Add tablet driver selection. 2020-05-20 09:36:56 +03:00
lawnjelly dcb19ed735 Add Nvidia Workaround for GLES3
Ported GLES2 workaround code to GLES3.
2020-05-07 14:54:14 +01:00
bruvzg 78266c09c4
Add support for the WinTab API for pen input. (3.2) 2020-05-05 14:56:02 +03:00
Rémi Verschelde 253fc093b8 DocData: Skip unexposed classes
Properly expose classes that we actually want accessible.

(cherry picked from commit 0ef8bcac4d)
2020-04-21 14:15:34 +02:00
Hugo Locurcio 25b353fd32 Tweak the error message when trying to run an invalid script from CLI
(cherry picked from commit 2ab9515b07)
2020-04-16 12:57:22 +02:00
bruvzg acfd8b67bd Ignore process serial number (-psn_...) command line argument passed by macOS Gatekeeper.
(cherry picked from commit e92a14ac5f)
2020-04-16 12:47:19 +02:00
Hugo Locurcio 2423f75585
Improve the error message displayed when the PCK file can't be found
This explains what to do if the executable was renamed, which is helpful
for people exporting projects.
2020-01-28 00:12:32 +01:00
Ignacio Etcheverry d5122ab31c Sync pending VisualServer commands after ScriptServer finalization
This is needed as C# may free resources from the finalizer thread during
CSharpLanguage::finish(). Previously this would result in RIDs not being freed.
2020-01-13 21:46:44 +01:00
Rémi Verschelde d88103172c Ignore command line --build-solutions when not editing project
This option is meant to use together with `--path` or from a project
folder. Otherwise the project manager is opened and the option triggers
a crash.

Fixes #25589.
2020-01-13 14:00:47 +01:00
Rémi Verschelde ab97f78fa5 Revert "Enable Vsync via Compositor by default"
This reverts commit 9600fd5dde.

Add comment warning about possible implications of using this option.

Fixes #35038.
2020-01-13 09:33:27 +01:00
Hugo Locurcio 0218494e6b
Be stricter on what's considered a scene path in CLI argument parsing
This closes #8721.
2020-01-10 13:18:24 +01:00
Rémi Verschelde 83d950b58e
Merge pull request #34968 from Calinou/enable-vsync-via-compositor
Enable Vsync via Compositor by default
2020-01-10 10:04:55 +01:00