Commit graph

1778 commits

Author SHA1 Message Date
Haoyu Qiu
312ec612c7 Add autocompletion for AnimatedSprite.play() 2022-05-05 14:36:35 +08:00
Pawel Lampe
88d3f14697 Add ability to bake_navigation_mesh off thread.
This feature makes it possible to workaround problems such as:
 - long baking time due to heavy synchronization when parsing geometry
   from mesh instances
 - crash when freeing `NavigationMeshInstance` while baking
 - errors when actively baking node tree is being detached from the
   scene tree
2022-05-04 23:00:18 +02:00
Aaron Franke
fa7a7795f0
Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
Rémi Verschelde
931838b330
Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
Hugo Locurcio
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
Rémi Verschelde
4e06ce7840
Merge pull request #60655 from smix8/navigation_region_rid_4.x
Add get_region_rid() to NavigationRegion2D and NavigationRegion3D
2022-05-01 14:17:40 +02:00
bruvzg
0a0e94d996
Expose Label3D and Sprite*3D material render priority properties. 2022-04-30 15:09:30 +03:00
smix8
05d06b8957 Add get_region_rid() NavigationRegion2D and NavigationRegion3D
Add get_region_rid() to NavigationRegion2D and NavigationRegion3D
2022-04-30 13:27:30 +02:00
Rémi Verschelde
a817bd96c0
Merge pull request #59297 from fabriceci/fix-jitter-2D-slight-slope 2022-04-29 15:33:45 +02:00
Aaron Franke
1bf94dff3a
Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
bruvzg
be2ee9d277
[Label3D] Add offset property. 2022-04-28 21:23:15 +03:00
Rémi Verschelde
212989d467
Merge pull request #59438 from fabriceci/fix-move-and-collide-reported-collisions
Fix wrong collision reported on move_and_collide
2022-04-28 18:47:22 +02:00
Markus Sauermann
a793960a10 Fix cppcheck const parameters
Convert method signature parameters to const where it is possible

# Conflicts:
#	drivers/gles3/rasterizer_canvas_gles3.cpp
#	drivers/gles3/rasterizer_canvas_gles3.h
#	editor/plugins/animation_state_machine_editor.cpp
#	editor/plugins/animation_state_machine_editor.h
2022-04-28 11:35:39 +02:00
Rémi Verschelde
1737494479
Merge pull request #60321 from rburing/pathfollow_offset_yes_a_number 2022-04-27 13:27:19 +02:00
Rémi Verschelde
2890ac7100
Merge pull request #60319 from TokageItLab/implement-global-rest 2022-04-27 11:06:42 +02:00
Rémi Verschelde
8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
Rémi Verschelde
02bb8e948f
Merge pull request #60261 from fire-forge/theme-prop-renames 2022-04-25 16:20:19 +02:00
FireForge
3073b85de9 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
bruvzg
be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
bruvzg
de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
Silc 'Tokage' Renew
4d4ffa3a2c Implement global rest 2022-04-18 02:11:19 +09:00
Ricardo Buring
eb9157df23 PathFollow2D and PathFollow3D: don't set offset to NaN 2022-04-17 17:26:05 +02:00
Rémi Verschelde
d27f60f0e8
Merge pull request #60199 from akien-mga/color-clarify-srgb-linear-conversions 2022-04-13 13:41:21 +02:00
Rémi Verschelde
9b89c07075
Merge pull request #60034 from Calinou/camera-allow-lower-size 2022-04-13 12:48:08 +02:00
Rémi Verschelde
46ef52162e Color: Rename to_srgb/to_linear to include base color space
This helps reduce confusion around sRGB <> Linear conversions by making
both input and output color spaces explicit.
2022-04-13 11:45:52 +02:00
SaracenOne
f8cc2e054d Ensure gizmos are added to newly created Node3D-derivatives and silence error for attempting to create gizmos twice 2022-04-13 04:39:01 +01:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
Hugo Locurcio
2252663163
Allow size values as low as 0.001 in Camera3D's orthogonal/frustum mode
This allows for lower field of view (or higher zoom) in orthogonal
and frustum camera modes.

The property hint also allows setting the size with greater precision.
2022-04-08 18:49:45 +02:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Rémi Verschelde
26048c805b
Merge pull request #59331 from bartekd97/navigation-agent-layers 2022-04-01 13:35:51 +02:00
Rémi Verschelde
5149db8d85
Merge pull request #59644 from akien-mga/template-no-editor-dep 2022-03-28 23:35:51 +02:00
Rémi Verschelde
324215c485
Merge pull request #59525 from fire-forge/fix-group-names 2022-03-28 21:44:35 +02:00
Rémi Verschelde
45ec0e31c3 Remove last editor code dependencies in template build
SConstruct change also makes it possible to outright delete the `editor`
folder in a `tools=no` build, which we use in CI to ensure no invalid
cross-dependencies are added.
2022-03-28 21:13:01 +02:00
FireForge
88b09694e7 Fix inspector group name capitalization 2022-03-28 14:02:06 -05:00
Rémi Verschelde
7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
Rémi Verschelde
5371009d8e Object: Remove unused category boilerplate
We might want to re-add something like this if/when we find a good use case
for it and do the effort to categorize all objects in the API properly.

Until then, it's better to remove that boilerplate since it's not needed.

Closes #18711.
2022-03-26 15:46:01 +01:00
fabriceci
e2812fcb0f When only a recovery occurs, don't report a collision on move_and_collide 2022-03-23 10:24:35 +01:00
fabriceci
528dfbf63e Fix 2D jitter on slight slope 2022-03-21 09:08:52 +01:00
BARTEK-PC\Bartek
4972f1b864 Expose navigable layers for NavigationAgent2D/3D 2022-03-20 15:04:56 +01:00
Rémi Verschelde
acc9b5b390
Merge pull request #55399 from RPicster/particlesmaterial-sphere-emittershape
ParticleMaterial: Sphere emission shape emitting from the volume.
2022-03-18 08:21:59 +01:00
Hugo Locurcio
c45d2c242b Replace DirectionalLight3D's use_in_sky_only with sky_mode enum
3 options are available:

- Light and Sky (default)
- Light Only (new)
- Sky Only (equivalent to `use_in_sky_only = true`)

Co-authored by: clayjohn <claynjohn@gmail.com>
2022-03-17 14:00:02 -07:00
reduz
8b547331be Create GDExtension clases for PhysicsServer3D
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer

This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-15 18:39:31 +01:00
Rémi Verschelde
51bbcbdec2
Merge pull request #45263 from KoBeWi/😕 2022-03-15 13:18:27 +01:00
reduz
6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
kobewi
39d429e497 Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
2022-03-09 16:24:32 +01:00
fabriceci
7f47889a5f Avoid directional correction when the motion is downward 2022-03-09 13:45:42 +01:00
Rémi Verschelde
1561737055
Merge pull request #49447 from Calinou/remove-shadow-color-property
Remove unused `shadow_color` property from Light3D
2022-03-08 07:48:05 +01:00
reduz
ccd4cdfd8b Rename StreamTexture* to CompressedTexture*
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
2022-03-05 16:43:38 +01:00
Hugo Locurcio
aea104deb7
Remove unused shadow_color property from Light3D
This shadow color property was no longer effective since the shaders
were optimized to improve occupancy.
2022-03-04 23:12:18 +01:00
Rémi Verschelde
9c6b6ffe13
Merge pull request #58717 from CrezyDud/master 2022-03-04 18:04:19 +01:00
Rémi Verschelde
3078b92dff
Merge pull request #58512 from Calinou/light3d-add-distance-fade 2022-03-04 12:26:29 +01:00
MrSwedish
97c5fd17a7 Add linear_velocity and angular_velocity to PhysicalBone3D 2022-03-03 20:34:29 +01:00
Ricardo Buring
cb5bc58e81 Joint2D and Joint3D: make set_exclude_nodes_from_collision respect signals 2022-02-28 22:25:45 +01:00
Ricardo Buring
9e100c3e7a Joint2D and Joint3D: update joint on NOTIFICATION_POST_ENTER_TREE
This allows reparenting, etc.
2022-02-28 22:21:32 +01:00
Rémi Verschelde
f968c11b86
Merge pull request #58596 from rburing/joints_disconnect_connected_signals
`Joint2D` and `Joint3D`: disconnect only connected signals
2022-02-28 11:00:14 +01:00
Haoyu Qiu
3a439a9c03 Fix AnimatedSprite infinite loop 2022-02-28 16:00:45 +08:00
Ricardo Buring
184105e753 Joint2D and Joint3D: disconnect only connected signals 2022-02-27 16:55:57 +01:00
Hugo Locurcio
b1a295b739
Implement distance fade properties in OmniLight3D and SpotLight3D
This can be used to fade lights and their shadows in the distance,
similar to Decal nodes. This can bring significant performance
improvements, especially for lights with shadows enabled and when
using higher-than-default shadow quality settings.

While lights can be smoothly faded out over distance, shadows are
currently "all or nothing" since per-light shadow color is no longer
customizable in the Vulkan renderer. This may result in noticeable
pop-in when leaving the shadow cutoff distance, but depending on the
scene, it may not always be that noticeable.
2022-02-25 15:17:35 +01:00
Bastiaan Olij
a78a9fee71 Implementing OpenXR driver 2022-02-23 12:02:24 +01:00
Chris Bradfield
849d34ba8e Rename motion_velocity to velocity 2022-02-22 23:31:33 -08:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Rémi Verschelde
0f5455230c
Use switch consistently in _notification (scene folder) 2022-02-15 18:44:55 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Rémi Verschelde
1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde
25d4c14fef
Merge pull request #57627 from JFonS/occluder_improvements 2022-02-08 23:23:50 +01:00
Haoyu Qiu
bbcd9c5b97 Fix RayCast{2,3}D.clear_exceptions clears parent 2022-02-08 16:31:07 +08:00
jfons
dd970482c5 Improvements and fixes to occluders
Improvements:
* Occluder3D is now an abstract type inherited by: ArrayOccluder3D, QuadOccluder3D, BoxOccluder3D, SphereOccluder3D and PolygonOccluder3D. ArrayOccluder3D serves the same purpose as the old Occluder3D (triangle mesh occluder) while the rest are primitives that can be used to manually place simple occluders.
* Occluder baking can now apply simplification. The "bake_simplification_distance" property can be used to set a world-space distance as the desired maximum error, set to 0.1 by default.
* Occluders can now be generated on import. Using the "occ" and "occonly" keywords (similar to "col" and "colonly" for colliders) or by enabling on MeshInstance3Ds in the scene's import window.

Fixes:
* Fixed saving of occluder files after bake.
* Fixed a small error where occluders didn't correctly update in the rendering server.

Bonus content:
* Generalized "CollisionPolygon3DEditor" so it can also be used to edit Resources. Renamed it to "Polygon3DEditor" since it was already being used by other things, not just colliders.
* Fixed a small bug in "EditorPropertyArray" where a call to "remove" was left after the "remove_at" rename.
2022-02-07 13:04:51 +01:00
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Anilforextra
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Rémi Verschelde
f1bff648f2
Merge pull request #57355 from akien-mga/method-bindings-clearer-types 2022-02-01 14:24:35 +01:00
Nathan Franke
8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
Rémi Verschelde
1c6f0aa3a0
Merge pull request #56601 from Scony/fix-navigation-obstacle-errors 2022-01-28 23:25:55 +01:00
Rémi Verschelde
7072b359b4
Improve some method bindings to use specific Object subtypes
This was made possible by changes to `VariantCaster` which now make
it possible to pass any `Object`-derived type as pointer.
2022-01-28 15:07:22 +01:00
fabriceci
cc3c4d6323 Revert #53174 (applying the delta in move and collide), rename rec_vel to distance and improve the doc description 2022-01-26 23:09:30 +01:00
Haoyu Qiu
a775744742 Store ObjectID instead of raw pointer for Shape Owners 2022-01-25 17:16:06 +08:00
Rémi Verschelde
2255777fb9
Merge pull request #57144 from AnilBK/fix-pos-dragging 2022-01-24 21:32:38 +01:00
Anilforextra
80187b77a9 Node2D/Node3D: Fix Undraggable Position Property. 2022-01-25 00:52:11 +05:45
fabriceci
856142a97d rename free mode to floating mode 2022-01-24 15:19:43 +01:00
Rémi Verschelde
7e3b92f81f
Merge pull request #55360 from Calinou/rename-bake-mode-properties 2022-01-20 17:35:32 +01:00
Rémi Verschelde
dbab0a9487
Merge pull request #56740 from AnilBK/camera-pre-allocate 2022-01-13 11:13:31 +01:00
Anilforextra
8a9c9a67ef CameraMatrix: Pre-allocate Vector in get_projection_planes(). 2022-01-13 10:14:59 +05:45
Rémi Verschelde
929f483ca0
Merge pull request #55446 from Calinou/spritebase3d-remove-opacity 2022-01-12 16:49:57 +01:00
Rémi Verschelde
585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Arnav Vijaywargiya
0c46f73b5e Fixed incorrect property types 2022-01-11 17:17:11 +05:30
Anilforextra
c9f5d88f3a Use fill() to fill an entire image instead of setting pixels individually. 2022-01-08 17:43:15 +05:45
Pawel Lampe
9bda2d5859 Fix NavigationObstacle errors
* `NavigationObstacle2D` premature radius estimation (before entering the tree)
* `NavigationObstacle3D` premature radius estimation (before entering the tree)
2022-01-07 19:55:22 +01:00
SaracenOne
726fbb821b Fix incorrect default transform values on foreign 3D nodes 2022-01-06 15:52:22 +00:00
Rémi Verschelde
6af77c7b09
Merge pull request #53684 from TokageItLab/orthogonal-mode 2022-01-05 16:05:40 +01:00
Fernando Cosentino
ca79373d13
Added material_overlay property to MeshInstance3D
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 GeometryInstance3D
(and therefore MeshInstance3D), 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.
2022-01-05 11:47:51 +01:00
Rémi Verschelde
026de65e5f
Merge pull request #56491 from hinlopen/n3d-minor-improvement
Minor code improvements in Node3D
2022-01-05 08:49:11 +01:00
Stijn
805155e2f6 Minor code improvements in Node3D. Refactor Node3D::show/hide/set_visible to a shared implementation. 2022-01-04 23:22:49 +01:00
Rémi Verschelde
ba2bdc478b
Style: Remove inconsistently used @author docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00
Rémi Verschelde
eab30316ee
Merge pull request #55332 from Calinou/voxelgidata-tweak-default-dynamic-range
Decrease the default dynamic range in VoxelGIData to 2.0
2022-01-04 17:18:28 +01:00
Rémi Verschelde
851fb16350
Merge pull request #56305 from Calinou/rename-lod-threshold 2022-01-04 15:28:06 +01:00
JFonS
6c25d05f70
Merge pull request #55370 from Calinou/geometryinstance3d-lod-fade-node-configuration-warning
Emit node configuration warnings for GeometryInstance3D distance fade
2022-01-04 13:58:32 +01:00
Rémi Verschelde
2536d6ca20
Merge pull request #55331 from Calinou/voxelgidata-fix-dynamic-range-property 2022-01-04 09:59:26 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Hugo Locurcio
df09bc38cb
Rename Lod Threshold to Mesh Lod Threshold
This makes it more obvious that the setting only affects mesh LOD,
not manual (H)LOD achieved using visibility ranges.
2021-12-29 00:11:50 +01:00
Silc 'Tokage' Renew
61759da5b3 Fix some gizmo behavior to make more consistent 2021-12-25 03:24:04 +09:00