Commit graph

6658 commits

Author SHA1 Message Date
Juan Linietsky
0e0ca01bce Properly report Callable bound arguments
Fixes #63213
Adds a function: Callable::get_amount_of_arguments_bound() to query this in callables. Exposed to the engine API.
2023-01-08 23:35:11 +01:00
smix8
9802914f97 Add NavigationServer Performance Monitor
Adds Performance Monitor for NavigationServer3D.
2023-01-08 22:58:21 +01:00
Rémi Verschelde
378d589e2d
Merge pull request #71037 from reduz/array-format-bitfield
Use BitField<> hint for Mesh.ArrayFormat and Control.SizeFlags
2023-01-08 22:51:03 +01:00
Rémi Verschelde
c3c5eceb35
Merge pull request #70463 from DarkKilauea/nav-server-const
[4.x] Rework const on NavigationServer methods
2023-01-08 22:50:05 +01:00
Rémi Verschelde
69fd2f3571
Merge pull request #71064 from DarkMessiah/expose_clear_tabs
Expose TabBar::clear_tabs to GDScript
2023-01-08 22:45:58 +01:00
Rémi Verschelde
1e32a286f3
Merge pull request #70281 from CherrySodaPop/get-impulse-3d
Implement collision impulse in Godot Physics 3D
2023-01-08 22:40:06 +01:00
Juan Linietsky
2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Juan Linietsky
47592927b3 Use BitField<> hint for ArrayFormat
This was missing in the conversion of bitflags to BitField<>.
2023-01-08 18:47:48 +01:00
Stanislav Labzyuk
436cd91065 Expose TabBar::clear_tabs to GDScript 2023-01-08 13:52:57 +01:00
Dawid Marzec
9eeed06e65 Expose Tree::deselect_all to GDScript 2023-01-08 12:41:27 +01:00
Lily Garcia
8ee6264cc9 Implement collision impulse in Godot Physics 3D 2023-01-07 22:34:28 -05:00
Josh Jones
a0715b30f9 Rework const on NavigationServer methods
`const` is used on all methods, even when they cause modification of the server.  This reworks the methods of the server to only use `const` on method that don't change the state of the server.
2023-01-07 17:29:00 -08:00
Rémi Verschelde
d642274f75
Merge pull request #70939 from bruvzg/win_screen_2
Add support for the custom initial screen for the main window, fix primary screen detection.
2023-01-07 13:21:36 +01:00
Rémi Verschelde
3579d7a9f7
Merge pull request #36301 from KoBeWi/daddy_node
Add reparent methods to Node
2023-01-07 13:20:56 +01:00
Rémi Verschelde
41b74c675f
Merge pull request #71000 from reduz/callable-bind-from-array
Allow binding Callable arguments from an array
2023-01-07 13:18:53 +01:00
Rémi Verschelde
0ab91b3d79
Merge pull request #70993 from rcorre/array-erase-doc
Warn against erasing array elements while iterating.
2023-01-07 13:18:16 +01:00
bruvzg
2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
Rémi Verschelde
bd15c3f80e
Merge pull request #71005 from dazKind/master
CodeEdit: Fix typo 'get_code_comletion_prefixes' -> 'get_code_completion_prefixes'
2023-01-06 22:56:44 +01:00
Rémi Verschelde
a12b326fab
Merge pull request #70995 from reduz/do-not-bind-variant-immutable
Unbind Variant methods that change immutable types.
2023-01-06 22:56:20 +01:00
Juan Linietsky
d762a0395a Allow binding Callable arguments from an array
Restores 3.x functionality that was removed in the Signal/Callable refactor of 4.0.

Fixes #64668.
Implements https://github.com/godotengine/godot-proposals/issues/6034

Usage:

```GDScript

callable.bindv([arg1,arg2,arg3])

```
2023-01-06 22:37:25 +01:00
Michael Bickel
5d09bf8f05 fix typo 'comleption' -> 'completion' 2023-01-06 19:52:19 +01:00
Juan Linietsky
576ae694e0 Unbind Variant methods that change immutable types.
Fixes #62706.
Code is commented instead of removed to clarify why they should not be re-added.
2023-01-06 17:17:43 +01:00
Ryan Roden-Corrent
1f6a5e8bb1
Warn against erasing array elements while iterating.
Erasing array elements while iterating does not appear to be safe.
For example, the following prints nothing:

```
var a := [0,1,2,3,4,5,6]
for i in a:
        if i % 2 == 0:
                a.erase(i)
        else:
                print(i)
```

While this is often true for array implementations, it still seems worth
documenting explicitly. I copied the wording from Dictionary.xml.
2023-01-06 08:21:01 -05:00
Yuri Rubinsky
f101add78b Add uint type support to visual shaders 2023-01-06 10:35:25 +03:00
Yuri Sizov
82c00c21e6 Simplify some editor plugin logic and remove dead code 2023-01-05 21:04:54 +03:00
Danil Alexeev
0d25d8e7fc
AnimatedSprite{2D,3D} improvements
* Add support for individual frame duration to `SpriteFrames`.
* Various minor improvements.
2023-01-05 13:13:25 +03:00
Rémi Verschelde
0160fea1ce
Merge pull request #70884 from clayjohn/Depth-prepass
Ignore depth draw optimization when using depth draw alpha prepass
2023-01-03 23:23:29 +01:00
Rémi Verschelde
565ae3b767
Merge pull request #67694 from aaronfranke/its-time
Remove duplicate Month and Weekday enums
2023-01-03 23:21:19 +01:00
clayjohn
062fb8b0dc Ignore depth draw optimization when using depth draw alpha prepass
This is necessary as the scene shader still uses alpha in this case so we can't discard fragments that weren't written to the depth buffer
2023-01-03 12:33:07 -08:00
Rémi Verschelde
f0893890e1
Merge pull request #70482 from bruvzg/ios_pencil
[iOS] Add Apple Pencil pressure and tilt support.
2023-01-03 15:51:39 +01:00
Rémi Verschelde
432c0dee7c
Merge pull request #70708 from rburing/bind_pin_joint_set_param_2d
Bind setter and getter for pin joint parameters in `PhysicsServer2D`
2023-01-03 12:39:43 +01:00
Rémi Verschelde
151e1355e8
Merge pull request #63650 from fabriceci/apply-moving-platform-angular-velocity
Allow to apply the angular velocity of a moving platform
2023-01-03 12:39:35 +01:00
Rémi Verschelde
4e360ac612
Merge pull request #70702 from vnen/gdscript-error-on-assign-void
GDScript: Error when assigning return value of void function
2023-01-03 12:23:00 +01:00
Ryan Roden-Corrent
53181e4090
Explain that Array.duplicate will not deep-copy Object.
This was somewhat implied by specifically calling out nested arrays and
dictionaries, but I was still unsure and had to test it myself.
One might expect that `Resource` objects, which have a `duplicate`
method, might be deep-copied.
2022-12-30 11:59:07 -05:00
George Marques
bc739a4687
GDScript: Make using return of void function an error
Remove the `VOID_ASSIGNMENT` warning since those cases will be errors
now.
2022-12-30 13:35:38 -03:00
Mikael Hermansson
ba8af83679 Bind methods related to physics query exclusions 2022-12-29 19:29:08 +01:00
Ricardo Buring
6bc313c765 Bind setter and getter for pin joint parameters in PhysicsServer2D 2022-12-29 17:36:08 +01:00
Hana
f130ad622a Add missing OptionButton method descriptions 2022-12-28 18:24:46 +01:00
Fabio Alessandrelli
615fd98620 [Web] Expose API to force file system sync.
Mostly useful for modules and extensions that can't use FileAccess to
write files.
2022-12-27 12:33:41 +01:00
Aaron Franke
8d7d1b0bb2
Remove duplicate Month and Weekday enums
Well, they were duplicately-exposed, but triplicately-defined.
2022-12-26 15:16:25 -06:00
Yuri Rubinsky
5be4c0b390
Merge pull request #70496 from Chaosus/astargrid_divide_heuristics 2022-12-24 13:00:55 +03:00
Yuri Rubinsky
16efd0b0fc Divide AStarGrid2D::default_heuristic into two different heuristics 2022-12-24 09:31:02 +03:00
Rémi Verschelde
d005293a34
Merge pull request #70477 from mihe/bind-joint-disable
Bind methods related to disabling collision between joint bodies
2022-12-23 23:43:18 +01:00
bruvzg
223a612c0c
[iOS] Add Apple Pencil pressure and tilt support. 2022-12-23 23:44:10 +02:00
Yuri Sizov
0369475773
Merge pull request #70441 from matt08-prog/doc-ArrayMesh
Clarify the description of ArrayMesh::regen_normal_maps
2022-12-23 21:17:01 +03:00
Mikael Hermansson
c1379523ea Bind methods related to disabling collision between joint bodies 2022-12-23 14:16:33 +01:00
Rémi Verschelde
1cab6c91e9
Merge pull request #69998 from BastiaanOlij/sorting-pivot-4
Added options for sorting transparent objects (port of PR #63040)
2022-12-23 09:47:24 +01:00
Bastiaan Olij
6f4f38db07 Added options for sorting transparent objects (port of PR 63040) 2022-12-23 19:30:33 +11:00
matt08-prog
f708684244 changed wording for ArrayMesh::regen_normal_maps' description 2022-12-23 00:30:13 -08:00
Rémi Verschelde
ecd895a860
Merge pull request #70278 from TokageItLab/add-animation-started-finished-signal-to-tree
Add `animation_started/finished` signals to `AnimationTree` and fix time accuracy in StateMachine
2022-12-23 09:08:17 +01:00
Rémi Verschelde
8eec9f7d3c
Merge pull request #69797 from TokageItLab/time-edit-inspector-plugin
Animation: Add inspector plugin for key time edit & Change `track_find_key()` argument to find key with approximate
2022-12-23 09:07:15 +01:00
Rémi Verschelde
9b4888b7c9
Merge pull request #65312 from SaracenOne/auto_advance_behaviour
Make auto-advance flag a requirement for conditional/expression evaluation
2022-12-23 09:05:49 +01:00
Rémi Verschelde
c2d8269a72
Merge pull request #70334 from Sauermann/fix-button-group-doc
Add configuration warning when ButtonGroup is used with non-toggleable buttons
2022-12-22 08:51:23 +01:00
Rémi Verschelde
4ba5289f91
Merge pull request #70413 from Koyper/rtl_rename_remove_line
[RTL] Rename remove_line() to remove_paragraph() for naming consistancy.
2022-12-22 08:51:13 +01:00
Markus Sauermann
e4e13a404d Add configuration warning when ButtonGroup is used with non-toggleable buttons
Also fix ambiguous documentation of ButtonGroup.
2022-12-22 06:59:47 +01:00
Silc Renew
060fb2d093 Add inspector plugin for key time edit & Change find key argument 2022-12-22 10:03:06 +09:00
Rémi Verschelde
b04bc49443
Merge pull request #68255 from jbcolli2/ColorPickerBug
Fixed Issue #68194 involving ColorPicker being allowed to align horizontally when it shouldn't
2022-12-21 22:25:14 +01:00
Rémi Verschelde
f5a6c9cf50
Merge pull request #62029 from Maran23/optional-default-value-project-settings
Allow to specify a default value in `ProjectSettings.get_setting()`
2022-12-21 22:23:43 +01:00
Marius Hanl
5aa243f9da Added the possibility to define a default value in ProjectSettings.get_setting(), which is used when no setting is set.
Also added tests for the project settings.

Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-12-21 19:49:57 +01:00
Rémi Verschelde
5ad02aa08d
Merge pull request #67111 from DarkKilauea/nav-queries-link
Added signal to NavigationAgent when entering a link
2022-12-21 19:38:20 +01:00
Koyper
e846b22da6 Renamed RTL remove_line() to remove_paragraph(). 2022-12-21 11:54:18 -06:00
Rémi Verschelde
9ccac04029
Merge pull request #69975 from YuriSizov/docs-area-nd-deserves-better
Improve signal documentation for Area2D/3D
2022-12-21 18:25:18 +01:00
Rémi Verschelde
6b4a01f99a
Merge pull request #69351 from smix8/gridmap_item_navigation_layers_4.x
Change GridMap navigation_layers to per mesh_library item
2022-12-21 09:21:21 +01:00
Rémi Verschelde
49ec96e346
Merge pull request #70367 from Chaosus/astargrid_get_point_pos
Add `get_point_position` method to `AStarGrid2D`
2022-12-21 09:21:13 +01:00
MrBlockers
569ead5762 Add optional arguments to AudioStreamRandomizer
Adds stream and weight parameters to add_stream. By default, weight is
1.0f.
2022-12-20 18:48:02 -05:00
Yuri Rubinsky
0bcbf8e00d Add get_point_position method to AStarGrid2D 2022-12-20 23:21:38 +03:00
smix8
61f33e205c Change GridMap navigation_layers to be per mesh_library item
Changes GridMap navigation_layers from a single bitmask for the entire GridMap to a bitmask for each item used in the mesh_library with a baked navmesh.
2022-12-20 20:51:32 +01:00
Silc Renew
4cd144d5fb Add animation_started/finished signals to AnimationTree 2022-12-21 01:20:22 +09:00
Rémi Verschelde
2a04b18d37
Merge pull request #70339 from Chaosus/astargrid2d_weight_scale
Restore weight scale for `AStarGrid2D` (partially)
2022-12-20 13:30:37 +01:00
Rémi Verschelde
f318d60e06
Merge pull request #65376 from reduz/astc-support
Implement basic ASTC support
2022-12-20 12:44:30 +01:00
Rémi Verschelde
08f6a46a8d
Merge pull request #70342 from twaritwaikar/fix-vcs-bindings
VCS: Fix GDExtension return types for VCS after Array type hardening
2022-12-20 12:43:15 +01:00
Juan Linietsky
71d21c7ccb Implement basic ASTC support
Implements basic ASTC support:
* Only 4x4 and 8x8 block sizes.
* Other block sizes are too complex to handle for Godot image compression handling. May be implemented sometime in the future.

The need for ASTC is mostly for the following use cases:
* Implement a high quality compression option for textures on mobile and M1 Apple hardware.
* For this, the 4x4 is sufficient, since it uses the same size as BPTC.

ASTC supports a lot of block sizes, but the benefit of supporting most of them is slim, while the implementation complexity in Godot is very high.
Supporting only 4x4 (and 8x8) solves the real problem, which is lack of a BPTC alternative on hardware where it's missing.

Note: This does not yet support encoding on import, an ASTC encoder will need to be added.
2022-12-20 11:26:30 +01:00
Twarit Waikar
18df2f36e8 VCS: Fix GDExtension return types for VCS after Array type hardening 2022-12-20 15:42:31 +05:30
Rémi Verschelde
5d97889d1a
Merge pull request #61239 from Calinou/tubetrailmesh-add-cap-properties
Add properties to disable top/bottom cap generation in TubeTrailMesh
2022-12-20 10:32:47 +01:00
Rémi Verschelde
923311dea0
Merge pull request #70303 from Calinou/doc-font-outlines-msdf
Document MDSF font outlines may require `msdf_pixel_range` adjustments
2022-12-20 10:32:32 +01:00
Rémi Verschelde
f1f6b35b8c
Merge pull request #70244 from DarkKilauea/nav-fix-abbrev-compat
[4.x] Fix typo and ensure backwards compatibility for changed property names
2022-12-20 10:32:26 +01:00
Yuri Rubinsky
8c478dcec9 Restore weight scale for AStarGrid2D (partially) 2022-12-20 12:22:32 +03:00
Josh Jones
0572346985
Fix typo and ensure backwards compatibility for changed property names
Changes to the name of the `navmesh` and `navpoly` properties on
`NavigationRegion` caused navigation data to be lost on load.
This PR creates uses `_set`/`_get` to handle compatibility with the
older names on load, preserving the data.

Also fixes a typo on `get_vertices_per_polygon` in `NavigationMesh`,
and renames the property to remove the `polygon_` prefix which doesn't
match the setter/getter.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-12-20 09:57:54 +01:00
Hugo Locurcio
6e330e8a75
Add properties to disable top/bottom cap generation in TubeTrailMesh
This can be used to improve generation and rendering performance,
or for certain special effects such as particle trails.
2022-12-19 17:29:32 +01:00
Hugo Locurcio
fcf54cabba
Document MDSF font outlines may require msdf_pixel_range adjustments 2022-12-19 17:17:45 +01:00
Rémi Verschelde
d124596862
Merge pull request #70263 from reduz/restore-rotation_degrees
Restore 'rotation_degrees' properties.
2022-12-19 16:28:44 +01:00
Rémi Verschelde
adc1096b19
Merge pull request #70219 from bruvzg/msdf_outline_scaling
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior.
2022-12-19 16:26:56 +01:00
Rémi Verschelde
845e655cba
Merge pull request #70285 from MuffinManKen/textserver-format_number-default-docs
Update documentation for TextServer.format_number() when language parameter is omitted
2022-12-19 16:26:45 +01:00
Rémi Verschelde
f29f3db419
Merge pull request #59682 from Sauermann/fix-following-viewport-transform
Include the follow-viewport-transform into CanvasLayer transform calculations
2022-12-19 16:26:19 +01:00
Juan Linietsky
80b578b060 Restore 'rotation_degrees' properties.
By popular demand, restoring the helper properties to rotate objects in degrees.
Affected are local and global rotations for:

* Node2D
* Node3D
* Control
2022-12-19 10:59:47 +01:00
Ken Paulson
f1d2194c04 Update documentation for TextServer.format_number() when language parameter is omitted. 2022-12-18 23:11:02 -05:00
Markus Sauermann
2da2220da7 Include the following-viewport-transform into CanvasLayer transforms
The following-viewport-transform was missing from several calculations
2022-12-18 22:44:34 +01:00
Josh Jones
5d8ba2b2d1 Add support for emitting a signal when entering a NavLink 2022-12-17 16:33:41 -08:00
Rémi Verschelde
0bb94df247
Merge pull request #70230 from DarkKilauea/nav-experimental
[4.x] Mark navigation classes and nodes as experimental
2022-12-18 00:31:27 +01:00
smix8
34e7628f5f Fix Navigation API abbreviations inconsistency
Schema for navigation to name user facing API with  "navigation" without abbreviation and e.g. NavigationServer internals with abbr "nav".
2022-12-17 22:06:22 +01:00
bruvzg
20d9457f9d
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior. 2022-12-17 22:47:54 +02:00
Rémi Verschelde
10bc1d8710
Merge pull request #30675 from zaksnet/link-button-link-prop
Add a `uri` property to `LinkButton`
2022-12-17 20:58:15 +01:00
Rémi Verschelde
d25a64ffca
Merge pull request #70204 from Calinou/ios-remove-disable-touch-setting
Remove Disable Touch debug project setting
2022-12-17 20:56:28 +01:00
Rémi Verschelde
a1f481a7d6
Merge pull request #70202 from Calinou/viewport-transparent-background-rename-project-setting
Move transparent background project setting to a subsection
2022-12-17 20:56:19 +01:00
Josh Jones
32371906eb Mark navigation classes and nodes as experimental
The navigation team has some large changes planned for navigation in the 4.x timeframe, so marking these nodes as experimental to give users a heads up that the API may change in breaking ways.
2022-12-17 11:12:00 -08:00
Hugo Locurcio
70f6d42c92
Remove Disable Touch debug project setting
This project setting was only implemented and iOS and likely served
no purpose outside of debugging during development of engine features.

It was also located in a confusing location in the project settings
editor, as it was located below a root category (which appears in bold
and is normally not seen as clickable by users).
2022-12-17 18:47:29 +01:00
Hugo Locurcio
a3eac5fc7c
Move transparent background project setting to a subsection
This prevents the project setting from being located directly within
a root category, which is confusing from an UX perspective in the
project settings editor.
2022-12-17 18:45:21 +01:00
Zak
d73a9b56b0
Add uri property for LinkButton
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-12-17 15:27:33 +01:00
Rémi Verschelde
7972107c48
Merge pull request #70114 from clayjohn/custom-aabb
Expose GeometryInstance3D.custom_aabb property
2022-12-17 12:27:46 +01:00
Rémi Verschelde
ffed638cbc
Merge pull request #70116 from Calinou/vibrate-handheld-silence-warning
Silence `Input.vibrate_handheld()` warning as it's already documented
2022-12-16 13:47:11 +01:00