Commit graph

6694 commits

Author SHA1 Message Date
Hendrik Brucker
62278eb236 Rename (de)selected signals to node_(de)selected in GraphNode 2023-01-12 04:08:06 +01:00
smix8
594ffd2200 Tweak NavigationAgent2D defaults
Tweaks default values for NavigationAgent2D to work better out of the box within a new 2D project using default resolution.
2023-01-11 23:47:16 +01:00
Hugo Locurcio
86b8176864
Improve documentation for OS.read_string_from_stdin()
This makes it clearer that calls to this method are blocking.

The unused method parameter was also removed.
2023-01-11 19:57:25 +01:00
Yuri Sizov
2ac2db8de5
Merge pull request #71203 from smix8/nav_tutorial_class_doc_links_4.x
Add navigation tutorial links inside class doc
2023-01-11 16:31:03 +03:00
kobewi
da9396881e Split pause() from AnimationPlayer's stop() 2023-01-11 14:03:31 +01:00
Rémi Verschelde
9c02bf1b11
Merge pull request #70707 from mihe/bind-physics-exclude
Bind methods related to physics query exclusions
2023-01-11 10:36:53 +01:00
Rémi Verschelde
ff4d5e0a68
Merge pull request #71060 from ItsAleph/docs/improve-iea
docs: Improve `InputEventAction` reference
2023-01-11 09:48:47 +01:00
Rémi Verschelde
baae87e307
Merge pull request #71105 from reduz/unload-current-scene
Add SceneTree.unload_current_scene()
2023-01-11 09:46:33 +01:00
smix8
7506ecc5d9 Add navigation tutorial links inside class doc
Adds navigation tutorial links inside the class doc to the related and more detailed godot-docs pages.
2023-01-11 08:55:02 +01:00
Rémi Verschelde
cbe3841a43
Merge pull request #69724 from KoBeWi/VS100
Document all VisualShader nodes
2023-01-11 01:28:55 +01:00
Rémi Verschelde
5c6158fdfd
Merge pull request #71157 from reduz/fix-callable-get-bound-arguments
Fix Callable call error reporting.
2023-01-11 01:15:39 +01:00
Rémi Verschelde
54688a7535
Merge pull request #71127 from reduz/drag-forward-to-callables
Change set_drag_forwarding() to use callables.
2023-01-11 01:14:58 +01:00
Ricardo Buring
3efa105548 Add get_contact_impulse method to PhysicsDirectBodyState2D
This makes it consistent with 3D.
2023-01-10 23:28:02 +01:00
kobewi
f12abece27 Document all VisualShader nodes 2023-01-10 22:33:58 +01:00
weerdy15
5aadb1273b
docs: Improve InputEventAction reference
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-10 18:21:03 +01:00
Juan Linietsky
e6a4debede Change set_drag_forwarding() to use callables.
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
2023-01-10 14:09:24 +01:00
Juan Linietsky
e5f2c442c7 Add SceneTree.unload_current_scene()
Provides an obvious way to unload the currently loaded scene (which is nowhere to be found in the docs).
The SceneTree.change_scene_to() method must now always provide a valid PackedScene.

Fixes #63565.
2023-01-10 14:02:06 +01:00
Juan Linietsky
33d3b7eea7 Fix Callable call error reporting.
* Fix potential crash when using bind in `Variant::get_callable_error_text()`
* Properly compute bound arguments so they can be properly shown.
* Add a function to obtain the actual bound arguments.
2023-01-10 13:56:27 +01:00
Rémi Verschelde
e3a87641bd
Merge pull request #71147 from bruvzg/get_win
Add Node::get_window() method.
2023-01-10 10:52:12 +01:00
Rémi Verschelde
796690948f
Merge pull request #71022 from Sauermann/fix-captured-position-doc
Fix doc for position of captured mouse
2023-01-10 10:48:58 +01:00
Rémi Verschelde
2d2902b49b
Merge pull request #70745 from rcorre/array_dup_doc
Explain that Array.duplicate will not deep-copy Object.
2023-01-10 10:45:30 +01:00
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
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
Markus Sauermann
06f0184b63 Fix confusion about TreeItem.add_button ambiguity between id and index
A TreeItem button has an id and an index, which can be distinct.
This leads to confusion.

This PR documents the distinction between id and index.
2022-12-29 00:43:45 +01:00
Hana
f130ad622a Add missing OptionButton method descriptions 2022-12-28 18:24:46 +01:00
kobewi
f2367e0782 Retry loading addons after filesystem scan 2022-12-28 15:40:45 +01:00
kobewi
e9a659be5a Improve ResourcePreloader description 2022-12-28 14:19:55 +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