Commit graph

32249 commits

Author SHA1 Message Date
Rémi Verschelde
ee82085925
certs: Sync with Mozilla bundle as of Nov 1, 2021
edd798d35a
(cherry picked from commit 07f8996b1c)
2021-11-20 11:48:39 +01:00
Brian Semrau
04846156c3
Expose Thread::get_main_id in core bindings
(cherry picked from commit c558263d84)
2021-11-20 11:48:09 +01:00
kobewi
43fbd3adc7
Allow to name built-in scripts upon creation
(cherry picked from commit 64a2681cf0)
2021-11-20 11:46:33 +01:00
Fabio Alessandrelli
f56b1a5af5
[HTML5] Add checks to Gamepad API events.
In some conditions the events might be generated even when the `gamepad`
object is not accessible due to Security Context requirements.
This commit adds a check to avoid firing the handler in those cases.

(cherry picked from commit 91dbc288cc)
2021-11-20 11:46:13 +01:00
Fabio Alessandrelli
1066b60781
[HTML5] Fix input not focusing canvas.
mousedown and touchstart should focus the canvas to ensure correct
application lifecycle.

(cherry picked from commit f13c7fc83e)
2021-11-20 11:46:09 +01:00
Rémi Verschelde
393c7959ef
Merge pull request #42929 from madmiraal/fix-42877-3.2 2021-11-20 10:23:06 +01:00
Marcel Admiraal
702529d63e Give each RigidBody its own DirectBodyState wrapper. 2021-11-20 08:17:04 +00:00
Rémi Verschelde
2493995e4c
Merge pull request #41699 from madmiraal/fix-23484-3.2
[3.x] Fix Area monitorable in 2D and 3D Godot physics.
2021-11-20 09:02:55 +01:00
Marcel Admiraal
e900bac80b Add area to moved list when changing monitorable,
and only remove area from query when deleting pair if it was monitorable.
2021-11-20 06:54:36 +00:00
lawnjelly
211dc8cd2d BVH - add option for expanded AABBs in leaves
This PR adds a define BVH_EXPAND_LEAF_AABBS which is set, which stores expanded AABBs in the tree instead of exact AABBs.

This makes the logic less error prone when considering reciprocal collisions in the pairing, as all collision detect is now taking place between expanded AABB against expanded AABB, rather than expanded AABB against exact AABB.

The flip side of this is that the intersection tests will now be less exact when expanded margins are set.

All margins are now user customizable via project settings, and take account of collision pairing density to adjust the margin dynamically.
2021-11-20 06:45:12 +00:00
Rémi Verschelde
e0cdb8fbfc
Merge pull request #55103 from Calinou/shader-func-arg-const-qual-3.x 2021-11-19 23:23:24 +01:00
Hugo Locurcio
d7d35e4f73
Add const qualifier support for function arguments in shaders
This prevents the function argument from being reassigned within
the function.

Example:

    void test(const int t) {}
2021-11-19 21:20:23 +01:00
Rémi Verschelde
4a29f657b6
Merge pull request #55050 from lawnjelly/bvh_detect_shrinkage 2021-11-19 17:39:12 +01:00
Rémi Verschelde
54490e9ebb
i18n: Sync classref translations with Weblate
(cherry picked from commit f737ed4da0)
2021-11-19 09:54:45 +01:00
Rémi Verschelde
292164d2a5
i18n: Sync editor translations with Weblate
(cherry picked from commit 7ca1be5f37)
2021-11-19 09:54:40 +01:00
David Sichma
85ff6e3e07
Fixed pre-commit-black file extensions
Now hook can find .py files.

(cherry picked from commit 3fe10c7e9d)
2021-11-18 22:23:59 +01:00
Marcel Admiraal
2176b694ac
Trigger RigidBodyBullet space override updates when Area properties change.
(cherry picked from commit 41d85ed5a9)
2021-11-18 20:31:41 +01:00
Marcel Admiraal
84af1d9248
Update Bullet Area overlaps when Area properties or shapes change.
(cherry picked from commit 0d3e8538ef)
2021-11-18 20:31:40 +01:00
Marcel Admiraal
14ecd66a21
Ignore Bullet collision contact points with distance = 0
(cherry picked from commit 27b52f6c46)
2021-11-18 20:27:24 +01:00
Rémi Verschelde
a1ebcbc8b1
Merge pull request #55094 from Giwayume/bugfix/atlas_cutoff_3.x
[3.x] Fix texture atlas generation when source sprite is larger than generated atlas
2021-11-18 17:40:43 +01:00
Giwayume
0093bda767 Fix texture atlas generation when source sprite is larger than generated atlas 2021-11-18 10:02:24 -05:00
Rémi Verschelde
b0f721283d
Merge pull request #54089 from madmiraal/remove-unimplemented-methods-3.x 2021-11-18 15:51:15 +01:00
kobewi
a58736f129
Fix data directory of unnamed projects
(cherry picked from commit f6d16d55c6)
2021-11-18 13:47:52 +01:00
Marcel Admiraal
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
Anton Christoffersson
62db47a7fb
Fixed crash in ScrollContainer _notification
(cherry picked from commit ee81979f90)
2021-11-18 12:22:26 +01:00
BrunoSXS
8fd0fe3d20
Fixes a game crash caused by instantiating Camera2D and sending a notification from it before adding it to the tree.
(cherry picked from commit eb2deabffe)
2021-11-18 12:21:28 +01:00
Ibrahn Sahir
9a181edd87
Turn off physics servers in the Project Manager.
Copying the editor behaviour of deactivating these servers we're not
using, to reduce CPU load.

(cherry picked from commit 27a6ab457b)
2021-11-18 12:18:02 +01:00
Rémi Verschelde
2da3f80128
Windows: Use /bigobj only for debug builds, breaks GCC LTO
Building `target=release` and `target=release_debug` builds with MinGW-GCC
errors when linking with LTO.

Since it's only needed for `target=debug` builds anyway (bigger objects), which
we don't build with LTO, this works around the issue.

(cherry picked from commit 64d7df1e5f)
2021-11-18 12:15:05 +01:00
Rémi Verschelde
a9a0244e28
Merge pull request #55079 from lawnjelly/bvh_typename 2021-11-18 09:03:13 +01:00
lawnjelly
9315b4fb51 BVH - fix typename compiler warning
Some versions of microsoft compiler flag a warning that they want a typename keyword in templates in more places than clang / gcc.
2021-11-18 07:42:00 +00:00
Rémi Verschelde
d3659ee0ab
Merge pull request #55059 from KoBeWi/call_deferred_to_the_rescue 2021-11-17 18:17:55 +01:00
kobewi
f3d5ef6f7b Fix TileSet editor workspace breaking 2021-11-17 18:00:33 +01:00
Will Jordan
7e6bf27597
Fix crash on macOS (AS) when dualshock4 is removed
(cherry picked from commit 283e31a3e2)
2021-11-17 16:37:33 +01:00
kobewi
70d25bbfbb
Mention how to add margins to Button's icon
(cherry picked from commit 2341c7bbd9)
2021-11-17 15:56:23 +01:00
Pedro J. Estébanez
0ebbc5b07c
Fix crash when loading scene instance after node vanished from parent
(cherry picked from commit 78ffc2a987)
2021-11-17 15:55:36 +01:00
lawnjelly
ed47570266 BVH - detect shrinkage within expanded bounds
Although the expanded bounds were working in normal use, for moving and growing objects, there was one case which was not dealt with properly - significant shrinkage of exact bounds within an expanded bound.

This PR detects significant shrinkage and forces a new expanded bound to be created.
2021-11-17 09:06:10 +00:00
Rémi Verschelde
45088780be
Merge pull request #54925 from nekomatata/bvh-fix-update-3.x 2021-11-16 21:23:11 +01:00
PouleyKetchoupp
e9fdf3e61f Fix physics BVH pairing for teleported or fast moving objects
Updating the broadphase to find new collision pairs was done after
checking for collision islands, so it was working in most cases due to
the pairing margin used in the BVH, but in case of teleported objects
the narrowphase collision could be skipped.

Now it's done before checking for collision islands, so we can ensure
that broadphase pairing has been done at the same time as objects are
marked as moved so their collision can be checked properly.

This issue didn't happen in the Octree/HashGrid because they do nothing
on update and trigger pairs directly when objects move instead.
2021-11-16 12:01:57 -07:00
Rémi Verschelde
c3a6b0f418
Merge pull request #51433 from Calinou/spatialmaterial-improve-simple-parallax 2021-11-16 14:43:49 +01:00
Rémi Verschelde
caf39c9e7d
Merge pull request #54160 from Calinou/shadow-filter-use-early-bailing 2021-11-16 14:11:38 +01:00
Rémi Verschelde
b60875420f
Merge pull request #55001 from Jummit/highlight_categories_3x 2021-11-16 14:08:18 +01:00
Rémi Verschelde
785fef988e
Merge pull request #55022 from godotengine/revert-54433-fix-undo-redo-double-free-50769 2021-11-16 10:05:51 +01:00
Rémi Verschelde
f1ee1a2bf6
Revert "Fix UndoRedo::Operation objects cleanup" 2021-11-16 08:54:58 +01:00
Rémi Verschelde
4103b0b7d8
Merge pull request #50823 from fbcosentino/3d-material-overlay 2021-11-16 08:21:18 +01:00
Rémi Verschelde
97f4d25841
Merge pull request #55013 from Calinou/shader-editor-tweak-builtin-color-3.x
Tweak the built-ins color highlighting in the shader editor (take 2)
2021-11-16 07:36:25 +01:00
Hugo Locurcio
a0699bb6ec
Tweak the built-ins color highlighting in the shader editor (take 2)
The new color is more distinguishable from other variables and
symbols.
2021-11-16 01:01:43 +01:00
Fernando Cosentino
cc8846bef6 Added material_overlay property to MeshInstance
Applying overlay materials into multi-surface meshes currently
requires adding a next pass material to all the surfaces, which
might be cumbersome when the material is to be applied to a range
of different geometries. This also makes it not trivial to use
AnimationPlayer to control the material in case of visual effects.
The material_override property is not an option as it works
replacing the active material for the surfaces, not adding a new pass.

This commit adds the material_overlay property to GeometryInstance
(and therefore MeshInstance), having the same reach as
material_override (that is, all surfaces) but adding a new material
pass on top of the active materials, instead of replacing them.

Implemented in rasterizer of both GLES2 and GLES3.
2021-11-15 23:50:34 +00:00
Rémi Verschelde
458f5b42a6
Merge pull request #54433 from rxlecky/fix-undo-redo-double-free-50769 2021-11-16 00:22:23 +01:00
SeleckyErik
ae1bfacd2a Implement UndoRedo::Operation destructor
This way we can delete all occurences of nearly identical cleanup code
scattered around the UndoRedo class that was error-prone to keep in sync.
2021-11-15 23:55:01 +01:00
Rémi Verschelde
86e0a0674a
Merge pull request #54330 from LennyPhoenix/lennyphoenix-patch-1 2021-11-15 23:36:12 +01:00