Commit graph

29666 commits

Author SHA1 Message Date
Rémi Verschelde 9602dfad90
VisualScript: Fix wrongly setting default value on property hint change
PR #45096 put the backported code in the wrong case, it should be for `type`
and not for `hint`.

Also synced `hint` enum values with `Object.PropertyHint`.

Fixes #48698.

(cherry picked from commit c7182512dd)
2021-05-13 23:17:07 +02:00
davidh 025a380d1f
Check for valid DynamicFontData before duplicate
(cherry picked from commit ae2bc66eae)
2021-05-13 23:16:20 +02:00
Yuri Sizov 57f271f03a
Fix EditorPropertyEasing capturing drag events originated outside of it
(cherry picked from commit 31db95b048)
2021-05-13 23:16:06 +02:00
Rémi Verschelde 746b9b03dd
CI: Update JavaScript linter deps with known security vulnerabilities
jsdoc has no new release so I'm tracking this PR:
https://github.com/jsdoc/jsdoc/pull/1906

(cherry picked from commit e743b6b24c)
2021-05-13 23:15:19 +02:00
lawnjelly 3624abd613
Batching - fallback for 2d skinning with unrigged polys.
In the legacy renderer unrigged polys would display with no transform applied, whereas the software skinning didn't deal with these at all (outputted them with position zero). This PR simply copies the source to destination verts and replicates the legacy behaviour.

(cherry picked from commit 3c68a6d37f)
2021-05-13 23:14:51 +02:00
Hugo Locurcio c93b8be3b6
Fix Ubuntu clang-format version detection in the pre-commit hook
(cherry picked from commit 61aa09097f)
2021-05-10 17:47:36 +02:00
Rémi Verschelde d1ac177f98
TileSet: Fix signal disconnect error in some situation
Fixes second issue in #45938.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
(cherry picked from commit 6e920d0c14)
2021-05-10 17:13:58 +02:00
trollodel 140cf0f2cb
Create CollisionObject debug shapes using VS
(cherry picked from commit 60ee8c9639)
2021-05-09 18:58:33 +02:00
Kyle 5193c3c8eb
Add ctrl+shift+a to instance scene in scenetree dock
Adds another key shortcut to instance a scene in the scentree dock. Complements ctrl+a to add a node.

(cherry picked from commit ea5445655c)
2021-05-09 17:29:53 +02:00
Rémi Verschelde 6f780d7e3a
TileSet: Improve error message for invalid IDs
Supersedes #47321.
Fixes #47313.

(cherry picked from commit ee86dc3011)
2021-05-09 17:29:53 +02:00
Hugo Locurcio dd20139901
Allow negative contrast values in the editor theme settings
When using a negative contrast value, the base color will be lightened
to create the derivative colors instead of being darkened.

This can lead to better-looking themes, especially for light themes.

(cherry picked from commit e7e2ef0767)
2021-05-09 16:38:18 +02:00
Hugo Locurcio 3299600093
Document caveats of OS.get_unique_id()
(cherry picked from commit 7350f90c57)
2021-05-09 16:29:14 +02:00
Hugo Locurcio 7eacb604b1
Fix EditorPropertyResource focus outline being drawn behind the preview
(cherry picked from commit 0b47f1be8c)
2021-05-09 16:28:56 +02:00
Fabio Alessandrelli 0a7193c5f4
[HTML5] Fix target_fps when window loses focus.
We don't get updates when the window is unfocused/minimized, so we must
detect the situation where the counted ticks start drifting away
resulting in more frames drawn than needed.
This commit adds a check to ensure that the target ticks do not drift
away more than one second.

(cherry picked from commit a1fe6d6899)
2021-05-09 16:28:22 +02:00
Hugo Locurcio 3fc59fbcc7
Tweak the setting hint for the custom editor theme setting
The custom editor theme is only visible after restarting the editor.

(cherry picked from commit 027301fec7)
2021-05-09 16:28:04 +02:00
Fabio Alessandrelli 488f448fbb
[HTML5] Remove "fixed-size.html".
No longer used in 3.3+.

(cherry picked from commit 3faf8d6e40)
2021-05-09 16:27:48 +02:00
Kyle b622a9e359
Remove extra separator
Removes an extra separator when Scene Tree Editing is disabled. Discussed in #48518

(cherry picked from commit e168baf433)
2021-05-09 16:27:26 +02:00
Kyle e6cbb4d460
Fixed cut/copy/paste visibility
Fixes #48514 by moving the visibility of these buttons into their own if statement that depends on if scene tree editing is allowed. Previously it was under the script editing setting which is unexpected as it works with nodes and the scene tree.

(cherry picked from commit 10d5d4d3cd)
2021-05-09 16:27:10 +02:00
Fabio Alessandrelli 88210227dc
[HTML5] Use 64KiB chunk size in JS HTTPClient.
For consistency with the native one, and the documentation.

(cherry picked from commit 6243835619)
2021-05-09 16:23:38 +02:00
Hugo Locurcio 5514b16950
Improve the AudioStreamPlayer(2D/3D) class descriptions
(cherry picked from commit b90adec417)
2021-05-09 16:23:16 +02:00
paru 523faf0444
Fixed usage of proxy textures on GLES2 sky
(cherry picked from commit eed4655644)
2021-05-09 16:16:58 +02:00
clayjohn bb6b38680c
Only set base in Sprite3D when needed
(cherry picked from commit 3dd2e5d870)
2021-05-09 16:16:27 +02:00
Rémi Verschelde e6186dad59
Fix crash with user-defined ResourceFormatLoader.load
There's still some fishy recursive relationship between `load_interactive` and
`load` which needs to be investigated here, but this patch solves the crash
when returning an error code in user-defined `load`.

Fixes #48463.

(cherry picked from commit bf9f288c7d)
2021-05-09 16:15:09 +02:00
TwistedTwigleg e9c8889ae8
Fixes the SkeletonIK twisting issue by using the skeleton global pose without overrides
(cherry picked from commit c1bc87ed0d)
2021-05-09 16:14:11 +02:00
Lightning_A feaf4e6207
Fix Array.max() navigating to @GDScript.max() etc.
(cherry picked from commit 2c4aa50648)
2021-05-09 16:11:27 +02:00
rafallus edd63aeefa
Check input mesh is valid in SurfaceTool methods
(cherry picked from commit 0ad0f71ba0)
2021-05-09 16:11:09 +02:00
kobewi 476bc5191b
Save project after opening
(cherry picked from commit 76240515d8)
2021-05-05 18:35:55 +02:00
MaxStgs 7e22dfdd05
Add PackedDataContainer data pointer check for non nullable
(cherry picked from commit 94d0c4182b)
2021-05-05 18:35:55 +02:00
PouleyKetchoupp 7c5633c032
Expose get_debug_mesh in Shape to scripting API
Can be useful for custom drawing of physics shapes without having to add
a collision object node to the tree.

(cherry picked from commit 0ba5001fb6)
2021-05-05 18:35:54 +02:00
Hugo Locurcio b1cb84b452
Document that File.open_compressed() can only open files saved by Godot
(cherry picked from commit 5f098d6db6)
2021-05-05 18:35:54 +02:00
CaptainProton42 b4529c7e8d
Fix 3D scene preview generation.
File system dock previews will now be generated for 3D scenes when no
editor feature profile is set.

(cherry picked from commit 16304aaa3b)
2021-05-05 18:35:54 +02:00
Brian Semrau ba4f15b376
Batching fix polygon basis polarity
Changes based on fix in #46898

(cherry picked from commit 57e3f357dc)
2021-05-05 18:35:54 +02:00
JFonS 6a84390cd6
Add checks for __SSE2__ in the lightmap raycaster
(cherry picked from commit 20717990fd)
2021-05-05 18:35:54 +02:00
Rémi Verschelde b97b37f91c
SCons: Disable embree-based modules on x86 (32-bit)
Fixes #48482.

(cherry picked from commit e53422c8f9)
2021-05-05 18:23:57 +02:00
JFonS 1cfed0d583
Switch to embree-aarch64
(cherry picked from commit 73e2ccd603)
2021-05-05 15:11:13 +02:00
Rémi Verschelde 4b8a1d21f3
CI: Add --doctool check to find missing classref updates
This will enforce that PRs properly sync the class reference templates to match
their changes to the public API, and help notice binding bugs in the process
(e.g. missing enum bindings, unexpected API changes or missing argument names).

This should also serve as a reminder to contributors that their changes impact
the scripting API and might warrant actually filling the descriptions for the
new methods/properties/etc.

(cherry picked from commit b388412270)
2021-05-04 12:54:52 +02:00
Rémi Verschelde 06136d433b
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c03ae)
(cherry picked from commit e94161dada)
2021-05-04 12:54:34 +02:00
MaxStgs c5332b1d7a
Check PHashTranslation generate p_from is valid
(cherry picked from commit 0bb40df4bb)
2021-05-04 12:54:09 +02:00
Mateo Kuruk Miccino 3c089f6a4f
LineEdit: Now double click to select a word, and triple click to select all the content
(cherry picked from commit 74b3021691)
2021-05-04 12:53:40 +02:00
Koala 508cd0bb12
Fix indent left line selection
(cherry picked from commit 2c64008718)
2021-05-04 12:47:58 +02:00
kleonc 045b85b6e0
Make posmod use int64_t instead of int
(cherry picked from commit f04a964627)
2021-05-04 12:47:13 +02:00
PouleyKetchoupp 62d80ba15d
Allow values > 1 for friction and bounce in PhysicsMaterial
(cherry picked from commit 67987be644)
2021-05-04 12:45:45 +02:00
PouleyKetchoupp 703c290b71
Fix skinning initialization in MeshInstance when loaded from thread
Fix for a regression from software skinning support:
instance_attach_skeleton wasn't called in set_mesh before, and it's
causing issues when the mesh instance is loaded from a thread.
1. Call from a thread queues instance_attach_skeleton with RID() in the
visual server.
2. Call from the main thread when entering tree calls
instance_attach_skeleton immediately with a valid skeleton
3. Queued instance_attach_skeleton resets the attached skeleton

This change prevents that to happen by making sure
instance_attach_skeleton is not called on set_mesh as it was doing
before, but there might be a more general problem to solve in how
visual server commands are executed when resources are loaded from
a different thread.

(cherry picked from commit feee9f9695)
2021-05-04 12:44:47 +02:00
MaxStgs 387d2a69ca
Fix BakedLightmap bias bound check
(cherry picked from commit b4cc8ed6f2)
2021-05-03 17:06:49 +02:00
kleonc 44a4df0476
TileMapEditor Modulate autotile previews
(cherry picked from commit 3f1b95cfb1)
2021-05-03 16:41:48 +02:00
kleonc 839f602859
TileMapEditor::_bucket_fill Check autotile coordinates only if autotile is selected
(cherry picked from commit a1b903066e)
2021-05-03 16:41:28 +02:00
MaxStgs a93f52ee7e
Add WebSocketMultiplayerPeer _incoming_packets check bound
(cherry picked from commit 05ad08941b)
2021-05-03 16:39:04 +02:00
lawnjelly dacd16fd33
Fix 2d software skinning relative transforms
All my earlier test cases for software skinning had the polys parent transform to be identity. This works fine until you had cases where the user had moved the transform of the parent nodes of skinned polys.

This PR fixes this situation by taking into account the final (concatenated) transform of the polys RELATIVE to the skeleton base transform. It does this by applying the inverse skeleton base transform to the poly final transform.

(cherry picked from commit f33e22001f)
2021-05-03 16:37:58 +02:00
bruvzg 87aa694ae5
Duplicate DynamicFontData resources in the editor preview generation thread to avoid race condition.
(cherry picked from commit 301bedd5d4)
2021-04-30 12:12:49 +02:00
Hugo Locurcio edf5a03714
Document that SceneTree.call_group() is deferred
(cherry picked from commit 7516ff3805)
2021-04-30 12:11:08 +02:00