Commit graph

1314 commits

Author SHA1 Message Date
Nathan Franke 2a8c59c171
Use Array for node configuration warnings
Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
2021-04-11 23:25:38 -05:00
Rémi Verschelde 47aef8e8dc
Merge pull request #47441 from TwistedTwigleg/skeletonik_changes_and_bug_fixes_regressionfix2
Fix for SkeletonIK not working correctly with 0 interpolation and incorrectly rotating with animation
2021-04-07 16:25:30 +02:00
Rémi Verschelde 0f0c0e5933
Style: Apply clang-tidy's modernize-use-bool-literals 2021-04-05 13:16:35 +02:00
Rémi Verschelde ed2f51b15f
Merge pull request #47452 from BastiaanOlij/xr_positional_tracker_ref
Change XRPositionalTracker to a reference (master)
2021-04-03 10:13:23 +02:00
TwistedTwigleg 318a81f619 Fix for SkeletonIK not working correctly with 0 interpolation and incorrectly rotating with animation. Now the root bone rotates differently to ensure it always rotates correctly and works with BoneAttachment3D nodes. 2021-04-02 13:47:19 -04:00
Rémi Verschelde c2b7c69e2b
Merge pull request #42827 from lyuma/rename_bones_blendshapes
Allow renaming bones and blendshapes.
2021-04-01 00:20:07 +02:00
Bastiaan Olij 454c889e61 Change XRPositionalTracker to a reference and better expose it to GDNative 2021-03-29 23:01:47 +11:00
Marcel Admiraal fd30c36985 Rename Texture.get_data() to get_image() 2021-03-28 13:00:46 +01:00
PouleyKetchoupp 41994ff8ee Fix RayCast3D color in game with no collision
In game, the ray color was always set as colliding.
2021-03-24 19:41:19 -07:00
Rémi Verschelde fa681d04b7
Merge pull request #46937 from nekomatata/soft-body-support
SoftBody support in GodotPhysics 3D
2021-03-20 21:45:20 +01:00
Rémi Verschelde 6608d99291
Merge pull request #47001 from madmiraal/rename-sprite_2d-region_enabled
Rename Sprite.region_enabled getter and setter methods to match properties
2021-03-20 18:36:17 +01:00
Rémi Verschelde 67dc067970
Merge pull request #47151 from nekomatata/soft-body-attachment-error
Fix spamming errors when SoftBody pinned nodes have no attachment
2021-03-19 08:38:27 +01:00
PouleyKetchoupp 195eda244f 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:26:42 -07:00
TwistedTwigleg c15e23396d Fix for regression in SkeletonIK code 2021-03-18 17:52:59 -04:00
PouleyKetchoupp d5ea4acd2d SoftBody support in GodotPhysics 3D
- Fixed SoftBody surface update with new rendering system
- Added GodotPhysics implementation for SoftBody
- Added support to get SoftBody rid to interact with the physics server
- Added support to get SoftBody bounds from the physics server
- Removed support for unused get_vertex_position and get_point_offset
from the physics server
- Removed SoftBody properties that are unused in both Bullet and
GodotPhysics (angular and volume stiffness, pose matching)
- Added RenderingServerHandler interface to PhysicsServer3D so the physics servers don't need to reference the class from SoftBody node directly
2021-03-18 09:04:17 -07:00
Rémi Verschelde 8088218e1e
Merge pull request #47081 from nekomatata/collision-debug-shape-game-only
Disable debug collision shapes in the editor
2021-03-17 10:37:57 +01:00
PouleyKetchoupp 9798a52a20 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 18:02:33 -07:00
Aaron Franke a94cef0ea0
Move SpriteFrames to its own file in the resources folder 2021-03-16 02:00:47 -04:00
Marcel Admiraal 3dcdb84660 Rename Sprite.region_enabled getter and setter to match properties
Also renames Sprite2D.region_filter_clip property and its setter to
region_filter_clip_enabled and set_region_filter_clip_enabled.
2021-03-14 17:31:49 +00:00
Anshul7sp1 91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
Rémi Verschelde a19ffe80da
Merge pull request #40774 from TwistedTwigleg/SkeletonIK_Godot_4_0_Fixes
SkeletonIK changes and bug fixes
2021-03-12 11:25:29 +01:00
Gilles Roudière ba1344408f Implement Navigation layers 2021-03-10 11:23:06 +01:00
Gilles Roudière a9dc53d152 Remove Navigation2D/3D nodes, and move the navigation map to the world resource 2021-03-10 11:23:06 +01:00
Angad Kambli bfc533fc4c use collision mask in vehicle raycast 2021-03-08 20:57:23 +05:30
Rémi Verschelde c487f1e854
Merge pull request #46643 from YeldhamDev/hide_all_the_things
Hide more options of disabled properties
2021-03-07 15:12:15 +01:00
Marcel Admiraal 38f2e32e32 Return RID instead of Object id in area-body_shape_entered-exited signals. 2021-03-06 10:48:17 +00:00
jmb462 068300c7c9 Adding Raycast3D custom debug shape thickness and color 2021-03-04 11:17:26 +01:00
Michael Alexsander 4be282a269 Hide more options of disabled properties 2021-03-03 20:51:35 -03:00
Rémi Verschelde f3e98c286a
Merge pull request #46616 from sps1112/fix-bakedlightmap-crash
Add size check in BakedLightmapData::_set_user_data()
2021-03-03 17:00:38 +01:00
Rémi Verschelde d0e62518a8
Merge pull request #46578 from nekomatata/fix-joint-remove-body-regression
Fix Joint2D/Joint3D node path reset on scene switch
2021-03-03 16:41:37 +01:00
sps1112 18bb6e74be Add size<=0 check in BakedLighmapData._get_user_data() 2021-03-03 15:31:31 +05:30
PouleyKetchoupp 2dc5ff0caa Fix Joint2D/Joint3D 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:24:50 -07:00
Michael Alexsander 70304f8633 Hide extra options from various nodes if they're not enabled 2021-03-02 09:25:09 -03:00
Pedro Rodrigues 82fed7b6da 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
2021-02-28 20:09:55 +00:00
Eryk Dwornicki 519e314bea Fixed bug that caused collision not to be properly reenabled when joint between two bodies is destroyed 2021-02-27 17:11:15 +01:00
trollodel 85a776ddcd Allow CollisionObject3D to show collision shape meshes
Add an editor gizmo to CollisionObject3D.
CollisionShape3D no longer shows collision shapes directly.
2021-02-24 18:50:13 +01:00
Aaron Franke 548de64742
Use a more specific type for Area2D/3D body signals 2021-02-24 00:05:54 -05:00
reduz d6a9cff8b7 Add preview Sun and Environment
* Adds both a preview sun and preview environment to the 3D editor.
* They are valid as long as a DirectionalLight3D and WorldEnvironment are not in the scene.
* If any is added to the scene, the respective preview is disabled.
* Changed WorldEnvironment to better handle multiple node versions.
* Added a function in SceneTree to get the first node in a group.
* Fixed button minimum size to also consider font height if no text is there, this broke with the TextSever PR.
2021-02-22 16:56:29 -03:00
Rémi Verschelde 0d1d719178 doc: Sync classref with current source
And fix various bogus bindings following previous PRs.
2021-02-19 14:39:14 +01:00
reduz 083aa9b95e Refactor Process Mode
Implements https://github.com/godotengine/godot-proposals/issues/1835#issuecomment-727186192

* PauseMode is now ProcessMode, containing the following states:
	```
	PROCESS_MODE_INHERIT, // same as parent node
	PROCESS_MODE_NORMAL, // process only if not paused
	PROCESS_MODE_PAUSE_ONLY, // process only if paused
	PROCESS_MODE_ALWAYS, // process always
	PROCESS_MODE_DISABLED, // never process
	```
* NOTIFICATION_PAUSED and NOTIFICATION_UNPAUSED are received effectively when the node is paused and unpaused (not any longer when pause mode is set in SceneTree).
* Renamed some nodes that used ProcessMode/process_mode to specify a callback type to ProcessCallback to avoid clashes.
2021-02-18 20:39:55 -03:00
Rémi Verschelde 310496a89f
Merge pull request #45617 from RandomShaper/modernize_atomics
Modernize atomics (and fix `volatile`)
2021-02-18 19:40:31 +01:00
Pedro J. Estébanez 8e128726f0 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 bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 17:12:46 +01:00
reduz 64140eaf42 Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
Angad Kambli 6b602d35f3 add null check in MeshInstance::_mesh_changed() 2021-02-18 16:51:39 +05:30
Rémi Verschelde 9d84e3b395
Merge pull request #46151 from ellenhp/fix_spatial_player_play
Fix a pop on play() in AudioStreamPlayer2D and 3D
2021-02-18 10:12:13 +01:00
Ellen Poe 5e1442ad55 Fix pops in play() of both spatial audio players 2021-02-17 19:09:42 -08:00
Rémi Verschelde f91c4c0899
Merge pull request #46124 from angad-k/cpu-particles-3d-fix
CPUParticles3D crash fix
2021-02-17 16:15:22 +01:00
Angad Kambli c97fffdc59 add null check in _update_particle_data_buffer()
add check to see if p_order is in range for CPUParticles3D::set_draw_order'
2021-02-17 20:29:14 +05:30
Jitesh c3be0c2c04 Add animation_finished signal and fix frame_changed signal for AnimatedSprite3D
Fixes #40301.
Fixes #45947.
2021-02-17 15:13:47 +01:00
Aaron Franke 7d9ad2b845
Use Vector3.UP as a default value for look_at's up vector 2021-02-16 18:33:23 -05:00
Rémi Verschelde c7444b033e
Merge pull request #46040 from ellenhp/fix_seek_playback_pos
Return setseek position if one exists in get_playback_position.
2021-02-16 12:19:09 +01:00
Rémi Verschelde 3f6295a1ed
Merge pull request #45855 from hoontee/fix-45718
Implement CollisionPolygon3D margin
2021-02-15 11:23:15 +01:00
Ellen Poe 15b8480b2c Return setseek position if one exists in get_playback_position. 2021-02-14 20:41:59 -08:00
Rémi Verschelde e9a25b8552
Merge pull request #45859 from Kayomn/master
Accomodate blend shape ranges of -1 to +1 for Vulkan
2021-02-12 09:26:14 +01:00
hoontee fbb1ef759c Implement CollisionPolygon3D margin 2021-02-11 11:58:37 -06:00
reduz 1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
Rémi Verschelde e8f73124a7
Merge pull request #45845 from qarmin/cppcheck_scene_2
Initialize class variables with default values in scene/ [2/2]
2021-02-10 20:06:12 +01:00
reduz 8b19ffd810 Make Servers truly Thread Safe
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread).
-RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault.
-Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory).
-3D physics server changed to be made multithread friendly.
-Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads.
-Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
2021-02-10 13:21:46 -03:00
Kayomn ca945421a0 Accomodate blend shape ranges of -1 to +1 2021-02-09 23:09:54 +00:00
Rafał Mikrut 7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
Rémi Verschelde 74be478895
Merge pull request #45774 from revilo/fix-45694
Bugfix: Update transform of collision shape on NOTIFICATION_PARENTED …
2021-02-08 21:32:49 +01:00
Rafał Mikrut 003bb8e1a8 Initialize class variables with default values in scene/ [1/2] 2021-02-07 22:29:31 +01:00
Rafał Mikrut 1b8cbcf946 Fix nan errors when using VehicleBody 2021-02-07 21:08:09 +01:00
Oliver Dick f1432f2788 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 20:17:01 +01:00
reduz 8faf23b52b Simplify Volumetric Fog
-Always use temporal reproject, it just loos way better than any other filter.
-By always using termporal reproject, the shadowmap reduction can be done away with, massively improving performance.
-Disadvantage of temporal reproject is update latency so..
-Made sure a gaussian filter runs in XY after fog, this allows to keep stability and lower latency.
2021-02-06 15:08:21 -03:00
Rémi Verschelde 69152af45d doc: Don't bind argument names with p_ prefix
This prefix is used in the C++ codebase, not in the scripting API.
2021-02-04 14:45:06 +01:00
Rémi Verschelde 7185a7c3c2
Merge pull request #45496 from Chaosus/fix_particles
Fix particles not properly updated by their lifetime
2021-02-03 15:50:52 +01:00
Rémi Verschelde d2e1216504
Merge pull request #37547 from aaronfranke/tau
Use Math_TAU and deg2rad/etc in more places and optimize code
2021-02-01 20:55:25 +01:00
Rémi Verschelde 3375647818
Merge pull request #45564 from aaronfranke/physics-nodes-real_t
Use real_t in physics nodes
2021-02-01 20:48:16 +01:00
Rémi Verschelde 5525cd85c6
Merge pull request #45315 from RandomShaper/modernize_thread
Modernize Thread
2021-01-31 15:24:56 +01:00
Aaron Franke 9199a681de
Use real_t in physics nodes 2021-01-29 19:59:58 -05:00
Pedro J. Estébanez 99fe462452 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-01-29 12:02:13 +01:00
kobewi 4d172f1fca Cache world in VisibilityNotifier3D to avoid crash 2021-01-27 21:02:33 +01:00
Yuri Roubinsky aefce8000d Fix particles not properly modified by their lifetime 2021-01-27 16:28:15 +03:00
Rémi Verschelde 8b8c630f60
Merge pull request #44814 from hoontee/fix-44714
Do not clear materials when setting mesh
2021-01-26 16:10:27 +01:00
reduz 6fe342478b Several GI related optimizations and fixes
-SDFGI direct light is done over many frames
-SDFGI Changed settings for rays/frame
-SDFGI Misc optimizations
-SDFGI Bug fix on probe scroll

-GIProbe was not working, got it to work again
-GIProbe dynamic objects were not working, fixed

-Added a half size GI option.
2021-01-24 19:29:07 -03:00
Rémi Verschelde b23f1a8d3e
Merge pull request #45267 from HipsterPenguin/BugFixing
Fixed 6DOF set/get check for the path starting with joint_constraints
2021-01-20 17:51:08 +01:00
reduz 099dee35f4 Added GPU based cluster builder
Clustering is now GPU based, uses an implementation based on the Activision algorithm.
2021-01-19 23:31:06 +01:00
HipsterPenguin 6bf46cf70f Fixed 6DOF set/get check for the path starting with joint_constraints
New code checks whether or not property has joint_constraints as the first part of its path.
2021-01-19 06:40:06 -06:00
Rémi Verschelde b4020d3c27
Merge pull request #45197 from nekomatata/improved-raycast-node-render-debug
Improve Raycast3D render debug
2021-01-15 16:50:57 +01:00
Rémi Verschelde 8cd11032fb
Merge pull request #38562 from Calinou/3d-light-size-property-hint
Tweak the 3D light size property to only allow reasonable values
2021-01-15 16:21:53 +01:00
Rémi Verschelde fa5ead4db7
Merge pull request #42713 from madmiraal/fix-42614
Update area-body_shape_entered-exited signal documentation.
2021-01-15 13:00:23 +01:00
PouleyKetchoupp 9e660475a7 Improve Raycast3D render debug
Fix Raycast3D node render debug not showing in editor camera preview.

Use dynamic mesh update to change the ray on-the-fly without too much
extra cost when collision debug is enabled.

Fixes #43571
2021-01-14 15:52:01 -07:00
Marcel Admiraal 95020d3e38 Fix not clearing a Joint3D with only a B node when removing the B node 2021-01-13 18:58:05 +00:00
Rémi Verschelde 0b409d89d0
Merge pull request #45136 from akien-mga/clang-format-11
CI: Update to clang-format 11 and apply ternary operator changes
2021-01-13 16:10:44 +01:00
Rémi Verschelde af878716f2
CI: Update to clang-format 11 and apply ternary operator changes 2021-01-12 19:32:53 +01:00
PouleyKetchoupp 4b43cd17c5 Fix collision shape update when changing shape properties
This change does two things:

1. Properly update the internal shape data using _update_in_shape_owner
when updating a shape (in 2D it was resetting one way collision)

2. Avoid unnecessary updates when calling set_shape with the same shape,
which happens each time a shape property is modified
(e.g shape.extents.x = ...)

Fixes #45090
2021-01-12 10:28:20 -07:00
Marcel Admiraal 5fa12da6f9 Rename the final parameter of area_shape_entered-exited local_shape. 2021-01-09 13:34:59 +00:00
Aaron Franke 1d5042c9e2
Use Math_TAU and deg2rad/rad2deg in more places and optimize code 2021-01-09 03:47:14 -05:00
Rémi Verschelde b5334d14f7
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 🎆
2021-01-01 20:19:21 +01:00
Marcel Admiraal 026aa4381d Add signal to inform joint that body has exited tree 2020-12-31 16:19:57 +00:00
hoontee 6e2a55c464 Do not clear materials when setting mesh 2020-12-30 11:02:01 -06:00
Rémi Verschelde 058f3fe069
Merge pull request #44149 from madmiraal/rename-tangent-orthogonal
Rename Vector2.tangent() to Vector2.orthogonal()
2020-12-28 16:00:12 +01:00
Rémi Verschelde 8f4c4bb610
Merge pull request #44434 from madmiraal/rename-camera3d-near-and-far
Rename Camera3D near and far getters and setters
2020-12-28 14:57:31 +01:00
Rémi Verschelde e4c0572385
Merge pull request #44593 from madmiraal/rename-mainloop-methods
Rename MainLoop methods to match Node methods
2020-12-28 14:44:28 +01:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Rémi Verschelde b233f23c37
Merge pull request #44535 from Demindiro/fix-joint-rid-not-passed
Fix joint RID not being passed to _set in PhysicalBone
2020-12-23 16:08:06 +01:00
Marcel Admiraal d9e9eb8d04 Rename MainLoop methods to match Node methods 2020-12-22 12:34:57 +00:00
David Hoppenbrouwers 41e00b6787
Fix joint RID not being passed to _set in PhysicalBone
Also remove default RID() argument from JointData._set()
2020-12-22 13:20:34 +01:00
Marcel Admiraal fdf92ca298 Rename XRPositionalTracker methods
Renames:
- set_type() -> set_tracker_type()
- set_name() -> set_tracker_name()
- get_tracks_orientation() - `is_tracking_orientation()
- get_tracks_position() -> `is_tracking_position()
- get_hand() -> get_tracker_hand()
- set_hand() -> set_tracker_hand()
2020-12-21 06:32:53 +00:00