Commit graph

28976 commits

Author SHA1 Message Date
kobewi 5a290e0a3c
Don't save project settings when not necessary
(cherry picked from commit 4db47eb32e)
2021-02-16 14:27:38 +01:00
Gordon MacPherson 546d7f619b
Use github actions cache not my own one.
(cherry picked from commit f2feefb367)
2021-02-16 14:27:38 +01:00
Bastiaan Olij 8aa022f99c
Only unload the library when no NativeScript objects exist if the reloadable flag is true. If it is false it is likely the library does other things and can't be unloaded
(cherry picked from commit ae7675065a)
2021-02-16 14:27:38 +01:00
Andrii Doroshenko (Xrayez) 329dcebc83
Fix sprite editor conversion tools to handle compressed textures
(cherry picked from commit 1cd7a16c10)
2021-02-16 14:27:38 +01:00
PouleyKetchoupp ac9e5d9c60
Fix TextEdit autoscroll with wrapped lines
Index to find the last line wrap index was off by one, which prevented the first wrapped line to trigger autoscroll.

(cherry picked from commit 121030940c)
2021-02-16 14:27:38 +01:00
Hugo Locurcio 6c6f4e9895
Expose a File.flush() method to scripting
This can be used to ensure a file has its contents saved
even if the project crashes or is killed by the user
(among other use cases).

See discussion in #29075.

(cherry picked from commit ab397460e9)
2021-02-16 14:27:38 +01:00
Hugo Locurcio 15d9f77f97
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)

Fixes crash when exiting with --verbose with leaked resources

(cherry picked from commit 25c4dacb88)
2021-02-16 14:27:38 +01:00
Rémi Verschelde ece69f8208
Merge pull request #46036 from aaronfranke/3.2-limit-zoom-half
[3.2] Limit max zoom to 1/2 of far plane instead of 1/4
2021-02-16 14:25:59 +01:00
Rémi Verschelde 77438f7a45
Merge pull request #46054 from JFonS/cpu_lightmapper_disk
[3.2] Reduce lightmaps file size.
2021-02-16 13:37:09 +01:00
JFonS 56bf256d76 Add options to reduce lightmaps disk usage.
Added BakedLightmap.use_hdr and BakedLightmap.use_color properties
that can reduce the flie size of lightmap texture at the expense of quality.

Changed the denoiser to work in a single buffer, reducing RAM
usage. Also added the `-mstackrealign` flag in the denoiser compilation
for MinGW builds. This flag helped fix a bug in Embree, so I want to see
if it will help fix GH #45296.
2021-02-16 13:20:27 +01:00
Rémi Verschelde 1611d3dc17
Merge pull request #46008 from akien-mga/3.2-fix-camera-align-crash-45976
Camera2D: Fix crash calling align when not in tree
2021-02-16 12:18:38 +01:00
Rémi Verschelde 23a6ff2782
Merge pull request #46076 from m4gr3d/expose_godot_plugin_utility_methods
[3.2] Expose GodotPlugin's utility methods
2021-02-16 10:58:30 +01:00
Fredia Huya-Kouadio 64f5a7b8ca Expose GodotPlugin's utility methods used for registration and signal emitting.
This enables creation and use of a plugin like class by composition rather than inheritance.
2021-02-15 15:57:36 -08:00
Rémi Verschelde 3541d13095
Merge pull request #46060 from nekomatata/text-edit-style-content-margins-3.2
[3.2] TextEdit respects content margin from StyleBox
2021-02-15 19:48:35 +01:00
PouleyKetchoupp 018008ce81 TextEdit respects content margin from StyleBox
Backport from PR #45858 on master.
2021-02-15 10:47:38 -07:00
Rémi Verschelde daf1151b79
Merge pull request #46055 from bruvzg/fix_spacing_space
[3.2] Fix SPACING_SPACE not used for drawing characters.
2021-02-15 17:30:34 +01:00
bruvzg 56fccb1ec1
[3.2] Fix SPACING_SPACE not used for drawing characters. 2021-02-15 18:03:26 +02:00
JFonS 7241139356 Backport EXR compression support from master 2021-02-15 12:51:55 +01:00
Rémi Verschelde 40c30adf04
Merge pull request #46034 from bruvzg/ignore_warp_on_mode_change_3
[macOS, 3.2] Ignore mouse move event caused by mouse mode switch.
2021-02-15 11:09:28 +01:00
Rémi Verschelde 5a22bd2b3e
Camera2D: Fix crash calling align when not in tree
Fixes #45976.
2021-02-15 10:54:16 +01:00
Aaron Franke 751036ff87
[3.2] Limit max zoom to 1/2 of far plane instead of 1/4 2021-02-14 18:17:35 -05:00
bruvzg bc04bbbe2a
[macOS] Ignore mouse move event caused by mouse mode switch. 2021-02-15 00:19:47 +02:00
Rémi Verschelde db8c2410a4
Merge pull request #46026 from Calinou/project-manager-add-loading-text-3.2
Display loading text while the project manager is loading (3.2)
2021-02-14 17:38:37 +01:00
Hugo Locurcio f6257e31ed
Display loading text while the project manager is loading
This hints the user that the project manager is currently busy
loading the project. This is important for the HTML5 editor as the
current feedback isn't very obvious.

This also removes the unused `_exit_dialog` function.
2021-02-14 17:02:08 +01:00
Rémi Verschelde a1222e435f
Merge pull request #45982 from clayjohn/GLES2-max-dims
Check limits on texture or framebuffer creation
2021-02-14 11:53:02 +01:00
Rémi Verschelde ab252c3723
Merge pull request #45970 from lawnjelly/bvh_fix_mesh_visible
BVH - fix deferred visible mesh collision check
2021-02-14 11:02:34 +01:00
lawnjelly a814dda2ae BVH - fix deferred visible mesh collision check
When making items visible from the visual server, the collision check is deferred to prevent two identical collision checks when set_pairable is called shortly after.

It turns out that for some items (especially meshes), set_pairable is never called. This PR detects this occurrence and forces a collision check at the end of the routine.
2021-02-14 09:03:26 +00:00
clayjohn 7efcafd057 Check limits on texture or framebuffer creation 2021-02-13 13:36:15 -08:00
Rémi Verschelde 83e4e4dc52
Merge pull request #45902 from Calinou/inputmap-nonexistent-suggestions-3.2
Print suggestions when requesting a nonexistent InputMap action (3.2)
2021-02-12 12:54:06 +01:00
Rémi Verschelde 9918fd722e
Merge pull request #45921 from Faless/js/3.x_dpi
[3.2] [HTML5] Detect screen scale and DPI.
2021-02-12 12:24:36 +01:00
Fabio Alessandrelli b3f78687de [HTML5] Detect screen scale and DPI.
`OS.get_screen_scale` will now return the `window.devicePixelRatio`
value, `OS.get_screen_dpi` uses CSS media queries to find approximate
DPI value for the current display.
`OS.get_screen_size` also return the actual screen size (not the CSS
pixel size).
2021-02-12 12:02:30 +01:00
Rémi Verschelde 986b1a9b18
CI: Mono glue generation sometimes crashes on exit, ignore it 2021-02-12 11:14:19 +01:00
Emily 92dd573053
fixed typo in packedscene
(cherry picked from commit 7368bc534a)
2021-02-12 11:11:35 +01:00
Rémi Verschelde 10f0be7719
SCons: Fix Godot detection in custom modules logic
`exec()` was not a good idea as it assumes a certain type of `version.py` file
similar to Godot's own file, which is not always a reliable assumption (see
https://github.com/godotengine/godot/pull/43057#issuecomment-777632900).

Also restores Python 2 support for the 3.2 branch.

(cherry picked from commit 75910d1e9b)
2021-02-12 11:09:40 +01:00
Rémi Verschelde e71510097d
Merge pull request #45837 from Kayomn/3.2
Accomodate blend shape ranges of -1 to +1 for GLES
2021-02-12 09:28:19 +01:00
Hugo Locurcio 28127ce224
Print suggestions when requesting a nonexistent InputMap action
Co-authored-by: Marc Gilleron <marc.gilleron@gmail.com>
2021-02-11 18:00:26 +01:00
Rémi Verschelde 9a89782996
Merge pull request #45892 from akien-mga/3.2-cherrypicks
Cherry-picks for the 3.2 branch (future 3.2.4) - 22nd batch
2021-02-11 15:18:14 +01:00
Fabio Alessandrelli 5abe08f484
[HTML5] Editor: ensure canvas focus when switching tabs.
(cherry picked from commit b148ea2a64)
2021-02-11 13:17:08 +01:00
Kongfa Waroros adb93d7120
Update GraphEdit when GraphNode's slot is updated
(cherry picked from commit fe6c8d48e6)
2021-02-11 13:14:33 +01:00
Ryan Roden-Corrent 08d556f677
Clarify EditorImportPlugin.get_visible_name.
According to the docs at
https://docs.godotengine.org/en/stable/tutorials/plugins/editor/import_plugins.html#the-editorimportplugin-class

> The get_visible_name() method is responsible for returning the name of
> the type it imports and it will be shown to the user in the Import dock.
> You should choose this name as a continuation to "Import as", e.g.
> "Import as Silly Material"

I've verified Godot's behavior reflects this, so the code examples
should reflect this.

Also document propagating save error in EditorImportPlugin.

It seems that the suggested code ignores any error from
`ResourceSaver.save`, but I think we should return it.

(cherry picked from commit 9676650f2f)
2021-02-11 13:12:06 +01:00
Fabio Alessandrelli cd2a996d9e
[HTML5] Fix web editor "clear persistent data".
Was broken after update to new persistent path "/home/web_user".

(cherry picked from commit 7866cd5881)
2021-02-11 13:12:06 +01:00
Meriipu 347a9df0a1
GDScript: Clarified/fixed inaccuracies in the built-in function docs.
The input to smoothstep is not actually a weight, and the decscription
of smoothstep was pretty hard to understand and easy to misinterpret.

Clarified what it means to be approximately equal.

nearest_po2 does not do what the descriptions says it does. For one,
it returns the same power if the input is a power of 2. Second, it
returns 0 if the input is negative or 0, while the smallest possible
integral power of 2 actually is 1 (2^0 = 1). Due to the implementation
and how it is used in a lot of places, it does not seem wise to change
such a core function however, and I decided it is better to alter the
description of the built-in.

Added a few examples/clarifications/edge-cases.

(cherry picked from commit 7f9bfee0ac)
2021-02-11 13:12:06 +01:00
PouleyKetchoupp 5e978d1df5
Fix contact points debug for 3D Physics
Setting each point's position was missing for 3D. Now enabling collision
render debug will display contact points for 3D physics, the same way it
does for 2D physics.

Note: Multimesh rendering seems not to work in this scenario on master,
but it's working fine on 3.2.

(cherry picked from commit e5e9be8355)
2021-02-11 13:12:06 +01:00
Michael Alexsander e6b3579e56
Make FileSystem dock set its path to the base folder of files after changes
(cherry picked from commit cf9d5cec22)
2021-02-11 13:12:06 +01:00
kleonc e900ca1f76
Make String::ends_with don't use String::rfind
(cherry picked from commit ad0943e3d3)
2021-02-11 13:12:06 +01:00
Rémi Verschelde fb0d0ad018
Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@lyuma, @nathanfranke, @pycbouh

(cherry picked from commit 1c58514c18)
2021-02-11 13:12:03 +01:00
Rémi Verschelde f55c23d8f2
Merge pull request #44476 from Calinou/doc-object-new-bug
Document known bug with `Object.new()` and workaround
2021-02-11 12:26:25 +01:00
Rémi Verschelde b2f925ea42
Merge pull request #45889 from Faless/js/3.x_xhr_fix
[3.2] [HTML5] Fix HTTPClient request_raw.
2021-02-11 11:08:14 +01:00
Rémi Verschelde 6f26df58a8
Merge pull request #45884 from Faless/js/3.x_more_handlers
[3.2] [HTML5] Handle contextmenu, webglcontextlost internally.
2021-02-11 10:53:41 +01:00
Fabio Alessandrelli 4086a123b9 [HTML5] Fix HTTPClient request_raw.
Now send data according to the spec, properly handle null data.
Simplify JS code since we are at it.
2021-02-11 09:32:17 +01:00