Commit graph

3892 commits

Author SHA1 Message Date
Rémi Verschelde 9990f28d84
Merge pull request #49026 from sarchar/multiple-dns-resolves 2021-06-01 18:41:41 +02:00
Rémi Verschelde c5f237eaf8
Merge pull request #45393 from Paulb23/code_edit_autocomplete 2021-06-01 17:58:19 +02:00
Fabio Alessandrelli d779b5aa3e [Net] Refactor RPCs, remove RSETs
In this PR:
- Removed rset
- rpc_config can now optionally configure transfer mode
  (reliable/unreliable/ordered) and channel (channels are not actually
  implemented yet.)
- Refactor how the RPC id is computed to minimize the logic in Node and
  scripts that now only needs a single `get_rpc_methods` function.
2021-06-01 17:24:21 +02:00
Paulb23 168427624e Update String/Comment, autocomplete and hints docs 2021-06-01 16:14:03 +01:00
Rémi Verschelde 0286495f59
Merge pull request #49024 from groud/restore_tilemap_show_debug
Restore TileMap's debug collision shapes and add navigation.
2021-06-01 12:51:28 +02:00
Rémi Verschelde 4c1d555b9a
Merge pull request #48770 from LightningAA/scrollcontainer-ensure-item-visible-4.0
ScrollContainer: Expose `_ensure_focused_visible` to the scripting API and rename it to `ensure_control_visible`
2021-06-01 11:01:40 +02:00
Chuck dd8fa11ac1 Support multiple address resolution in DNS requests
Add two new functions to the IP class that returns all addresses/aliases associated with a given address.

This is a cherry-pick merge from 010a3433df which was merged in 2.1, and has been updated to build with the latest code.

This merge adds two new methods IP.resolve_hostname_addresses and IP.get_resolve_item_addresses that returns a List of all addresses returned from the DNS request.
2021-06-01 11:24:34 +07:00
Lightning_A 6d5b5ba89f ScrollContainer: Expose _ensure_focused_visible to the API
Was renamed to `ensure_control_visible`
2021-05-31 17:14:57 -10:00
Rémi Verschelde 643da45e16
Merge pull request #49173 from KoBeWi/navigational_oblivion
Tweak arguments of list_dir_begin() (skips navigational and hidden files by default)
2021-05-31 14:33:58 +02:00
Rémi Verschelde c9ce5367e3
Merge pull request #49213 from Calinou/doc-resource-duplicate-copy-export-only
Document `Resource.duplicate()` only copying exported variables' values
2021-05-31 13:42:09 +02:00
Rémi Verschelde 4e3d5148ff
Merge pull request #49157 from Chaosus/vs_billboard
Added Billboard Node to Visual Shaders
2021-05-31 12:23:01 +02:00
kobewi bd50006aae Tweak arguments of list_dir_begin() 2021-05-31 12:16:26 +02:00
reduz 0d2e02945b Implement shader caching
* Shader compilation is now cached. Subsequent loads take less than a millisecond.
* Improved game, editor and project manager startup time.
* Editor uses .godot/shader_cache to store shaders.
* Game uses user://shader_cache
* Project manager uses $config_dir/shader_cache
* Options to tweak shader caching in project settings.
* Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled).
* Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated).
* Added shader compression with SMOLV: https://github.com/aras-p/smol-v
2021-05-31 10:13:09 +02:00
Hugo Locurcio 2ba893e3ce
Document Resource.duplicate() only copying exported variables' values 2021-05-31 00:11:38 +02:00
Yuri Roubinsky f06db8b778 Added Billboard Node to Visual Shaders 2021-05-28 09:24:06 +03:00
Marcel Admiraal 89e4917214 Update EditorResourcePreview queue_*() documentation 2021-05-26 08:39:40 +01:00
Rémi Verschelde 6a64a98039
Merge pull request #48546 from pycbouh/tree-highlight-selected-relationships 2021-05-25 19:42:55 +02:00
Rémi Verschelde 554382d8ad
Merge pull request #49068 from pycbouh/i-broke-inspector
Make `EditorFileDialog` only created on demand in `EditorResourcePicker`
2021-05-25 18:07:05 +02:00
Yuri Sizov 9c92e9d849 Add highlight to the relationship lines of selected Tree items 2021-05-25 18:56:06 +03:00
Yuri Sizov c8551b0eda Make EditorFileDialog only created on demand in EditorResourcePicker 2021-05-25 18:38:19 +03:00
Marcel Admiraal da5d7db610 Rename File::get_len() get_length() 2021-05-25 11:54:28 +01:00
Gilles Roudière 3b35733b4c Restore a way to show collsion/navigation on TileMap.
Also remove an unused function.
2021-05-25 11:51:15 +02:00
Rémi Verschelde af03e9c830
Merge pull request #48939 from Calinou/screen-orientation-use-enum
Use an enum to represent screen orientation in the Project Settings
2021-05-24 19:53:19 +02:00
Hugo Locurcio 660952a857
Use an enum to represent screen orientation in the Project Settings
- Tweak the setting property hint to be more informative.
- Make the setting a "basic" setting so it appears when Advanced Settings
  is disabled.
- Remove redundant orientation setting in the iOS export preset.
  The project setting is now used (like on Android).

Projects upgrading from a previous version will have to set the
screen orientation again in the Project Settings if it wasn't set
to the default value ("landscape").
2021-05-24 18:53:10 +02:00
Rémi Verschelde 6894559fb7
Merge pull request #49034 from madmiraal/fix-doc-2177
Unexpose methods and property for binding children to Bones in Skeleton3D
2021-05-24 18:34:57 +02:00
Marcel Admiraal 65faa12fd3 Unexpose methods and property for binding children to Bones 2021-05-24 16:44:17 +01:00
Rémi Verschelde 62efa30ed2
OS: Better validation of invalid input for get_unix_time_from_datetime
Default missing keys to Unix time 0 (1970-01-01 at 00:00:00 UTC).
Abort if year <= 0, this is not supported by the current algorithm.

Prevents an infinite loop further down.

Fixes #49022.
2021-05-24 13:37:36 +02:00
Rémi Verschelde 9cf1d034a7
Merge pull request #48894 from reduz/gpu-particles-2d-2
Support for 2D particles to collide against SDF
2021-05-24 12:49:34 +02:00
reduz 789713b008 Support for 2D particles to collide against SDF
-Added SDF collision support for 2D particles
-Changed the SDF generation to be fully signed
2021-05-23 16:43:36 -03:00
kobewi 5605454981 Change frame_coords to Vector2i 2021-05-23 21:38:27 +02:00
Hugo Locurcio 80f4e407b2
Add a keyboard shortcut to select the word under cursor in TextEdit
This also acts as a general-purpose "deselect" shortcut since pressing
it a second time will deselect text.

This is available both in the script editor and in TextEdit fields
in use, both in the editor and projects.

The Duplicate Line script editor shortcut was moved to Ctrl + Shift + D
since it conflicts with the new shortcut (Ctrl + D). The rationale for
doing so is that Duplicate Line is a less commonly used action, and
its behavior can be replicated by copying and pasting the current line
anyway. (With no selection active, the whole line will be copied.)
2021-05-22 23:47:43 +02:00
Paulb23 00e10a842f Add custom background line colour to TextEdit and remove marked lines 2021-05-22 14:41:55 +01:00
Rémi Verschelde 3b3a55ca04
Merge pull request #48918 from groud/fix_tilemap_y_sort
Fixes TileSet Y-sort not working and TileSet not saving correctly
2021-05-22 00:26:36 +02:00
Fabio Alessandrelli fdf66a21f1 [HTML5] Add easy to use download API.
New `JavaScript.download_buffer` method to create a prompt that let the
user download a file.
2021-05-21 15:31:23 +02:00
Rémi Verschelde d3ba922ba8
Merge pull request #48854 from pycbouh/editor-reuse-resource-picker
Use `EditorResourcePicker` in the Inspector
2021-05-21 12:03:27 +02:00
Gilles Roudière 7d80480b72 Fixes TileSet Y-sort not working and TileSet not saving correctly 2021-05-21 10:13:37 +02:00
Tomasz Chabora b1859510ab Change behavior of String.right 2021-05-20 23:07:57 +02:00
Rémi Verschelde aa5552278d
Merge pull request #48719 from Faless/js/4.x_interfaces
[HTML5] Implement Godot <-> JavaScript interface.
2021-05-20 17:13:02 +02:00
Hugo Locurcio 12462d9055
Rename File's endian_swap to big_endian
This new name is more consistent with ResourceSaver and StreamPeer.
2021-05-20 14:58:03 +02:00
Fabio Alessandrelli 9811035ebf [HTML5] Implement Godot <-> JavaScript interface. 2021-05-20 14:33:18 +02:00
Rémi Verschelde a6a75e2c09
Merge pull request #48812 from groud/tilemap_scenes_painting
Implement scenes tiles in TileMaps
2021-05-20 14:32:40 +02:00
Rémi Verschelde db4cf63482
Merge pull request #48860 from JohnM666/fix-basis-variant-initialization
Fix RigidBody3D.get_inverse_inertia_tensor() crash
2021-05-20 14:05:29 +02:00
Gilles Roudière d8bb53cd21 Implement scenes tiles in TileMaps 2021-05-20 13:12:03 +02:00
Rémi Verschelde 4219a4cb6f
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:38:56 +02:00
Fabio Alessandrelli e858f7c2ea [Doc] Remove reference to UNIX sockets in StreamPeer.
That class can be used as a base to implement them, but there is no
actual implementation for it in Godot.
2021-05-20 11:25:47 +02:00
JohnM666 b19544e91d Fix #46282 Executing RigidBody3D.get_inverse_inertia_tensor() crashes Godot 2021-05-20 10:46:24 +03:00
kleonc 99173fb0d7 Document valid range of Node2D.z_index 2021-05-20 01:22:13 +02:00
Yuri Sizov e9206a55ea Use EditorResourcePicker in the Inspector 2021-05-19 21:39:15 +03:00
Rémi Verschelde 896d84bd15
Merge pull request #48827 from Rhathe/set_iterations_master
Enable setting of collision iterations in PhysicsServer2D
2021-05-19 19:47:59 +02:00
Rhathe 88b1802132 Enable setting of collision iterations in PhysicsServer2D
This allows fine-tuning of collision iterations for more
accurate collision physics with a performance cost.
2021-05-19 10:54:10 -04:00
Rémi Verschelde d0aaf4a1fd
Merge pull request #48814 from Calinou/viewport-use-nonzero-default-size
Use a non-zero default size for SubViewports
2021-05-19 10:12:42 +02:00
Rémi Verschelde c340ed6394
Merge pull request #42742 from madmiraal/fix-12215
Return RID instead of Object id in area-body_shape_entered-exited signals.
2021-05-18 20:00:48 +02:00
Hugo Locurcio bbdfb715a6
Use a non-zero default size for SubViewports
This makes viewports visible out of the box.
2021-05-18 18:51:39 +02:00
Aaron Franke ab674a41aa
Area: Uncap the range for gravity and change the slider hints 2021-05-18 07:17:11 -04:00
Rémi Verschelde b2fb119c53
Merge pull request #36263 from Calinou/increase-default-2d-gravity 2021-05-18 10:54:47 +02:00
Rémi Verschelde 66dac8bda0
Merge pull request #47544 from pycbouh/control-expose-theme-type 2021-05-18 10:52:51 +02:00
Rémi Verschelde 95bb7207f3
Merge pull request #46773 from trollodel/TreeItem+
Improve TreeItem API and allow to move nodes
2021-05-18 10:49:45 +02:00
Rémi Verschelde 510030fedc
Merge pull request #48528 from sent44/textedit
Expose get_total_visible_rows method to GDScript
2021-05-18 09:06:24 +02:00
trollodel bca0d36fe6 Improve TreeItem API and allow to move nodes 2021-05-17 22:06:46 +02:00
Rémi Verschelde b3e3f0e34c
Merge pull request #48599 from Calinou/textedit-alt-scroll-faster
Scroll faster when holding Alt in TextEdit (and script editor)
2021-05-17 17:38:18 +02:00
Rémi Verschelde 6c367f8e0d
Merge pull request #48168 from LightningAA/control-to-ctrl-4.0 2021-05-17 17:38:02 +02:00
Rémi Verschelde fead3fff17
Merge pull request #47260 from pycbouh/editor-resource-picker 2021-05-17 17:33:59 +02:00
Yuri Sizov 9eaa139c1f Add theme_custom_type property to Control and Window 2021-05-17 17:20:42 +03:00
pycbouh e8f15f7996 Add EditorResourcePicker control based on the Inspector editor for Resources
Fix formatting for the docs
2021-05-17 15:26:22 +03:00
Rémi Verschelde 37c3b33253
Merge pull request #48605 from sent44/scripteditor_get_codeedit
Add `get_base_editor` to `ScriptEditorBase`
2021-05-16 23:06:01 +02:00
Rémi Verschelde 8e7b17429e
Merge pull request #48650 from AnilBK/graph-node-setters
Added GraphNode missing setters.
2021-05-16 17:37:12 +02:00
sent44 2b30728ebf Add get_base_editor to ScriptEditorBase 2021-05-15 18:47:00 +07:00
Rémi Verschelde a3dd18b12e
Merge pull request #39976 from aaronfranke/tilemap-vec2i
Update TileMap to use Vector2i
2021-05-13 14:48:16 +02:00
Anilforextra 2c3c3b2829 -Added missing setters to GraphNode.
-Improved various GraphNode documentation.
2021-05-13 17:45:07 +05:45
Hugo Locurcio 5895479a5e
Rename the audio FFT_Size enum to FFTSize for consistency 2021-05-13 02:42:49 +02:00
PouleyKetchoupp 3877ed73d0 Dynamic BVH broadphase in 2D & 3D Godot Physics
Port lawnjelly's dynamic BVH implementation from 3.x to be used in
both 2D and 3D broadphases.

Removed alternative broadphase implementations which are not meant to be
used anymore since they are much slower.

Includes changes in Rect2, Vector2, Vector3 that help with the template
implementation of the dynamic BVH by uniformizing the interface between
2D and 3D math.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2021-05-10 16:28:55 -07:00
Hugo Locurcio cf1cf6c6eb
Scroll faster when holding Alt in TextEdit (and script editor)
This feature is inspired by a similar feature found in
Visual Studio Code.
2021-05-10 01:27:54 +02:00
Hugo Locurcio 7350f90c57
Document caveats of OS.get_unique_id() 2021-05-09 13:23:53 +02:00
TwistedTwigleg 446460eaf9 Fixes the SkeletonIK twisting issue by using the skeleton global pose without overrides 2021-05-08 16:11:45 -04:00
Aaron Franke 75e3f6b732
Update TileMap to use Vector2i instead of two ints 2021-05-07 16:20:02 -04:00
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Rémi Verschelde ee44982c45
Merge pull request #48538 from akien-mga/remove-native-video-api
OS: Remove native video API only implemented on iOS
2021-05-07 21:22:41 +02:00
Rémi Verschelde c3f7465b7e
Merge pull request #48535 from groud/tiles_squashed
TileSet and TileMap rework (squashed)
2021-05-07 20:46:06 +02:00
Rémi Verschelde 35ec0e9be7
OS: Remove native video API only implemented on iOS
See discussion in #43811, it was only implemented on iOS and even that
implementation was fairly limited. This would best be provided as plugins
for Android and iOS without cluttering the shared OS API.
2021-05-07 20:40:24 +02:00
Gilles Roudière a3dda2df85 Rework the TileSet resource and TileMap nodes:
- Move most properties from TileMap to TileSet,
- Make TileSet more flexible, supporting more feature (several
  collision layers, etc...),
- Fusion both the TileMap and TileSet editor,
- Implement TileSetSources, and thus a new way to index tiles in the TileSet,
- Rework the TileSet and TileMap editors completely,
- Implement an editor zoom widget (and use it in several places)
2021-05-07 18:06:17 +02:00
sent44 7bb12b0d6d Expose get_total_visible_rows as get_visible_line_count 2021-05-07 20:54:05 +07:00
kobewi a95c953c48 Improve docs for filter map and reduce 2021-05-07 14:09:44 +02:00
Rémi Verschelde bcbd480c32
Merge pull request #45144 from dalexeev/color-consts
Rename color constants (alternative)
2021-05-07 12:22:49 +02:00
Rémi Verschelde 3a5310ccb9
Merge pull request #35992 from Calinou/main-run-args-command-placeholder
Implement the `%command%` placeholder in the Main Run Args setting
2021-05-07 00:43:45 +02:00
Hugo Locurcio ce4aa07276
Implement the %command% placeholder in the Main Run Args setting
This can be used to tell Godot to run an executable that will run Godot
rather than running Godot directly. This is useful to make Godot start
on the dedicated GPU when using a NVIDIA Optimus setup on Linux:
`prime-run %command%`

The `editor/run/main_run_args` setting declaration was moved to make it
visible in the ProjectSettings documentation.
2021-05-07 00:05:02 +02:00
Rémi Verschelde 89e6f6ca2e
Merge pull request #48500 from groud/add_buttongroup_pressed_signal
Adds a pressed signal to ButtonGroup
2021-05-06 23:20:33 +02:00
Rémi Verschelde 01f80201bf
Merge pull request #38645 from KoBeWi/FMR
Add filter, map and reduce to Array
2021-05-06 20:44:01 +02:00
Gilles Roudière 323f176915 Adds a pressed signal to ButtonGroup 2021-05-06 12:16:27 +02:00
Hugo Locurcio 4a28f7e44f
Increase the default 2D gravity to 980.0
This makes 2D RigidBody physics feel less floaty out of the box.

This closes https://github.com/godotengine/godot-proposals/issues/98.
2021-05-05 22:49:06 -04:00
Hugo Locurcio 3f078c99f6
Rename IP_Unix, IP_Address and TCP_Server to remove underscores 2021-05-06 02:52:01 +02:00
Hugo Locurcio 87d107bb11
Increase the default AudioStreamPlayer3D unit size to 10
This makes it easier to hear sound while setting up the node.

Since this changes the default value, this may break existing projects
slightly.

This also tweaks the Unit Size editor property hint for better usability.

See discussion in #25468.
2021-05-06 02:45:46 +02:00
Hugo Locurcio b90adec417
Improve the AudioStreamPlayer(2D/3D) class descriptions 2021-05-05 20:39:36 +02:00
Tomasz Chabora c50acc7339 Add filter, map and reduce to Array 2021-05-05 15:54:57 +02:00
Rémi Verschelde e144ff0445
Merge pull request #48315 from nekomatata/expose-physics-debug-shape
Expose get_debug_mesh in Shape3D to scripting API
2021-05-05 15:17:36 +02:00
Rémi Verschelde d1801f976f
Merge pull request #48280 from Calinou/doc-file-open-compressed-godot-only
Document that `File.open_compressed()` can only open files saved by Godot
2021-05-05 15:16:23 +02:00
Rémi Verschelde c9e874b62d
Merge pull request #48442 from akien-mga/posmod-int64_t
Re-bind posmod, use int64_t instead of int
2021-05-04 15:15:52 +02:00
Rémi Verschelde ea9cab3e76
Merge pull request #48430 from reduz/add-rpc-to-callable
Add RPC support to Callable
2021-05-04 14:07:21 +02:00
Rémi Verschelde e196733e88
Re-bind posmod, use int64_t instead of int
Fixes #48420, fixes #48421.
The binding was missed when moving GDScript built-in to Global Scope it seems.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2021-05-04 13:25:08 +02:00
Rémi Verschelde 4e7ca279fc
Merge pull request #47855 from aaronfranke/doubleclick
Rename `doubleclick` to `double_click`
2021-05-04 13:12:17 +02:00
Rémi Verschelde 9a8ef54b5a
Merge pull request #48008 from LightningAA/scrollcontainer-hide-scrollbars-4.0
Add the ability to hide `ScrollContainer`'s scrollbars
2021-05-04 12:58:12 +02:00