Commit graph

1067 commits

Author SHA1 Message Date
Rémi Verschelde
337ef03958
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```

(cherry picked from commit eb78f80f03)
2021-05-20 14:36:39 +02:00
Haoyu Qiu
f89120b895
Fix ragdoll simulation when parent was readded to scene
(cherry picked from commit a701927d89)
2021-05-19 19:45:35 +02:00
Sonoracpp
d006f50db3
Disable GIProbe emission when disabled on a material
Fixes https://github.com/godotengine/godot/issues/48230

(cherry picked from commit 0b723358bb)
2021-05-18 11:58:45 +02:00
kleonc
5445d04fbe
Fix accessing scene tree without checking: MeshInstance3D::create_debug_tangents, GIProbe::bake
(cherry picked from commit ef589a7cd3)
2021-05-17 13:13:24 +02:00
trollodel
140cf0f2cb
Create CollisionObject debug shapes using VS
(cherry picked from commit 60ee8c9639)
2021-05-09 18:58:33 +02:00
clayjohn
bb6b38680c
Only set base in Sprite3D when needed
(cherry picked from commit 3dd2e5d870)
2021-05-09 16:16:27 +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
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
rafallus
3ab33d3ce9
Check if _direct_state_changed() argument is valid
- Modified classes: RigidBody, PhysicalBone, VehicleBody, RigidBody2D, KinematicBody2D
- The input argument is untrusted even in release mode

(cherry picked from commit e075b6b411)
2021-04-26 11:51:00 +02:00
JFonS
33d6b1f68f
CPU lightmapper environment energy fixes.
* Better handling of the scene's environment energy in the lightmapper
  bakes.
* Fixed a bug where ProceduralSky::get_panorama() returned a reference
  instead of a copy.
* Removed includes to Embree's internal header files.

(cherry picked from commit 2db2d1153d)
2021-04-22 18:07:16 +02:00
smix8
fe7b624353 fix skeleton (ik) not resetting global_bone_overrides properly
fix skeleton (ik) not resetting global_bone_overrides properly
2021-04-15 16:50:59 +02:00
PouleyKetchoupp
a1db6784d6 Fix crashes with CollisionObject debug shapes
MeshInstance added as child nodes for CollisionObject debug shapes can
be invalidated while deleting the collision object (child nodes are
deleted first), which caused accesses to invalid memory in
shape_owner_remove_shape that lead to random crashes.

Also optimized accesses to shapes to avoid copy-on-write on each
iteration.
2021-04-12 20:04:13 -07:00
PouleyKetchoupp
0b51cb7a11 Fix spamming errors when SoftBody pinned nodes have no attachment
There was a specific case where the node path wasn't checked for
validity before trying to access the attachment node.

It could cause lots of error log noise in both editor and game.
2021-03-18 16:22:53 -07:00
PouleyKetchoupp
baf24b4503 Disable debug collision shapes in the editor
If the editor was started with --debug-collisions, 3d shapes were
displayed twice, both with the gizmo and debug shapes. Some shapes could
also persist after being removed due to the usage of queue_free() to
destroy the debug shapes.
2021-03-16 17:58:51 -07:00
Rémi Verschelde
3f246ebeed
Merge pull request #46932 from JFonS/fix_lm_capture_env
[3.2] Batch of lightmapper fixes and minor improvements
2021-03-12 12:30:36 +01:00
JFonS
e2c28675ef Batch of lightmapper fixes and minor improvements
- Fix objects with no material being considered as fully transparent by the lightmapper.
- Added "environment_min_light" property: gives artistic control over the shadow color.
- Fixed "Custom Color" environment mode, it was ignored before.
- Added "interior" property to BakedLightmapData: controls whether dynamic capture objects receive environment light or not.
- Automatically update dynamic capture objects when the capture data changes (also works for "energy" which used to require object movement to trigger the update).
- Added "use_in_baked_light" property to GridMap: controls whether the GridMap will be included in BakedLightmap bakes.
- Set "flush zero" and "denormal zero" mode for SSE2 instructions in the Embree raycaster. According to Embree docs it should give a performance improvement.
2021-03-12 12:00:53 +01:00
Angad Kambli
144749c31b use collision mask in vehicle raycast
(cherry picked from commit bfc533fc4c)
2021-03-08 17:40:22 +01:00
Hugo Locurcio
ac6251d8b2
Remove deprecation warning messages from InterpolatedCamera
Since Godot 4.0's relea	se is still a while away, warning users
every time the project starts might be a bit too dramatic.
2021-03-07 15:56:41 +01:00
sps1112
6ea1e97e06 Add null check for NavigationMesh.create_from_mesh()
(cherry picked from commit cf6bfea93f)
2021-03-04 11:41:46 +01:00
sps1112
216aba8228 Add size<=0 check in BakedLighmapData._get_user_data()
(cherry picked from commit 18bb6e74be)
2021-03-04 11:41:10 +01:00
Rémi Verschelde
c003423674
Merge pull request #46579 from nekomatata/fix-joint-remove-body-regression-3.2
[3.2] Fix Joint2D/Joint node path reset on scene switch
2021-03-03 16:41:59 +01:00
PouleyKetchoupp
cdf0ebfac7 Fix Joint2D/Joint node path reset on scene switch
When one of the bodies exited the tree, the corresponding node path was
reset instead of just resetting the joint from the physics server. That
was causing the node path to be reset on scene switch when one of the
bodies is under the joint in the scene tree.
2021-03-02 08:32:00 -07:00
Pedro Rodrigues
279b9f43f3 Fix crash in GIProbe::bake
The problem happened when the passed from_node was null and the GIProbe
node had no parent node.

Fixes #45978

(cherry picked from commit 82fed7b6da)
2021-03-02 10:26:14 +01:00
Eryk Dwornicki
127f3c0566 Fixed bug that caused collision not to be properly reenabled when joint between two bodies is destroyed
(cherry picked from commit 519e314bea)
2021-03-02 10:26:14 +01:00
trollodel
2da6d82f3b Allow CollisionObject to show collision shape meshes
Add an editor gizmo to CollisionObject.
CollisionShape no longer shows collision shapes directly.
2021-02-24 21:33:40 +01:00
Hein-Pieter van Braam
220f24c191
Merge pull request #45618 from RandomShaper/modernize_mt_3.2
Backport of all the multi-threading modernization (3.2)
2021-02-18 20:47:24 +01:00
Rémi Verschelde
7af8da32b1
Merge pull request #45933 from nekomatata/cylinder-support-3.2
[3.2] Cylinder support in Godot Physics 3D
2021-02-18 19:36:42 +01:00
PouleyKetchoupp
c6fbd55ca9 Cylinder support in Godot Physics 3D
Backport of cylinder support from Master.
2021-02-18 08:44:23 -07:00
Pedro J. Estébanez
4485b43a57 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 12:23:25 +01:00
Angad Kambli
013fc360d7 add null check in MeshInstance::_mesh_changed() 2021-02-18 16:36:27 +05:30
Pedro J. Estébanez
4ddcdc031b Modernize Mutex
- Based on C++11's `mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
- `BinaryMutex` added for special cases as the non-recursive version
- `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`.
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
2021-02-18 11:58:08 +01:00
Ellen Poe
8a426923c2
Fix pops in play() of both spatial audio players
(cherry picked from commit 5e1442ad55)
2021-02-18 10:33:46 +01:00
Angad Kambli
bba67729ca
add null check in _update_particle_data_buffer()
add check to see if p_order is in range for CPUParticles3D::set_draw_order'

(cherry picked from commit c97fffdc59)
2021-02-18 00:36:20 +01:00
Jitesh
d968a03cbc
Add animation_finished signal and fix frame_changed signal for AnimatedSprite3D
Fixes #40301.
Fixes #45947.

(cherry picked from commit c3be0c2c04)
2021-02-18 00:36:20 +01:00
Ellen Poe
3d34803edc
Return setseek position if one exists in get_playback_position.
(cherry picked from commit 15b8480b2c)
2021-02-16 14:27:40 +01:00
hoontee
d91a5e7883
Implement CollisionPolygon3D margin
(cherry picked from commit fbb1ef759c)
2021-02-16 14:27:39 +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
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
Rafał Mikrut
24d03afc9b
Fix nan errors when using VehicleBody
(cherry picked from commit 1b8cbcf946)
2021-02-08 22:36:36 +01:00
Rémi Verschelde
b060b2e68f
Merge pull request #45750 from revilo/3.2
[3.2] Bugfix: Update transform of collision shape on NOTIFICATION_PARENTED
2021-02-08 21:33:21 +01:00
Kayomn
d923df52c5 Accomodate blend shape ranges of -1 to +1 2021-02-07 21:42:02 +00:00
Rémi Verschelde
f05e068d6c
Merge pull request #45583 from lawnjelly/optimize_transform_propagate
Optimize transform propagation for hidden 3d objects
2021-02-06 12:23:52 +01:00
Rémi Verschelde
f36c529ad0
Merge pull request #45752 from JFonS/cpu_lightmapper_fixes
Assorted CPU lightmapper fixes
2021-02-06 11:44:52 +01:00
Oliver Dick
09924d6d73 Bugfix: Update transform of collision shape on NOTIFICATION_PARENTED (fixes invalid transform of collision shape in cases where the node is not supposed to enter the scene tree) 2021-02-06 02:41:16 +01:00
JFonS
27c1e65969 Assorted CPU lightmapper fixes
- Fix crash when a ray hits a texel with a UV2 coordinate exactly
  equal to 1.0.
- Take BakedLightmap extents into account.
- Clear capture data between bakes.
- Fix minor issues with seam correction.
2021-02-05 19:18:19 +01:00
lawnjelly
cb8134f371 Optimize transform propagation for hidden objects
When visual instances are hidden, there is no need to update their global transforms and send these to the visual server. This only needs to be done when the objects are reshown.
2021-02-03 15:16:47 +00:00
Rémi Verschelde
30fd2f171d
Merge pull request #45497 from Chaosus/fix_particles_3.2
[3.2] Fix particles not properly updated by their lifetime
2021-02-03 15:51:14 +01:00
kobewi
7a6ab8c558
Cache world in VisibilityNotifier3D to avoid crash
(cherry picked from commit 4d172f1fca)
2021-02-02 13:02:45 +01:00
Azamat Nabiullin
5611a17219 Fix disconnection between Gizmo and inspector values on BakedLightmap
After adding `_change_notify("extents");` to `set_extents()` method in `BakedLightmap` class
the issue was fixed

Fix disconnection between Gizmo and inspector values on BakedLightmap

Remove unnecessary `_change_notify("bake_extents")` call from `set_extents()`
2021-01-28 07:03:06 +03:00