Commit graph

7432 commits

Author SHA1 Message Date
Rémi Verschelde
e63500344f
Merge pull request #71056 from marzecdawid/add-tree-deselect-all-to-gdscript
Expose Tree::deselect_all to GDScript
2023-01-10 10:44:31 +01:00
Markus Sauermann
31346211f2 Fix doc for position of captured mouse
The position is not at the center of the screen but of the window.
2023-01-10 10:26:14 +01:00
bruvzg
ca8b762797
Add Node::get_window() method. 2023-01-10 11:10:46 +02:00
Rémi Verschelde
be4e9dfeab
Merge pull request #69616 from reduz/change-uuid
Ability to change a resource UID from API
2023-01-09 23:08:18 +01:00
Fabio Alessandrelli
6b2abf4605
Merge pull request #70626 from Faless/web/4.x_expose_force_fs_sync
[Web] Expose API to force file system sync.
2023-01-09 21:18:47 +01:00
Juan Linietsky
07a964fce3 Ability to change a resource UID from API
* Works for text, binary and imported resources
* Allows better clean up of duplicate files.

TODO (future PRs):

* Use this API for assigning new UIDs to copied files.
* Use this API for UID conflict on FS scanning (if more than one file has the same UID, the newer one(s) should get assigned a different UID).
2023-01-09 18:52:00 +01:00
Yuri Rubinsky
87eafe48b8 Add few improvements for VisualShaderNodeParticleRandomness 2023-01-09 20:33:45 +03:00
Juan Linietsky
0e0a6bb39b
Removed unused property hints and Object::get_translatable_strings()
* Remove unused `EditorPropertyMember` and related hints, previouly used by
  VisualScript. Such logic should be implemented in the VS module itself.
* As the above broke compatibility with the VS module, clean up the other
  hacks that were still in core in support of VisualScript.
* `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's
  `get_translatable_strings()`, which is a legacy function not used anywhere.
  So both are removed.
* Reordered some usage flags after the above removal to minimize the diff.
* General clean up.

Fixes #30203.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-09 16:56:01 +01:00
Danil Alexeev
9b3da76640
Fix unpressable buttons 2023-01-09 12:17:48 +03:00
Rémi Verschelde
6a86dfad29
Fix typos with codespell
Also includes #71080.

Co-authored-by: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
2023-01-09 08:39:07 +01:00
Rémi Verschelde
31f94574d4
Merge pull request #70996 from reduz/properly-report-callable-bound-arguments
Properly report Callable bound arguments
2023-01-09 08:34:28 +01:00
Rémi Verschelde
e7905f4f48
Merge pull request #71045 from reduz/use-bitfield-in-core-types
Use BitField<> in core type masks
2023-01-09 08:33:26 +01:00
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
Rémi Verschelde
798582acf0
Merge pull request #65609 from dalexeev/animated-sprite
`AnimatedSprite{2D,3D}` improvements
2023-01-05 15:00:31 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01: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