Compare commits

...

350 Commits

Author SHA1 Message Date
Rémi Verschelde
b973f997ff Bump version to 3.3.3-stable
Thanks to all contributors! <3
2021-08-19 09:27:30 +02:00
Rémi Verschelde
6a2f135695 Update changelog for 3.3.3-stable 2021-08-19 09:27:19 +02:00
Aaron Franke
f799163914 [3.x] Improve the docs for the float type
(cherry picked from commit 02a94ee977)
2021-08-18 23:27:57 +02:00
Haoyu Qiu
dff81b25cd Fix TextEditor not checking Standard highlighter in non-English UI
When using non-English UI, there were `Index p_idx = -1 is out of bounds (items.size() = 2).`
errors on on startup if any text file is open in the script editor. And clicking the Standard
highlighter option does not check that menu item.

This is caused by `TextEditor` searching for that menu item with unlocalized text. As already
did in `ScriptTextEditor`, this PR stores and searches for menu item with `TTR`ed text.

(cherry picked from commit a66339a549)
2021-08-18 23:27:43 +02:00
ne0fhyk
a9bffd5878 Fix possible null pointer exception.
(cherry picked from commit e2bcdad43b)
2021-08-18 23:27:30 +02:00
LoipesMas
c55be95364 Epsilon check for angular velocity in BodySW
(cherry picked from commit 32965aa0ab)
2021-08-18 23:27:12 +02:00
Hugo Locurcio
62df64fe58 Fix Xbox controllers in Bluetooth mode on macOS
This prevents the D-pad up arrow from being registered as pressed
when it isn't, and pressing any direction from activating the next
arrow clockwise of it.

Co-authored-by: Scott Wadden <scott.wadden@gmail.com>
(cherry picked from commit f95035b80b)
2021-08-18 23:26:28 +02:00
Sushi
8b07d65701 Fix: Selection Only in Find/Replace now preserves selection
(cherry picked from commit a4d5664858)
2021-08-18 23:25:31 +02:00
Fabio Alessandrelli
2e8081cef2 Update Godot Javascript FS library to manually depend on ERRNO_CODES.
Fixes compatibility with Emscripten 2.0.26+.

(cherry picked from commit 71fb2429a0)
2021-08-18 23:24:03 +02:00
kobewi
f604b32081 Fix renaming directories
(cherry picked from commit 0dde3e5b59)
2021-08-18 23:23:39 +02:00
Gordon MacPherson
1b51ba0157 Fix github actions cache server being down failing builds
(cherry picked from commit 27da2e364e)
2021-08-18 23:22:55 +02:00
Rémi Verschelde
6bcd7f6b54 SCons: Fix potential error when pruning cache on CI
This could cause spurious errors on CI when trying to prune the cache,
as for some reason it tries to remove files/paths which do not exist.

That points at a bug in the `cache_progress` logic but at least this
workaround should prevent CI failures.

(cherry picked from commit 825b245f0d)
2021-08-18 23:22:52 +02:00
Rémi Verschelde
1aa7f05dd9 Merge pull request #48244 from qarmin/pin.3.3.project 2021-08-18 10:30:36 +02:00
Rémi Verschelde
3b65adb00f Merge pull request #51744 from ModProg/android-right-click-3.3
[3.3] [android] Fixed wrong button mask for right click
2021-08-17 12:49:28 +02:00
ModProg
2667261520 [android] Fixed wrong button mask for right click 2021-08-16 18:14:12 +02:00
Rémi Verschelde
f66ff33b25 Merge pull request #51719 from akien-mga/3.3-scoped-storage 2021-08-16 10:56:14 +02:00
Rémi Verschelde
f1bf894085 Android: Increase default armv7 NDK platform to 19
Following #50359 this is the new minSdk that we target.
Users can still override it in custom builds if they want to support SDK 18.
2021-08-16 10:12:43 +02:00
ne0fhyk
2eb8875b77 Add partial support for Android scoped storage.
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30.
In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.

(cherry picked from commit c88d1608ab)
2021-08-16 09:56:32 +02:00
Rafał Mikrut
654d892570 Pin Godot 3.3 to same version of test project in CI 2021-08-15 22:46:51 +02:00
Rémi Verschelde
7054f93e10 Update AUTHORS and DONORS list
New contributors added to AUTHORS:
angad-k, Bhu1-V, Blackiris, ellenhp, fabriceci, follower,
foxydevloper, Geometror, hilfazer, hoontee, Janglee123,
Razoric480, SirQuartz, theoway.

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit d8a8d32f2e)
2021-08-13 12:17:15 +02:00
kobewi
1f87904366 Don't save project on startup in headless or no-window mode
(cherry picked from commit ea2489ce93)
2021-08-13 12:17:15 +02:00
Raul Santos
f38abd593d Fix Path3D initial forward calculation
(cherry picked from commit 102ec1042b)
2021-08-13 12:17:15 +02:00
Raul Santos
32bbe644ca Fix forward calculation in PathFollow3D for the position at the end of the curve
(cherry picked from commit e23f6a5bba)
2021-08-13 12:17:15 +02:00
JestemStefan
86466737ff Added minimum scale for node 2D
(cherry picked from commit b7817c7b59)
2021-08-13 12:17:15 +02:00
Fredia Huya-Kouadio
1c8682aa78 Resolve issue where the Godot app remains stuck when resuming.
This was caused by the fact that a new instance of Godot was created at resume while a previous instance already existed.
The previous instance would then go through its cleanup lifecycle, and would thus attempt to close the entire app, leading to the system to restart the app, thus starting the cycle anew.
The fix involves reusing the previous instance of Godot if one is available instead of creating a new one, as well as giving control to the host activity for how the process should be terminated.

(cherry picked from commit 874aa1708f)
2021-08-13 12:17:15 +02:00
Hugo Locurcio
afefa8f70f Fix incorrect descriptions for EditorFileSystem's get_file_type()
(cherry picked from commit 1942e0c117)
2021-08-13 10:41:32 +02:00
Fredia Huya-Kouadio
d4eecf4535 Update external texture flag configuration.
(cherry picked from commit 2cc1cdc27b)
2021-08-13 10:41:19 +02:00
Max Hilbrunner
8c20e03150 Docs: Add warnings about no SSL/(D)TLS revocation
(cherry picked from commit 4eb427afb8)
2021-08-13 10:40:55 +02:00
Max Hilbrunner
0c6b5bdfeb Update bundled Mozilla X.509 CA root certificates
Updated to latest upstream changes (2021-07-05 21:36:52 GMT), taken from 8b263a18fc

(cherry picked from commit d9005912c1)
2021-08-13 10:39:56 +02:00
Yuri Roubinsky
a89346e227 Fix incorrect position of the created VisualShader nodes on zoomed graph
(cherry picked from commit 8249ae8085)
2021-08-13 10:39:21 +02:00
clayjohn
279af47ef9 Allow unclamped colors in Sprite3D
(cherry picked from commit f7dbcf95e1)
2021-08-13 10:39:03 +02:00
Hugo Locurcio
5da2675856 Clamp negative colors regardless of the tonemapper to avoid artifacts
Color artifacts could be visible when using negative lights with the
Filmic and ACES tonemapping operators, as these did not clamp negative
colors.

(cherry picked from commit 313527b3fa)
2021-08-13 10:38:06 +02:00
Rémi Verschelde
64af5e5db4 FileAccessWindows: Add missing share.h include
Follow-up to #51430.

(cherry picked from commit cb52f2c9c0)
2021-08-13 10:37:31 +02:00
Max Hilbrunner
be6712fb3d Fix Windows platform file access
This restores Windows platform file handling back to open files non-exlusively by default, as was the case before October 2018. (See b902a2f2a7)
Back then, while fixing warnings for MSVC, the function used for opening files was changed from _wfopen() to _wfopen_s() as suggsted by the warning C4996. ("This function may be unsafe, consider using _wfopen_s instead.")

This new function
1. did parameter validation and thus avoided some possible security issues due to nil pointers or wrongly terminated strings
2. it also changed the default file sharing for opened files from _SH_DENYNO (which was the implicit default for the previous _wfopen()) to _SH_SECURE.

_SH_DENYNO means every opened file could be opened by other calls (like is the default on other operating systems).
_SH_SECURE means if the file is opened with READ access, others can still read the same file, but if it is opened with WRITE access, others can't open it at all, not even to read.

This led to rarely occuring bugs on Windows, i.e. due to random access by Antivirus processes, or Godot/Windows not closing a file handle fast enough while trying to open it again elsewhere (i.e. project.godot, instead showing the Project manager, or saving shaders/debugging the game).

What this PR does it change the file access to a third method, _wfsopen(). This is still secure, doing parameter validation and thus avoids the warning, but it allows us to actually SET the file sharing parameter. And we set it to _SH_DENYNO, as it was implicitely before the change. (And as it currently is on all non-Windows platforms, where file sharing restrictions don't exist by default.)

Warning C4996 should really have been pointing this out. It should've been _wfsopen() all along. Let's hope this banishes those annoying, rare errors for all eternity.

Fixes #28036.

(cherry picked from commit b48cbb5da9)
2021-08-13 10:37:26 +02:00
Omar Polo
6cc9333fe8 automatically detect BSDs as platform=linuxbsd
(cherry picked from commit 78cd0ffdba)
2021-08-13 10:36:58 +02:00
Michael Alexsander
f20a2d3da7 Make property description in the animation editor actually show it
(cherry picked from commit bea868f750)
2021-08-13 10:36:58 +02:00
follower
1785d3e030 Fix Unicode URL link tags to render correctly.
Change incorrect `[/code]` closing tags to `[/url]` tags.

The `url` tags for the links to the Unicode code points information use `[/code]` rather than `[/url]` to close them.

This results in the links being rendered incorrectly in the IDE--the entire rest of the documentation for each method gets turned into a giant underlined link.

This issue was introduced in a2271ba3bd.

(cherry picked from commit b85688ac7d)
2021-08-13 10:36:58 +02:00
Sergey Minakov
ed5b7e38ce [iOS] Use platform generated api to initialize iOS plugins
(cherry picked from commit d48d7cc94f)
2021-08-13 10:36:58 +02:00
Yuri Sizov
2cf58509dd Improve the inspector plugin documentation and remove a confusing statement
(cherry picked from commit 974e76a082)
2021-08-13 10:36:57 +02:00
kleonc
5acfb5127c TileMap Fix trying to get data for tile not existing in attached TileSet
(cherry picked from commit 2eeed26d67)
2021-08-13 10:36:57 +02:00
Georg Wacker
eaf45d4f60 Fix vertical scroll/zoom for precision touchpad
Adds factor data for vertical mousewheel event, in line with horizontal mousewheel event

(cherry picked from commit 63ba15a518)
2021-08-13 10:36:57 +02:00
Hugo Locurcio
5b3f6a6d34 Point at software OpenGL when OpenGL fails to initialize on X11
(cherry picked from commit 8fbdcb6fea)
2021-08-13 10:36:57 +02:00
Francois Belair
520fa45f0d Fix LSP parsing get_node only from the scene root
(cherry picked from commit 03f8fa9f62)
2021-08-13 10:36:57 +02:00
Ellen Poe
994cafb9f1 Fix Godot's cubic resampling algorithm
(cherry picked from commit 2d450c6f61)
2021-08-13 10:27:52 +02:00
Ellen Poe
f26390769a Revert "Implement a new resampling algorithm in AudioStreamPlaybackResampled"
This reverts commit b2264cb48b.

(cherry picked from commit 57ccfab5fb)
2021-08-13 10:27:45 +02:00
Rémi Verschelde
b0bb791e4a HTML5: Fix a couple warnings
Add a missing call to disable warnings on a forked env for freetype's
`sfnt.c`.

(cherry picked from commit c44ebb020d)
(cherry picked from commit 0142a378c6)
2021-08-13 10:27:13 +02:00
Rémi Verschelde
2ac5a8dd2e SCons: Add method to detect Emscripten and use it for warnings config
Emscripten is LLVM-based so we want to follow the same logic. But we can't just
put it as a match in `methods.using_clang()` as that would mess with the
compiler version detection logic used to restrict old GCC and Clang releases.

(cherry picked from commit 34421683eb)
(cherry picked from commit e7f7d5f330)
2021-08-13 10:27:08 +02:00
Rémi Verschelde
e78a8b2424 SCons: Disable Clang -Wordered-compare-function-pointers warning
It's raised for us on many comparators implemented to be able to store a struct
in `Set` or `Map` (who rely on `operator<` internally). In the cases I reviewed
we don't actually care about the ordering and we use the struct's function
pointers as that's the only distinctive data available.

(cherry picked from commit 802810c371)
(cherry picked from commit 4c79dcc3e7)
2021-08-13 10:27:04 +02:00
Iced Quinn
bb14eb9743 doc: Add documentation for JSONRPC class
(cherry picked from commit 3fc5646b98)
2021-08-13 10:25:58 +02:00
kleonc
17fcd76a74 TabContainer Fix moving dropped tab at incorrect child index
(cherry picked from commit a5a4532378)
2021-08-05 16:38:29 +02:00
Rémi Verschelde
54084ac70d SCons: Fix info message when defining GODOT_VERSION_STATUS
(cherry picked from commit e92ba89dc7)
2021-08-05 16:36:58 +02:00
Rémi Verschelde
6b15d9a435 Merge pull request #51212 from Faless/net/3.3_ip_lock_fix
[3.3] [Net] Fix IP address resolution incorrectly locking the main thread.
2021-08-03 15:57:10 +02:00
Fabio Alessandrelli
6ff869eda7 [Net] Fix IP address resolution incorrectly locking the main thread.
This seems to be a pretty old bug, older then originally reported (at
least under certain circumstances).

The IP singleton uses a resolve queue so developers can queue hostnames
for resolution in a separate while keeping the main thread unlocked
(address-resolution OS functions are blocking, and could block for a long
time in case of network disruption).

In most places though, the address resolution function was called with
the mutex locked, causing other functions (querying status, queueing
another hostname, ecc) to block until that resolution ended.

This commit ensures that all calls to OS address resolution are done
with the mutex unlocked.
2021-08-03 15:39:48 +02:00
kobewi
4bc527fedd Improve ConfigFile example
(cherry picked from commit 1721f0143e)
2021-08-03 14:57:34 +02:00
Rémi Verschelde
dec840452d i18n: Sync translations with Weblate
Last POT sync with the `3.3` branch, we'll now switch Weblate to track
`3.x` to prepare for the 3.4 release.
2021-08-03 10:32:32 +02:00
merumelu
ea0bdb6860 makerst: use link titles for external tutorials
(cherry picked from commit b8752d91dc)
2021-08-03 10:32:32 +02:00
Rémi Verschelde
16fd1c421e doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.

(cherry picked from commit 7adf4cc9b5)
2021-08-03 10:32:31 +02:00
Rémi Verschelde
c5589c76ce Allow overriding VERSION_STATUS with GODOT_VERSION_STATUS in env
`VERSION_STATUS` is part of what constitutes the reference version for a given
Godot build, and is part of the version check for compatible export templates.

For dev snapshots (alpha, beta, RCs), we usually set the `VERSION_STATUS` to
a specific build number (e.g. `beta2`), but this change doesn't end up
committed to the Git repository as we don't want to keep changing `version.py`
for testing builds.

So this new environment override will be what can be used in official builds
and by users making custom builds for specific snapshots.

(cherry picked from commit 948dcb63ca)
2021-08-03 09:29:23 +02:00
Rémi Verschelde
edef9a9c86 Add script to make source tarball with .git/HEAD
This allows to generate the `VERSION_HASH` constant with the Git commit hash
even when building from a source tarball which is not a Git repository (and
without dependency on Git itself).

(cherry picked from commit 9a71038e34)
2021-08-03 09:29:10 +02:00
Kevin Sanders
620579eaf8 Grammar fix.
(cherry picked from commit 6db57b9da2)
2021-08-03 09:28:47 +02:00
Yuri Roubinsky
73f40a1efc Prevent warning spam to console when dragging a CanvasItem in container
(cherry picked from commit bb5729fd35)
2021-08-03 09:28:31 +02:00
Hugo Locurcio
5e3ed7e014 Link to the Random number generation tutorial in RandomNumberGenerator
This was done in `master` already, but not in `3.x`.

(cherry picked from commit 93f4f9e076)
2021-08-03 09:28:00 +02:00
Haoyu Qiu
321a4bfcd8 Make action names translatable
(cherry picked from commit a3b221e99f)
2021-08-03 09:27:12 +02:00
Rémi Verschelde
7be11742b5 VariantParser: Fix uninitialized ResourceParser funcs
They could cause a segfault when parsing values with ID "Resource"
as apparently we never set a valid `func` for it.

Fixes crash part of #42115.

(cherry picked from commit f3aaa713d9)
2021-08-03 09:25:48 +02:00
Nicholas Huelin
f84de49718 Make "Find in Files" searches ignore directories with .gdignore files in them
This pull request fixes an issue where searches using the "Find in Files" function would include folders with `.gdignore` files in them. The editor is supposed to ignore directories with these files in them altogether.

(cherry picked from commit 658b152bd8)
2021-08-03 09:25:10 +02:00
Haoyu Qiu
121af4a37d Do nothing when dragging CSGBox handle perpendicular to the camera
(cherry picked from commit 0f1e107ede)
2021-08-03 09:24:54 +02:00
Jordan Schidlowsky
6878fe6d88 Websocket peer outbound buffer fixes. Expose outbound buffered amount.
(cherry picked from commit 023548c0a5)
2021-08-03 09:23:57 +02:00
Raul Santos
6a0155393a Use allowEmpty parameter in Split
(cherry picked from commit b7a66a820b)
2021-08-03 09:22:33 +02:00
Rémi Verschelde
c717c97819 Windows: Fix build with SCons 4.2.0
(cherry picked from commit c191cfbddf)
2021-08-01 11:06:12 +02:00
Fredia Huya-Kouadio
947c87d717 Fix custom build export
(cherry picked from commit df1ebbb0aa)
2021-07-28 15:40:17 +02:00
Francois Belair
03a6fe6489 Fix LSP SymbolKind reporting wrong types
Classes were properties, functions interfaces, etc.

(cherry picked from commit 02bc1bf355)
2021-07-28 15:39:57 +02:00
Hugo Locurcio
dd7bb8f965 Document Image.save_exr() only being available in editor builds
(cherry picked from commit a1784c64b4)
2021-07-28 15:39:44 +02:00
Haoyu Qiu
4641e6b170 Add check to internal methods to prevent crash
(cherry picked from commit 448295cd51)
2021-07-27 12:05:59 +02:00
Raul Santos
10d07e02f2 Ignore paths with invalid chars in PathWhich
(cherry picked from commit d636ebbfe9)
2021-07-27 12:05:24 +02:00
Rémi Verschelde
c406c8512f i18n: Sync translations with Weblate 2021-07-26 16:23:02 +02:00
Haoyu Qiu
385b88fced Fix selection of spaced atlas tile when using priority
(cherry picked from commit 2131b3c61c)
2021-07-26 15:39:14 +02:00
Hugo Locurcio
bd63402ed6 Document caveats with Control's mouse_entered/mouse_exited signals
(cherry picked from commit 37c1cbdcb2)
2021-07-26 14:40:01 +02:00
Cory Petkovsek
4204c02fd1 Calculate instance depth after shadow calculation in VisualServer
(cherry picked from commit 096417905b)
2021-07-26 14:39:44 +02:00
QbieShay
f862edd47c visual server now sorts based on aabb position
this was causing issues with scenes where the origin of the objects
was set for all objects to the center of the scene, making transparent
objects sort improperly

This work was kindly sponsored by IMVU

Co-authored-by: RevoluPowered <gordon@gordonite.tech>
(cherry picked from commit b239c6706e)
2021-07-26 14:39:31 +02:00
kleonc
c476459f2b VisualScriptEditor Fix in graph position calculation (do not skip zoom)
(cherry picked from commit 3336453dff)
2021-07-26 14:38:26 +02:00
Aaron Franke
8c640b8204 [3.x] Fix C# bindings generator for default value types
(cherry picked from commit b3ac1669c0)
2021-07-26 14:36:28 +02:00
Nicholas Huelin
6cea423cc6 Fix doc typos
This pull request fixes an assortment of typos and improves conciseness in `Animation`, `Area2D`,  `Array`, `ArrayMesh`, `Control`, `Directory`, `EditorPlugin`, `Engine`, and `OS`.

(cherry picked from commit 9a72b0d3d0)
2021-07-24 01:12:59 +02:00
Hugo Locurcio
9f68eb2e4c Clarify the purpose of the default asset library URLs in the editor
`localhost` was removed as it won't work out of the box. It can be added
by the user if they're working on the asset library itself.

This won't affect existing installations due to how the editor settings
are stored, but existing installations will keep working fine.

(cherry picked from commit eac8ba6ce8)
2021-07-24 01:12:52 +02:00
Nicholas Huelin
f240d77e29 Fix miscellaneous doc typos and inconsistencies
This pull request fixes an assortment of typos, improves conciseness, and enhances clarity.

(cherry picked from commit 9787e631aa)
2021-07-24 01:12:42 +02:00
Distrikt64
ce71a883c7 Fix msec documentation description typo
(cherry picked from commit 44eb041d60)
2021-07-24 01:12:30 +02:00
Hugo Locurcio
0647f46a67 Improve documentation for GDScript constants
(cherry picked from commit 8ff8c1e5f8)
2021-07-24 01:12:19 +02:00
Joseph Davies
22a449c420 Fix grammar in MultiMesh documentation.
(cherry picked from commit 136567ebcf)
2021-07-24 01:12:10 +02:00
Hugo Locurcio
1f649e9825 Backport RootMotionView icon from the master branch
This makes RootMotionView display with a proper icon in the editor.

(cherry picked from commit a528931c5e)
2021-07-24 01:11:44 +02:00
Hugo Locurcio
e652218b1f Document the RootMotionView class
(cherry picked from commit 6880829a9a)
2021-07-24 01:11:21 +02:00
foxydevloper
57189c114e Fix hidden seperators when horizontal frames is 1
(cherry picked from commit 429382b7e5)
2021-07-24 01:10:40 +02:00
ne0fhyk
037a1d4f69 Disable resource optimizations for release builds as it breaks the legacy build system.
(cherry picked from commit d1fdb60ee2)
2021-07-24 01:09:35 +02:00
Rémi Verschelde
d110182cfe Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@241fed0a44.

(cherry picked from commit a98677181b)
2021-07-20 13:37:57 +02:00
Rémi Verschelde
21c176165a mbedtls: Update to upstream version 2.16.11
(cherry picked from commit cd7b25588b)
2021-07-20 13:05:55 +02:00
Atlinx
ff943359dc Add scaling to the curve editor's handles
This fixes issue #50617

(cherry picked from commit ac5f3a6733)
2021-07-20 12:01:44 +02:00
David Snopek
6234f460b4 Fix "IDHandler.get_prop is not a function" error when calling some methods on WebRTCDataChannel
(cherry picked from commit 756ed308ee)
2021-07-20 12:01:16 +02:00
Fabio Alessandrelli
92cdebe1ac [HTML5] Add 2 controllers to the godot database.
Sony PlayStation DualShock 4 (054c:05c4 first gen).
Unofficial Switch controller.

(cherry picked from commit 5717118bcc)
2021-07-20 12:01:05 +02:00
Haoyu Qiu
a9e0a4bd12 Fix missing locale names
(cherry picked from commit 7eec8334d4)
2021-07-20 12:00:53 +02:00
Aaron Franke
752c1451db [3.x] Allow reading shaders from .gdshader files
(cherry picked from commit 7dc2edc430)
2021-07-20 12:00:16 +02:00
Nathan Franke
1856be7a0e Do not update scene tree dock when node edited outside of it
(cherry picked from commit 022a061571)
2021-07-20 11:58:28 +02:00
Dipal M Zambare
4d48e33345 Fixes 50428, added missing checks for image lock
(cherry picked from commit b626c57bc7)
2021-07-15 11:56:53 +02:00
Sergey Minakov
1e14bd655e [iOS] Fix plugin configuration loading
Clear ConfigFile parameter before loading new file.
Ignore duplicate input plist keys

(cherry picked from commit aa321f0a24)
2021-07-15 11:54:59 +02:00
Питанов Валера
051c5a7ed9 fix lightmap cpu crashes
(cherry picked from commit 47b9afa3e9)
2021-07-15 11:52:53 +02:00
Fabio Alessandrelli
1594678ed5 [HTML5] Raise default initial memory to 32 MiB.
The memory was resized in any case during start.

Mitigate Chromium issue:
https://bugs.chromium.org/p/v8/issues/detail?id=11863

Also fix a warning about SAFE_HEAP being a linker only flag.

(cherry picked from commit 897c906ebf)
2021-07-13 17:04:42 +02:00
Rémi Verschelde
ad95bb52d6 Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@LightningAA, @thebestnom

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 9e0e74e58e)
2021-07-13 13:17:08 +02:00
Rémi Verschelde
1c840a31a5 i18n: Sync translations with Weblate 2021-07-13 12:32:44 +02:00
Haoyu Qiu
c0ab0df9dc Fix decompression with FastLZ when buffer size is less than 16 bytes
(cherry picked from commit ccf292df38)
2021-07-13 12:20:29 +02:00
Haoyu Qiu
6250a33c61 Merge similar editor strings
(cherry picked from commit 4383f8a790)
2021-07-13 12:19:36 +02:00
TaskManagerCZ
db42629cef Explicit error message when setting active a Viewport that is already active.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
(cherry picked from commit e3be0913d7)
2021-07-13 12:19:05 +02:00
Haoyu Qiu
859dba0dd6 Fix unicode invalid skip error in AssetLib
(cherry picked from commit 0caaaf4018)
2021-07-13 12:18:48 +02:00
Haoyu Qiu
cca999c007 Fix doc description of HTTPClient::request
(cherry picked from commit 422f821be9)
2021-07-13 12:16:25 +02:00
Hugo Locurcio
f0dcedbf3a Make makerst.py create folders automatically, print a message when done
(cherry picked from commit f05aa9cc01)
2021-07-13 12:16:05 +02:00
Francois Belair
c2a92d93f2 Implement didClose notification in LSP
(cherry picked from commit 10429019ad)
2021-07-13 12:15:43 +02:00
Nick Huelin
00ed053486 Add method description to PopupMenu
This pull request adds a missing method description to `PopupMenu`.

This completes the documentation for `PopupMenu` and enhances usability by doing so.

Update doc/classes/PopupMenu.xml

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit 2e3cbbcd11)
2021-07-13 12:15:31 +02:00
Hugo Locurcio
7abe93ecf2 Tweak the GradientTexture property hint to follow CurveTexture
This prevents setting too large values and crashing the editor.

Very low values are also no longer allowed since they are generally
not detailed enough to represent complex gradients, leading to confusion.

(cherry picked from commit 2c7813385d)
2021-07-13 12:15:10 +02:00
voxelv
85fb2ea8b4 Avoid using a nullptr root in Tree._range_click_timeout().
Fixes #46648

(cherry picked from commit f17f3f8830)
2021-07-13 12:14:44 +02:00
Nick Huelin
bdcdfb0db7 Add multiple descriptions to several classes
This pull request adds several descriptions to multiple different classes.

This improves the completeness of the documentation and enhances usability by doing so.

(cherry picked from commit 27e9df7778)
2021-07-06 16:29:53 +02:00
Nick H
28ea0cf1e2 Add get_dead_zone() method to InputMap
This commit adds a new method to the `InputMap`, allowing the user to get the value of an action's dead zone as a float.

(cherry picked from commit c6f28ed62b)
2021-07-06 16:29:20 +02:00
Pitanov V.V
686a27b278 Fix GridMap erase Octans
(cherry picked from commit 4da4514b71)
2021-07-06 16:29:02 +02:00
Hugo Locurcio
c90766cc38 Document debanding being broken on mobile
(cherry picked from commit 9c4ebea9ef)
2021-07-06 16:28:41 +02:00
Marcel Admiraal
54eef268c0 Fix unchecked call to put() warning in GodotInputHandler.java
(cherry picked from commit 8270e101a7)
2021-07-06 16:28:30 +02:00
Hugo Locurcio
ecf4557348 Improve error reporting in WebSocketServer
This should make troubleshooting easier.

(cherry picked from commit 58455b18b5)
2021-07-06 16:27:12 +02:00
Rémi Verschelde
47a0490ff3 LocalVector: Don't error if from >= count
Vector handles this silently by returning -1, and we should do the same here.
Otherwise we get errors when calling `find()` on e.g. a LocalVector of size 0,
while `find()` is expected to always work (if the parameters are invalid then
it doesn't find anything, so -1).

Fixup to #49925.

(cherry picked from commit 7b7ccf25b6)
2021-07-05 12:18:44 +02:00
Marcel Admiraal
c43d33fa60 Add GDNative libraries to Android custom Gradle builds
(cherry picked from commit e021cab45b)
2021-06-29 14:59:22 +02:00
Rémi Verschelde
30bb133e01 i18n: Sync translations with Weblate 2021-06-29 14:56:36 +02:00
Rémi Verschelde
1a6c44aaf3 SpatialEditor: Revert tooltip rephrasing for Game Camera Override
Partial undo of #49541, keeping the swap fix but also preserving the
existing strings to avoid breaking translations in 3.3.
2021-06-29 14:55:44 +02:00
Ricard Rovira
7c8bbfadca Use unused from in local vector find function.
(cherry picked from commit 14d5908057)
2021-06-29 14:48:10 +02:00
Levi Lindsey
25bf30da53 Update File.store_var description to mention which properties of an object are included.
(cherry picked from commit 2b7c0cfb34)
2021-06-29 14:02:57 +02:00
bruvzg
9c1580579c [Windows Export] Use temporary file for osslsigncode signing.
(cherry picked from commit 8f7c2ccefd)
2021-06-29 14:02:57 +02:00
Fabio Alessandrelli
da03374563 [Net] Fix WebSocketClient path parsing.
Recent changes to parse_url caused the client to make invalid HTTP
requests if no path was specified.

(cherry picked from commit d244dda597)
2021-06-29 14:02:57 +02:00
Hugo Locurcio
747450a777 Fix flipped binormal in SpatialMaterial triplanar mapping
This made normal maps on triplanar materials use an inverted Y direction
compared to non-triplanar materials.

(cherry picked from commit 11033be5c6)
2021-06-29 14:02:57 +02:00
Haoyu Qiu
e0223edafc Validates the p_format parameter in Image::create functions.
(cherry picked from commit 0b7ffd4f68)
2021-06-29 14:02:56 +02:00
Nick H
6f58cfd077 Amend Label.clip_text() Method Description
This update fixes an inconsistencies in the documentation about the `clip_text()` method.

(cherry picked from commit ea94aeac48)
2021-06-29 14:02:56 +02:00
ne0fhyk
9933553268 Update config versions and deprecate the use of the jcenter maven repo.
(cherry picked from commit d1a9363c4c)
2021-06-29 14:02:56 +02:00
bruvzg
e5265a9bc3 [macOS] Fix custom mouse cursor not set after mouse mode change.
(cherry picked from commit f7797bf1b3)
2021-06-29 14:02:55 +02:00
ne0fhyk
5ba710863d Add support for custom debug keystore.
(cherry picked from commit d5b4045ea4)
2021-06-29 13:55:03 +02:00
Yuri Sizov
e1bc053496 Make relationship lines draw on top of TreeItems
(cherry picked from commit b91e3237c6)
2021-06-29 13:54:15 +02:00
Marcel Admiraal
288ce3c4b1 Clear glErrors instead of crashing when initializing GLES3
(cherry picked from commit 8788472b8c)
2021-06-29 13:53:07 +02:00
Hugo Locurcio
e39d59b43e Improve descriptions for ProjectSettings' disable_stdout/disable_stderr
(cherry picked from commit e3ef50db38)
2021-06-29 13:52:49 +02:00
Marcel Admiraal
aeb8cf2d2b Add adb output to error message when install fails
(cherry picked from commit de2acbd495)
2021-06-29 13:52:25 +02:00
Hugo Locurcio
5359b1dcc1 Tweak CylinderMesh rings property hint to allow a value of 0
A value of 0 rings is valid and results in a non-subdivided cylinder.

Compared to the previous lowest allowed value (1), a value of 0 halves
the triangle count in any cylinder.

(cherry picked from commit a82c90ca55)
2021-06-29 13:52:05 +02:00
PouleyKetchoupp
7a8020ea67 Fix export var override in PackedScene at runtime
Regression fix: update_exports is tool only and should be used only in
the editor, otherwise it can cause export variable overrides from
instances to be discarded in favor of the parent's value.

(cherry picked from commit f1587c8a7d)
2021-06-29 13:51:45 +02:00
PouleyKetchoupp
6c7d52164a Ignore disabled shapes for mass property calculations
(cherry picked from commit c3107349a4)
2021-06-29 13:51:17 +02:00
kleonc
5c36619bdd AnimationMultiTrackKeyEdit Allow editing easing if it's possible for all edited tracks
(cherry picked from commit 1d890e16f7)
2021-06-29 13:50:03 +02:00
Francois Belair
2e1e8eb2e1 Translate file path to URI on LSP symbol requests
(cherry picked from commit a56c2e459b)
2021-06-29 13:49:12 +02:00
Gromph
c652cb62db UWP: Keep upstream names for capabilities preset settings to avoid mismatch
The previous code used `camelcase_to_underscore` to prettify the names for
display in the export preset, but it leads to inconsistencies if we don't make
sure to do the reverse operation when writing to the `AppxManifest.xml`.

It's simpler to keep the same names as in the manifest, which is also what
users will see referenced in MS documentation.

Fixes #47900.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit c87e49d7bc)
2021-06-29 13:48:55 +02:00
PouleyKetchoupp
0938958111 Expose collider RID in 2D/3D kinematic collision
Can be useful to access the colliding body information for bodies
created with the physics server directly.

(cherry picked from commit a146e79758)
2021-06-29 13:48:37 +02:00
amor
cefef7db05 Fixed inspector not updating anchor
(cherry picked from commit dacc726faf)
2021-06-29 13:48:14 +02:00
Umang Kalra
f12df328f0 Fixes missing descriptions in search window of visualscript
(cherry picked from commit 5e8d31ef0e)
2021-06-29 13:47:35 +02:00
K. S. Ernest (iFire) Lee
64cfd5cbaa ERR_FAIL_NULL check file access
Null in ResourceImporterTexture::_save_stex

(cherry picked from commit b74bc42a43)
2021-06-17 13:25:29 +02:00
Haoyu Qiu
c1b2bd6fb6 Save binary ProjectSettings key length properly
(cherry picked from commit 06c0a5f9f2)
2021-06-17 13:25:11 +02:00
Paweł Fertyk
f36a3c67e3 Remove trailing slash from recent dir if needed
(cherry picked from commit 709e71ae9c)
2021-06-17 13:24:59 +02:00
Fabio Alessandrelli
87883f8b0d [HTML5] Update eslint and jsdoc dependencies.
(cherry picked from commit a1cbb6daa6)
2021-06-17 13:24:44 +02:00
Fabio Alessandrelli
336a381486 [HTML5] Fix some JS library signature.
(cherry picked from commit 9b7b0a28b9)
2021-06-17 13:23:40 +02:00
Pedro J. Estébanez
dc203b0d13 Fix slow load/save of scenes with many instances of the same script
(cherry picked from commit 2ca6b9c610)
2021-06-17 13:22:41 +02:00
Haoyu Qiu
461e79bd18 Validate parameters when adding plugins
(cherry picked from commit 1a9e3edd30)
2021-06-17 13:21:42 +02:00
Hugo Locurcio
a40b59d270 Fix game camera override tooltips being swapped
Previously, the wrong tooltip was shown.

This also tweaks the tooltips' texts to be clearer and remove
references to "game" (since Godot is used for more than just games).

(cherry picked from commit d1c5dd5b68)
2021-06-17 13:21:28 +02:00
Hugo Locurcio
5dcbe95758 Fix duplicate paragraph in ArrayMesh.add_surface_from_arrays() description
(cherry picked from commit 033985f9c2)
2021-06-17 13:21:12 +02:00
kleonc
e8759f218d TextureButton Update min size on any texture change
(cherry picked from commit 6c3c269f24)
2021-06-17 13:20:54 +02:00
Philip Whitfield
e583888573 fix url parsing with port numbers
String.get_slice_count is always at least 1 or 2 for bases with a port number.
Before this change the following URL would return ERR_INVALID_PARAMETER ```ws://127.0.0.1:8000/test```

(cherry picked from commit 3d9f29910c)
2021-06-17 13:20:43 +02:00
Hugo Locurcio
0cb19bc69c Allow higher and lower maximum zoom values in GraphEdit
Low zoom values result in unreadable text, but it can still be
useful for previewing purposes.

Eventually, characters could be replaced by rectangles at very low
zoom levels to improve the visual appearance.

(cherry picked from commit 74c584472c)
2021-06-17 13:20:23 +02:00
Hugo Locurcio
fbe8226213 Tweak the physics FPS property hint to only allow reasonable values
Physics FPS above 1000 cause the whole project to slow down
and are not very practical in the first place (since no CPU currently
available can keep up).

(cherry picked from commit 8f4ac7bc4a)
2021-06-17 13:20:04 +02:00
Andrii Doroshenko (Xrayez)
6f63b0c9ae Separate version hash from version number in editor and project manager
When copy-pasting the version from About dialog to bug reports at GitHub,
this makes the version hash linkable to commits at GitHub.

(cherry picked from commit 293550f56a)
2021-06-17 13:19:41 +02:00
Hugo Locurcio
915865b279 Fix editor constantly redrawing when freelook is active with still camera
The editor only needs to redraw when the camera is moving.

This helps preserver battery life on laptops when using freelook,
especially with the toggle mode (Shift + F).

(cherry picked from commit 21807f8d88)
2021-06-17 13:19:05 +02:00
Marcel Admiraal
286ab2aa5c Remove FIXME comment from fixed issue in Android Export
(cherry picked from commit 68b1a80a5d)
2021-06-17 13:18:50 +02:00
bruvzg
984fa91a0f Fix loading RLE compressed TGA files.
Fix memory reads outside of input buffer when loading invalid TGA files.

(cherry picked from commit d86ccf8309)
2021-06-17 13:18:18 +02:00
Hugo Locurcio
2760de8710 Document applying VRAM compression setting changes retroactively
(cherry picked from commit d0d717809e)
2021-06-17 13:17:28 +02:00
Haoyu Qiu
65e14eb8de Fix RichTextLabel auto-wrapping on CJK
(cherry picked from commit 3a591aaeeb)
2021-06-17 13:16:59 +02:00
Rémi Verschelde
0b594bf3c8 Style fix in DONORS.md (trailing space)
(cherry picked from commit 2b5b33706e)
2021-06-16 13:50:16 +02:00
Rémi Verschelde
a812779cc5 i18n: Sync translations with Weblate 2021-06-16 13:47:49 +02:00
Rémi Verschelde
6bf3a162cd Update AUTHORS and DONORS list
Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit c5d6fb599c)
2021-06-16 13:44:16 +02:00
Rémi Verschelde
fbba61998a Merge pull request #49607 from azagaya/3.3
[3.3] Fix vertical slider grabber_area height calculation
2021-06-15 00:12:44 +02:00
azagaya
1114c248b1 Fix vertical slider grabber_area height calculation 2021-06-14 15:51:12 -03:00
Hugo Locurcio
018ca6b1c4 Make it possible to copy the Godot version identifier by clicking it
This closes #24317.

(cherry picked from commit 1ceb603de8)
2021-06-08 10:48:29 +02:00
Arthur Bikmullin
ca465ef54d Fixed missed IDHandler dependency in GodotFetch
(cherry picked from commit ee2bea7a86)
2021-06-08 10:21:08 +02:00
Hugo Locurcio
5738d6ee6e Allow clang-format 12 in the pre-commit hook
clang-format 12's formatting is identical to clang-format 11's.

(cherry picked from commit d74413ebd0)
2021-06-07 22:56:01 +02:00
PouleyKetchoupp
fab9c19d2e Fix uninitialized members in physics query results
(cherry picked from commit c6bd0fd0f7)
2021-06-07 22:56:01 +02:00
Rémi Verschelde
089fde5c59 FileAccess: Don't err in store_buffer with buffer of size 0
The error check was added for `FileAccessUnix` but it's not an error when both
`p_src` and `p_length` are zero.

Added correct error checks to all implementations to prevent the actual
erroneous case: `p_src` is nullptr but `p_length > 0` (risk of null pointer
indexing).

Fixes #33564.

(cherry picked from commit 01d5c463be)
2021-06-07 22:56:01 +02:00
Marcel Admiraal
6a98050afa Don't install Android NDK in CI
(cherry picked from commit a81449be6d)
2021-06-07 22:52:35 +02:00
Marcel Admiraal
b45fb53896 Update Gradle archiveName and destinationDir properties
(cherry picked from commit 78e791045c)
2021-06-07 22:52:02 +02:00
Nick Huelin
aa4afee320 Edit "quit()" method description in SceneTree
Updated the `SceneTree.quit()` method to include a note that on iOS this method won't work as apps are expected to be closed via the Home button, not programmatically.

(cherry picked from commit c63af17a31)
2021-06-07 22:50:12 +02:00
kobewi
e5dc7a06a9 Improve sort_custom() description
(cherry picked from commit 48f0368ddc)
2021-06-07 22:49:37 +02:00
Marcel Admiraal
3c55a9c210 Fix game controllers ignoring the last listed button
(cherry picked from commit 18825ad4ff)
2021-06-07 22:40:42 +02:00
Hugo Locurcio
f7e9467441 Document Navigation.get_simple_path() often returning non-optimal results
(cherry picked from commit 8e4afdc71d)
2021-06-07 22:38:55 +02:00
RoniPerson
f1ca7c5e98 Added documentation to some add_*_plugin methods
Added documentation to some `add_*_plugin` methods and the corresponding `remove_*_plugin` methods.
Added an example of how to register a plugin to `add_inspector_plugin` and linked to it in the other methods.

(cherry picked from commit e849157e07)

Proofread add_*_plugin/remove_*_plugin descriptions in EditorPlugin

(cherry picked from commit 21f0961610)
2021-06-07 22:38:05 +02:00
bruvzg
05b72c2e9b [3.x] Fix visibility issue with zoom label
(cherry picked from commit 36ca3fea96)
2021-06-03 12:42:45 +02:00
Hugo Locurcio
c45ce8b6bb Uncap the range for gravity and change the slider hints
There's not really a reason to cap the gravity amount, and we can also
give better hints for the range (for 3D, ±32 is much more sensible
than ±1024).

(cherry picked from commit e0facdaf61)
2021-06-03 12:42:30 +02:00
Jonas Bernemann
5b3f94e807 Fix overflow in export template manager
Fixes the possible overflow of buttons after downloading the
current export template with using custom fonts or custom font size.

Fix #48826

(cherry picked from commit 4659b2ad4a)
2021-06-03 12:42:08 +02:00
Pedro J. Estébanez
843e6bbd6b Fix crash when using ALSA MIDI with PulseAudio
(cherry picked from commit 958d79828b)
2021-06-03 12:41:29 +02:00
kleonc
7674015231 TextureRegionEditor Fix not updating on editing region with autoslice cached
(cherry picked from commit 019c99e538)
2021-06-03 12:41:10 +02:00
Nathaniel Morihara
a34c0a9248 Exporting: Android Debug Keystore Warnings
(cherry picked from commit 2cf19293ba)
2021-06-03 12:40:28 +02:00
Rémi Verschelde
0446cf487f i18n: Sync translations with Weblate 2021-06-02 11:09:24 +02:00
Lyuma
b9e8fa4504 gltf: Fix mesh nodes which are also bones for 3.x
Fix issue when two skeletons end up directly parented.
Prevent animating TRS for skinned Mesh node.
Fix animating weights on meshes with targets but no weights.

(cherry picked from commit a330b6829f)
2021-06-01 12:57:43 +02:00
Haoyu Qiu
41206078dd Check cache_parent_physical_bone when rebuilding parent cache
(cherry picked from commit 96fe795bdb)
2021-06-01 12:56:25 +02:00
Hugo Locurcio
593b3272f6 Document Resource.duplicate() only copying exported variables' values
(cherry picked from commit 2ba893e3ce)
2021-05-31 13:43:20 +02:00
Arkadiusz Marcin Kołek
1f2e0c67b0 Avoid division by zero when calculating inertias for bodies with colliders without areas.
(cherry picked from commit e347baddf3)
2021-05-31 12:57:26 +02:00
Paweł Fertyk
3b29aac348 Check for _language in PluginScript.instance_has
(cherry picked from commit 4b25892501)
2021-05-31 12:46:40 +02:00
bruvzg
65d9992fb6 Fix Directory::get_space_left() result on macOS and Linux.
(cherry picked from commit 1d7a63fb8f)
2021-05-31 12:42:27 +02:00
Lynx
2ce5515762 Fix not updating fonts when parent theme changes
Reparsing the bbcode content when we receieve a theme changed
notification just like we already do in ENTER_TREE.

Resolves #49089

(cherry picked from commit 1b7c2a1428)
2021-05-31 12:41:38 +02:00
Aaron Franke
f901049a0d [3.x] Fix Camera FOV documentation
(cherry picked from commit 753d0fca1d)
2021-05-31 12:39:57 +02:00
David Cambré
d043b5d71c The built in function math/seed was missing the sequenceport.
(cherry picked from commit d7205ef1d0)
2021-05-31 12:04:04 +02:00
lawnjelly
0d5be76f15 Fix canvas rect bound calculation
It turns out the calculation of the bounding rect for canvas items has a nasty bug. When a transform is applied (especially in a custom draw), in the renderer this extra matrix is applied to all later commands in the canvas item. However in the calculation of the bound, the transform is only applied to the first command following the transform.

This PR fixes this inconsistency.

(cherry picked from commit 6e022a382d)
2021-05-31 11:34:24 +02:00
Marcel Admiraal
3574c87888 Update EditorResourcePreview queue_*() documentation
(cherry picked from commit 72446bab1b)
2021-05-31 11:34:13 +02:00
PouleyKetchoupp
b9492b2659 Fix logic for showing tilemap debug collision
In editor: only when show_collision property is enabled
In game: only when 'Visible collision shapes' is enabled

(cherry picked from commit 114da550ec)
2021-05-31 11:34:00 +02:00
Paweł Fertyk
c680057dad Return error when decompressing empty buffer
(cherry picked from commit f563cabb4e)
2021-05-31 11:33:34 +02:00
lawnjelly
da2f17ae19 BVH - fix stale current_tree in deactivate function
Changes passing of current_tree from a member variable to a function argument, making bugs due to stale state less likely.

Fix a bug in deactivate where current_tree variable was stale. This may have resulted in visual anomalies.

(cherry picked from commit 0a350845d5)
2021-05-31 11:32:04 +02:00
TwistedTwigleg
59745c9286 SkeletonIK: Fixed issue where bones become detached if multiple SkeletonIK nodes are used
(cherry picked from commit ec7b72e81d)
2021-05-31 11:28:31 +02:00
Hugo Locurcio
c3f2eb9291 Remove duplicate orientation settings in the iOS export preset
The screen orientation is now sourced from the Project Settings
like it is done for Android already.

(cherry picked from commit 914b5dc525)
2021-05-31 11:27:26 +02:00
Fabio Alessandrelli
d5089c4e4e [Net] Implement String::parse_url for parsing URLs.
Splits the URL into (scheme, host, port, path).
Supports both literal IPv4 and IPv6.
Strip credentials when present (e.g. http://user:pass@example.com/).

Use that function in both HTTPRequest and WebSocketClient.

(cherry picked from commit 3bb40669d5)
2021-05-31 11:14:34 +02:00
Rémi Verschelde
30dfb51048 Linux: Fix embree unbundling on aarch64
Embree supports aarch64 since version 3.13.0.

(cherry picked from commit 752ed768fa)
2021-05-31 11:13:38 +02:00
Rémi Verschelde
3117f04759 Bump version to 3.3.3-rc 2021-05-24 18:25:08 +02:00
Rémi Verschelde
7610409b8a Bump version to 3.3.2-stable
Fixes a few regressions in 3.3.1-stable, and includes some additional bug
fixes. See the CHANGELOG.md for details.

Thanks to all contributors! <3
2021-05-24 13:39:13 +02:00
Rémi Verschelde
bc5ac12bdb Update changelog for 3.3.2-stable 2021-05-24 13:39:13 +02:00
Rémi Verschelde
2c99306e20 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.

(cherry picked from commit 62efa30ed2)
2021-05-24 13:39:13 +02:00
bruvzg
2c520fb732 [macOS] Allow "on top" windows to enter full-screen mode.
(cherry picked from commit 31be8ae8e9)
2021-05-24 12:59:36 +02:00
lawnjelly
2857840754 Batching - fix item_batch_flags stale state
Fixes bdata.joined_item_batch_flags not being kept up to date during the rendering pass.

(cherry picked from commit 17a51b3a9e)
2021-05-24 12:58:59 +02:00
Zae
f87096ecea Fix duplicate close files when deconstructing ZipArchive
(cherry picked from commit a65dac3fa7)
2021-05-24 12:58:36 +02:00
trollodel
5b8b3f645e Fix crash on debug shapes update if CollisionObject is not in tree
Also fix ConcavePolygonShape not emitting the changed signal

(cherry picked from commit 7043d6d1c6)
2021-05-22 19:12:39 +02:00
Haoyu Qiu
20dfa4ceaa Fix STL to Godot type convertion of polypartition
(cherry picked from commit d16bef8b55)
2021-05-22 19:12:22 +02:00
Haoyu Qiu
738d0b7f63 Fix editor crash when exporting profiler data
(cherry picked from commit be79bdc8ab)
2021-05-22 19:11:57 +02:00
Rémi Verschelde
7678e73398 Dist: Add macOS entitlements files for editor code signing
These are the entitlements we define for official macOS editor builds since
Godot 3.3.

Users making custom builds of the engine can use those files with `codesign` to
sign their own builds. E.g.:
```
codesign --force --timestamp \
  --options=runtime --entitlements editor.entitlements \
  -s <your key> -v osx_template.app
```

(cherry picked from commit 6999e332e4)
2021-05-22 19:10:53 +02:00
Lyuma
d36ab91461 Fix incorrect skin deduplication when using named binds
(cherry picked from commit 60f620411e)
2021-05-22 19:10:32 +02:00
Lyuma
997f8f5d29 gltf: Fail gracefully when a mesh instance fails.
(cherry picked from commit 5a9eee6b1a)
2021-05-22 19:10:15 +02:00
K. S. Ernest (iFire) Lee
2ec691e274 When one invalid image fails, it should only fail that single image.
Move to a more graceful degradation 3d asset import model.

(cherry picked from commit a81f4dd5a7)
2021-05-22 19:09:53 +02:00
jfons
01ce818c7b Fix swapped front/rear directions in viewport rotation control.
(cherry picked from commit e70e33ddcf)
2021-05-22 19:09:32 +02:00
Haoyu Qiu
e14d5062f7 Fix crash when using get_available_chars with invalid DynamicFontData
(cherry picked from commit bec1dcb6f6)
2021-05-22 19:09:11 +02:00
Hugo Locurcio
418e044789 Remove high radiance sizes from the editor due to issues on specific GPUs
These values can still be set by code, but are no longer presented in
the editor.

(cherry picked from commit 8d9cef3726)
2021-05-22 19:08:35 +02:00
Hugo Locurcio
274e251d30 Print a warning when importing a repeating NPOT texture in a GLES2 project
Repeating NPOT textures are not guaranteed to be displayed correctly
in GLES2, since the specification does not mandate support for it.

The warning is also displayed in GLES3 projects that are configured
to allow falling back to GLES2.

(cherry picked from commit 20f79287cd)
2021-05-22 19:08:07 +02:00
Rémi Verschelde
c1827b872d Merge pull request #48888 from akien-mga/3.3-embree-fix-mingw-again
[3.3] embree: Re-apply custom fix for MinGW crash
2021-05-20 18:03:20 +02:00
Rémi Verschelde
9b8a099bd1 embree: Re-apply custom fix for MinGW crash
Re-do of #45380 lost in #48455.
Rediff patch on current embree-aarch64 upstream.

Fixes #48822.
2021-05-20 14:54:33 +02:00
Marvin Ewald
a1af387177 Allow warning-ignore in same line
(cherry picked from commit 3715ea268f)
2021-05-20 14:37:10 +02:00
Rémi Verschelde
337ef03958 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
```

(cherry picked from commit eb78f80f03)
2021-05-20 14:36:39 +02:00
Fabio Alessandrelli
066ceefcaf [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.

(cherry picked from commit e858f7c2ea)
2021-05-20 14:36:08 +02:00
kleonc
5602deeb0f Document valid range of Node2D.z_index
(cherry picked from commit 4871bf4668)
2021-05-20 14:35:51 +02:00
Rémi Verschelde
4ed50733fd Android: Remove -fno-integrated-as, it can break arm64v8 build
We found that this flag causes this error on PR #48812 which does not add any
fancy inline assembly:
```
/tmp/tile_set-ce236a.s: Assembler messages:
/tmp/tile_set-ce236a.s:34676: Error: selected processor does not support `bfc x0,#32,#32'
clang++: error: assembler command failed with exit code 1 (use -v to see invocation)
```

That flag is mentioned in various errors related to assembler failures on
arm64v8 with Clang from the Android NDK.

It was added in Godot in #6958 when migrating from GCC to Clang, and is indeed
referenced in the NDK's Clang migration guide:
https://android.googlesource.com/platform/ndk/+/master/docs/ClangMigration.md

> Especially for ARM and ARM64, Clang is much stricter about assembler rules
> than GCC/GAS. Use `-fno-integrated-as` if Clang reports errors in inline
> assembly or assembly files that you don't wish to modernize.

We don't get those errors nowadays so it seems the flag is no longer needed.

(cherry picked from commit 23f7c75126)
2021-05-19 19:46:43 +02:00
Haoyu Qiu
f89120b895 Fix ragdoll simulation when parent was readded to scene
(cherry picked from commit a701927d89)
2021-05-19 19:45:35 +02:00
Hugo Locurcio
7339de9dbb Increase the TileSet editor's snap step to 1024
This also tweaks the autotile bitmaks mode property hint string.

(cherry picked from commit a9df687db6)
2021-05-19 15:28:13 +02:00
Rémi Verschelde
80f74aac0f CI: Install Android NDK 21.4.7075529
This is the version mandated by Godot's gradle setup anyway so it would get
installed when running gradlew. Now we pre-install the correct version.

(cherry picked from commit 7eaf4d445d)
2021-05-19 15:23:04 +02:00
Bartłomiej T. Listwon
2df6731281 pywin32 is no longer necessary for SCons install
https://github.com/SCons/scons/releases/tag/4.1.0
(cherry picked from commit b6f16671ee)
2021-05-19 15:22:28 +02:00
Fabio Alessandrelli
af6c50b0e5 [HTML5] Fix GDNative compilation with emcc 2.0.19+
Add `WARN_ON_UNDEFINED_SYMBOLS=0` for the main module (which defines
`godot_js_main` as extern coming from the "side" module, i.e. the main
Godot binary).

(cherry picked from commit 14c057eab6)
2021-05-19 15:22:10 +02:00
Rémi Verschelde
0f3f706ca6 Bump version to 3.3.2-rc 2021-05-19 14:56:50 +02:00
Rémi Verschelde
4da4277dc9 Bump version to 3.3.1-stable
Almost exclusively bug fixes, see the CHANGELOG.md for details.

Thanks to all contributors! <3
2021-05-18 13:03:47 +02:00
Rémi Verschelde
3698298326 Update changelog for 3.3.1-stable 2021-05-18 13:02:25 +02:00
Rémi Verschelde
bcedd09742 i18n: Sync translations with Weblate 2021-05-18 12:09:09 +02:00
Sonoracpp
d006f50db3 Disable GIProbe emission when disabled on a material
Fixes https://github.com/godotengine/godot/issues/48230

(cherry picked from commit 0b723358bb)
2021-05-18 11:58:45 +02:00
Rémi Verschelde
c3732f0da8 Revert "Tweak lightmapper warning message to mention Rosetta emulation on macOS"
This reverts commit 1e3166115a.

This is no longer needed after #48455.
2021-05-18 11:58:45 +02:00
kleonc
628265be44 Fix crash after disabling plugin using set_force_draw_over_forwarding_enabled()
(cherry picked from commit 5a8314016a)
2021-05-17 13:13:50 +02:00
kleonc
5445d04fbe Fix accessing scene tree without checking: MeshInstance3D::create_debug_tangents, GIProbe::bake
(cherry picked from commit ef589a7cd3)
2021-05-17 13:13:24 +02:00
John Wigg
4601328542 Fix normals of PrismMesh
(cherry picked from commit c8e402324e)
2021-05-17 13:13:02 +02:00
Haoyu Qiu
a2b4093a50 Fix Tree::get_column_at_position crash
(cherry picked from commit c8efcf81d2)
2021-05-17 13:12:56 +02:00
Hugo Locurcio
757c2c0e77 Add "Support Godot Development" option to the editor's Help menu
(cherry picked from commit 3eae2f9c6d)
2021-05-17 13:12:38 +02:00
Haoyu Qiu
c804baf6a9 Fixes display of programmatically created value in remote inspector
(cherry picked from commit e3b7b861b0)
2021-05-17 13:02:57 +02:00
Rémi Verschelde
f6c29d1cf5 i18n: Sync translations with Weblate 2021-05-14 13:22:30 +02:00
Rémi Verschelde
26efa5c690 Update AUTHORS and DONORS list
New contributor added to AUTHORS:
@kleonc

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 44ab5a0471)
2021-05-14 13:19:16 +02:00
Zae
164fd19bb5 Fix zip file opening twice
(cherry picked from commit f403e62df1)
2021-05-14 13:16:26 +02:00
Brennen Green
77e3b51627 Manually unpacked normal mapping to fix issue with refraction being offset rather than distorted.
(cherry picked from commit 31f2d946ad)
2021-05-14 11:36:17 +02:00
Yuri Sizov
75cd0dc950 Keep custom editor theme when changing editor settings
(cherry picked from commit 56aedcee17)
2021-05-14 11:05:50 +02:00
Daniel Lungaro
2784697b96 Remove plugin from enabled if there's an error
inform user in warning message

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>

Refactor remove plugin from enabled

(cherry picked from commit 2bae31a4df)
2021-05-14 11:05:42 +02:00
Eoin O'Neill
70a2b746a3 Attempt to fix rich text label effects processing even when
the node is invisible.

ISSUE:47687
(cherry picked from commit c4f976b38b)
2021-05-14 10:18:55 +02:00
R. Alex Hofer
07870cf7d1 Handle having no sinks in the PulseAudio driver.
Also make PulseAudio errors more verbose.

(cherry picked from commit 65a10f4db5)
2021-05-14 10:18:42 +02:00
Morris Tabor
4b221df06d fix misaligned loads in bmp loader
(cherry picked from commit 89a8bbda0a)
2021-05-13 23:19:51 +02:00
Rémi Verschelde
9602dfad90 VisualScript: Fix wrongly setting default value on property hint change
PR #45096 put the backported code in the wrong case, it should be for `type`
and not for `hint`.

Also synced `hint` enum values with `Object.PropertyHint`.

Fixes #48698.

(cherry picked from commit c7182512dd)
2021-05-13 23:17:07 +02:00
davidh
025a380d1f Check for valid DynamicFontData before duplicate
(cherry picked from commit ae2bc66eae)
2021-05-13 23:16:20 +02:00
Yuri Sizov
57f271f03a Fix EditorPropertyEasing capturing drag events originated outside of it
(cherry picked from commit 31db95b048)
2021-05-13 23:16:06 +02:00
Rémi Verschelde
746b9b03dd CI: Update JavaScript linter deps with known security vulnerabilities
jsdoc has no new release so I'm tracking this PR:
https://github.com/jsdoc/jsdoc/pull/1906

(cherry picked from commit e743b6b24c)
2021-05-13 23:15:19 +02:00
lawnjelly
3624abd613 Batching - fallback for 2d skinning with unrigged polys.
In the legacy renderer unrigged polys would display with no transform applied, whereas the software skinning didn't deal with these at all (outputted them with position zero). This PR simply copies the source to destination verts and replicates the legacy behaviour.

(cherry picked from commit 3c68a6d37f)
2021-05-13 23:14:51 +02:00
Hugo Locurcio
c93b8be3b6 Fix Ubuntu clang-format version detection in the pre-commit hook
(cherry picked from commit 61aa09097f)
2021-05-10 17:47:36 +02:00
Rémi Verschelde
d1ac177f98 TileSet: Fix signal disconnect error in some situation
Fixes second issue in #45938.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
(cherry picked from commit 6e920d0c14)
2021-05-10 17:13:58 +02:00
trollodel
140cf0f2cb Create CollisionObject debug shapes using VS
(cherry picked from commit 60ee8c9639)
2021-05-09 18:58:33 +02:00
Kyle
5193c3c8eb Add ctrl+shift+a to instance scene in scenetree dock
Adds another key shortcut to instance a scene in the scentree dock. Complements ctrl+a to add a node.

(cherry picked from commit ea5445655c)
2021-05-09 17:29:53 +02:00
Rémi Verschelde
6f780d7e3a TileSet: Improve error message for invalid IDs
Supersedes #47321.
Fixes #47313.

(cherry picked from commit ee86dc3011)
2021-05-09 17:29:53 +02:00
Hugo Locurcio
dd20139901 Allow negative contrast values in the editor theme settings
When using a negative contrast value, the base color will be lightened
to create the derivative colors instead of being darkened.

This can lead to better-looking themes, especially for light themes.

(cherry picked from commit e7e2ef0767)
2021-05-09 16:38:18 +02:00
Hugo Locurcio
3299600093 Document caveats of OS.get_unique_id()
(cherry picked from commit 7350f90c57)
2021-05-09 16:29:14 +02:00
Hugo Locurcio
7eacb604b1 Fix EditorPropertyResource focus outline being drawn behind the preview
(cherry picked from commit 0b47f1be8c)
2021-05-09 16:28:56 +02:00
Fabio Alessandrelli
0a7193c5f4 [HTML5] Fix target_fps when window loses focus.
We don't get updates when the window is unfocused/minimized, so we must
detect the situation where the counted ticks start drifting away
resulting in more frames drawn than needed.
This commit adds a check to ensure that the target ticks do not drift
away more than one second.

(cherry picked from commit a1fe6d6899)
2021-05-09 16:28:22 +02:00
Hugo Locurcio
3fc59fbcc7 Tweak the setting hint for the custom editor theme setting
The custom editor theme is only visible after restarting the editor.

(cherry picked from commit 027301fec7)
2021-05-09 16:28:04 +02:00
Fabio Alessandrelli
488f448fbb [HTML5] Remove "fixed-size.html".
No longer used in 3.3+.

(cherry picked from commit 3faf8d6e40)
2021-05-09 16:27:48 +02:00
Kyle
b622a9e359 Remove extra separator
Removes an extra separator when Scene Tree Editing is disabled. Discussed in #48518

(cherry picked from commit e168baf433)
2021-05-09 16:27:26 +02:00
Kyle
e6cbb4d460 Fixed cut/copy/paste visibility
Fixes #48514 by moving the visibility of these buttons into their own if statement that depends on if scene tree editing is allowed. Previously it was under the script editing setting which is unexpected as it works with nodes and the scene tree.

(cherry picked from commit 10d5d4d3cd)
2021-05-09 16:27:10 +02:00
Fabio Alessandrelli
88210227dc [HTML5] Use 64KiB chunk size in JS HTTPClient.
For consistency with the native one, and the documentation.

(cherry picked from commit 6243835619)
2021-05-09 16:23:38 +02:00
Hugo Locurcio
5514b16950 Improve the AudioStreamPlayer(2D/3D) class descriptions
(cherry picked from commit b90adec417)
2021-05-09 16:23:16 +02:00
paru
523faf0444 Fixed usage of proxy textures on GLES2 sky
(cherry picked from commit eed4655644)
2021-05-09 16:16:58 +02:00
clayjohn
bb6b38680c Only set base in Sprite3D when needed
(cherry picked from commit 3dd2e5d870)
2021-05-09 16:16:27 +02:00
Rémi Verschelde
e6186dad59 Fix crash with user-defined ResourceFormatLoader.load
There's still some fishy recursive relationship between `load_interactive` and
`load` which needs to be investigated here, but this patch solves the crash
when returning an error code in user-defined `load`.

Fixes #48463.

(cherry picked from commit bf9f288c7d)
2021-05-09 16:15:09 +02:00
TwistedTwigleg
e9c8889ae8 Fixes the SkeletonIK twisting issue by using the skeleton global pose without overrides
(cherry picked from commit c1bc87ed0d)
2021-05-09 16:14:11 +02:00
Lightning_A
feaf4e6207 Fix Array.max() navigating to @GDScript.max() etc.
(cherry picked from commit 2c4aa50648)
2021-05-09 16:11:27 +02:00
rafallus
edd63aeefa Check input mesh is valid in SurfaceTool methods
(cherry picked from commit 0ad0f71ba0)
2021-05-09 16:11:09 +02:00
kobewi
476bc5191b Save project after opening
(cherry picked from commit 76240515d8)
2021-05-05 18:35:55 +02:00
MaxStgs
7e22dfdd05 Add PackedDataContainer data pointer check for non nullable
(cherry picked from commit 94d0c4182b)
2021-05-05 18:35:55 +02:00
PouleyKetchoupp
7c5633c032 Expose get_debug_mesh in Shape to scripting API
Can be useful for custom drawing of physics shapes without having to add
a collision object node to the tree.

(cherry picked from commit 0ba5001fb6)
2021-05-05 18:35:54 +02:00
Hugo Locurcio
b1cb84b452 Document that File.open_compressed() can only open files saved by Godot
(cherry picked from commit 5f098d6db6)
2021-05-05 18:35:54 +02:00
CaptainProton42
b4529c7e8d Fix 3D scene preview generation.
File system dock previews will now be generated for 3D scenes when no
editor feature profile is set.

(cherry picked from commit 16304aaa3b)
2021-05-05 18:35:54 +02:00
Brian Semrau
ba4f15b376 Batching fix polygon basis polarity
Changes based on fix in #46898

(cherry picked from commit 57e3f357dc)
2021-05-05 18:35:54 +02:00
JFonS
6a84390cd6 Add checks for __SSE2__ in the lightmap raycaster
(cherry picked from commit 20717990fd)
2021-05-05 18:35:54 +02:00
Rémi Verschelde
b97b37f91c SCons: Disable embree-based modules on x86 (32-bit)
Fixes #48482.

(cherry picked from commit e53422c8f9)
2021-05-05 18:23:57 +02:00
JFonS
1cfed0d583 Switch to embree-aarch64
(cherry picked from commit 73e2ccd603)
2021-05-05 15:11:13 +02:00
Rémi Verschelde
4b8a1d21f3 CI: Add --doctool check to find missing classref updates
This will enforce that PRs properly sync the class reference templates to match
their changes to the public API, and help notice binding bugs in the process
(e.g. missing enum bindings, unexpected API changes or missing argument names).

This should also serve as a reminder to contributors that their changes impact
the scripting API and might warrant actually filling the descriptions for the
new methods/properties/etc.

(cherry picked from commit b388412270)
2021-05-04 12:54:52 +02:00
Rémi Verschelde
06136d433b SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c03ae)
(cherry picked from commit e94161dada)
2021-05-04 12:54:34 +02:00
MaxStgs
c5332b1d7a Check PHashTranslation generate p_from is valid
(cherry picked from commit 0bb40df4bb)
2021-05-04 12:54:09 +02:00
Mateo Kuruk Miccino
3c089f6a4f LineEdit: Now double click to select a word, and triple click to select all the content
(cherry picked from commit 74b3021691)
2021-05-04 12:53:40 +02:00
Koala
508cd0bb12 Fix indent left line selection
(cherry picked from commit 2c64008718)
2021-05-04 12:47:58 +02:00
kleonc
045b85b6e0 Make posmod use int64_t instead of int
(cherry picked from commit f04a964627)
2021-05-04 12:47:13 +02:00
PouleyKetchoupp
62d80ba15d Allow values > 1 for friction and bounce in PhysicsMaterial
(cherry picked from commit 67987be644)
2021-05-04 12:45:45 +02:00
PouleyKetchoupp
703c290b71 Fix skinning initialization in MeshInstance when loaded from thread
Fix for a regression from software skinning support:
instance_attach_skeleton wasn't called in set_mesh before, and it's
causing issues when the mesh instance is loaded from a thread.
1. Call from a thread queues instance_attach_skeleton with RID() in the
visual server.
2. Call from the main thread when entering tree calls
instance_attach_skeleton immediately with a valid skeleton
3. Queued instance_attach_skeleton resets the attached skeleton

This change prevents that to happen by making sure
instance_attach_skeleton is not called on set_mesh as it was doing
before, but there might be a more general problem to solve in how
visual server commands are executed when resources are loaded from
a different thread.

(cherry picked from commit feee9f9695)
2021-05-04 12:44:47 +02:00
MaxStgs
387d2a69ca Fix BakedLightmap bias bound check
(cherry picked from commit b4cc8ed6f2)
2021-05-03 17:06:49 +02:00
kleonc
44a4df0476 TileMapEditor Modulate autotile previews
(cherry picked from commit 3f1b95cfb1)
2021-05-03 16:41:48 +02:00
kleonc
839f602859 TileMapEditor::_bucket_fill Check autotile coordinates only if autotile is selected
(cherry picked from commit a1b903066e)
2021-05-03 16:41:28 +02:00
MaxStgs
a93f52ee7e Add WebSocketMultiplayerPeer _incoming_packets check bound
(cherry picked from commit 05ad08941b)
2021-05-03 16:39:04 +02:00
lawnjelly
dacd16fd33 Fix 2d software skinning relative transforms
All my earlier test cases for software skinning had the polys parent transform to be identity. This works fine until you had cases where the user had moved the transform of the parent nodes of skinned polys.

This PR fixes this situation by taking into account the final (concatenated) transform of the polys RELATIVE to the skeleton base transform. It does this by applying the inverse skeleton base transform to the poly final transform.

(cherry picked from commit f33e22001f)
2021-05-03 16:37:58 +02:00
bruvzg
87aa694ae5 Duplicate DynamicFontData resources in the editor preview generation thread to avoid race condition.
(cherry picked from commit 301bedd5d4)
2021-04-30 12:12:49 +02:00
Hugo Locurcio
edf5a03714 Document that SceneTree.call_group() is deferred
(cherry picked from commit 7516ff3805)
2021-04-30 12:11:08 +02:00
Sergey Minakov
2bd40b4c9c [iOS] Nonnegative start index for virtual keyboard range
(cherry picked from commit 275772818d)
2021-04-30 12:07:57 +02:00
Fabio Alessandrelli
e4cbf9c58a [HTML5] Fix build for recent emscripten versions.
Library suffix should be `.a`, the `EXTRA_` in
`EXTRA_EXPORTED_RUNTIME_METHODS` is deprecated.

(cherry picked from commit b0f6dec02e)
2021-04-30 12:07:04 +02:00
thebestnom
8dc3d5eb7a [Android] fix generateDevTemplate
(cherry picked from commit 0477256793)
2021-04-30 12:06:39 +02:00
thebestnom
31bc9d859b [Android] Allow to build dev template with symbols
(cherry picked from commit fd7141fc03)
2021-04-30 12:06:34 +02:00
Hugo Locurcio
08bedba341 Document that clearcoat/rim lighting is not visible on unshaded materials
(cherry picked from commit 8df0e61cc2)
2021-04-29 13:36:57 +02:00
smix8
42c88d99ae Add SkeletonIK function documentation
Add SkeletonIK function documentation

(cherry picked from commit 84e603ec7e)
2021-04-29 13:34:31 +02:00
Rémi Verschelde
05a8ddf3d2 SceneTree: Fix type hints for global_menu_action signal
Fixes https://github.com/godotengine/godot-headers/issues/89.

(cherry picked from commit 6ba10c6c1f)
2021-04-29 13:27:42 +02:00
David Snopek
7212256496 Fixes #48178: WebXR broken when built with Emscripten 2.0.13 or later
(cherry picked from commit b77925d246)
2021-04-29 13:07:22 +02:00
Johannes Witt
00b70f60bb Fix CSG Path Polygon cache being removed after connect
fixes #30229

(cherry picked from commit bab36f1273)
2021-04-29 13:07:11 +02:00
Rémi Verschelde
46a5f3a18e Android: Upgrade buildTools from 30.0.1 to 30.0.3
It seems 30.0.1 had issues with compatibility with JDK 8 and 11,
which appear to be solved in 30.0.3 as per godotengine/godot-docs#4796.

(cherry picked from commit d88e1f04df)
2021-04-29 13:06:35 +02:00
Fabio Alessandrelli
890ec03431 [Net] Fix socket poll timeout on Windows.
Now correctly computes the timeout value in milliseconds.

(cherry picked from commit 46f7b0f74b)
2021-04-29 13:06:17 +02:00
skyace65
dbf71c1b70 Improve SpriteFrames get_animation_loop description
(cherry picked from commit d311c48d6a)
2021-04-29 13:05:52 +02:00
Rémi Verschelde
278af7d023 doc: Mark LargeTexture as deprecated (removed in 4.0)
Cf. https://github.com/godotengine/godot/pull/48269.

(cherry picked from commit 562c6bd9ab)
2021-04-29 13:05:15 +02:00
Thomas ten Cate
88cfde0aba Add OpenSimplexNoise output change to changelog
(cherry picked from commit a980bad0b0)
2021-04-29 13:05:01 +02:00
ray90514
cde16a994c Fix LineEdit undo behaves strangely
(cherry picked from commit 7501c7f48a)
2021-04-29 13:04:39 +02:00
Rémi Verschelde
f172123a7a CI: Upgrade Emscripten to 2.0.15 (same as official standard builds)
We still use Emscripten 1.39.9 for official Mono builds so ideally we want to test
against an old Emscripten version to ensure we don't break compatibility.

But then google-closure-compiler-linux broke compatibility for us and is not properly
pinned, so we need to use a more recent version for now to fix CI.

Cf. https://github.com/emscripten-core/emsdk/issues/802

(cherry picked from commit 9571ae3a33)
2021-04-28 11:52:35 +02:00
Rémi Verschelde
feac30b96a Linux: Remove use_static_cpp override on x86_32
After further testing it seems to work fine now when building binaries with GCC 5
on Ubuntu 16.04 (previously we were using GCC 9 on Ubuntu 14.04).

Follow-up to #45629.

(cherry picked from commit aa15ad72ee)
2021-04-27 13:44:28 +02:00
Rémi Verschelde
5a26bcda12 OSX: Clarify min version requirement (10.12) in Info.plist
The min requirement was upped by #45618 to have proper support for C++14.

Related to #48222.

(cherry picked from commit 8851fa7808)
2021-04-27 13:42:57 +02:00
Marcel Admiraal
d8607d8045 Fix CSGMesh undo not refreshing gizmo
(cherry picked from commit 4311c2f66e)
2021-04-27 13:42:42 +02:00
Marcel Admiraal
84dc716d0d Fix empty CSGShape error
(cherry picked from commit decdf4fcbc)
2021-04-27 13:42:10 +02:00
Maganty Rushyendra
3f3108006f Fix AudioServer Crash when bus count equals 0
(cherry picked from commit ccc375f163)
2021-04-27 13:41:48 +02:00
lawnjelly
1d8d7b0d4b Batching - fix number of verts in translation
The translation to larger vertex formats was assuming that batches were rects, and not accounting that the num_commands had a different meaning for lines and polys, so the calculation for number of vertices to translate was incorrect in these cases.

Also prevents infinite loop if a single polygon has too many vertices to fit in the batch buffer.

(cherry picked from commit d08cf5f434)
2021-04-26 11:54:01 +02:00
lawnjelly
d696d89bc8 Batching - GLES3 fix light pass modulates
The final_modulate was incorrectly being set in the uniform on light passes in GLES3 in situations where color was baked in the vertices. This was already correct in GLES2. This PR makes prevents setting final_modulate in this situation.

(cherry picked from commit 35c5ccce9e)
2021-04-26 11:54:01 +02:00
Francois Belair
3111910331 Make LSP update the filesystem of changed scripts
This updates global classes and exposes base member variables.
Fixes #39713

(cherry picked from commit b16bb33a5b)
2021-04-26 11:54:01 +02:00
rafallus
3ab33d3ce9 Check if _direct_state_changed() argument is valid
- Modified classes: RigidBody, PhysicalBone, VehicleBody, RigidBody2D, KinematicBody2D
- The input argument is untrusted even in release mode

(cherry picked from commit e075b6b411)
2021-04-26 11:51:00 +02:00
Yuri Roubinsky
7a6a150bc2 [3.2] Prevents default values of VSNodeCustom from overriding by a script
(cherry picked from commit ac91e2ca0d)
2021-04-26 11:50:44 +02:00
kleonc
9201ffa9a2 Improve some argument names for core types
(cherry picked from commit 4d7f642fb3)
2021-04-26 11:50:31 +02:00
Yuri Sizov
bceaef6500 Correct pre-deprication warning message regarding linuxbsd/x11 platform
(cherry picked from commit dbd4b45ca2)
2021-04-26 11:50:07 +02:00
Hugo Locurcio
dc98144b99 Link to Feature tags more explicitly in ProjectSettings documentation
(cherry picked from commit 188bd5638c)
2021-04-23 22:05:22 +02:00
Arthur Paulino
3b44829fbd Updating KinematicBody2D "is_on" functions' descriptions
(cherry picked from commit 0c9a1a1cd4)
2021-04-23 22:03:27 +02:00
Rémi Verschelde
5e16b10824 Android: Fix get_buffer false positive on empty dest buffer
Follow-up to #46810, this was missed in #47079 when fixing the issue
for other platforms.

Fixes #48135.

(cherry picked from commit a09f3833bd)
2021-04-23 22:02:34 +02:00
Rémi Verschelde
162c78f9dc Linux: Don't attempt linking embree3 on non-tools, link it for headless too
`tech_debt++`, that's what we get for not taking the time to cleanup all this
and do it right...

Follow-up to #48073 and #48102.

(cherry picked from commit a14b51df92)
2021-04-23 12:34:27 +02:00
Rémi Verschelde
aa84787fb4 lightmapper: Disable build if raycast module can't build
We need to propagate the hacky checks from the raycast config to the
lightmapper config, as the failure of a `can_build()` check is not notified to
other modules (which might even be checked further depending on the processing
order in SConstruct).

A more thorough fix would be to change SConstruct to do two loops on modules:
one to check `can_build()` and disable modules which can't build, then another
one to rechecked `can_build()` with the new lineup and do further config.
But there would be more risk for regressions than with this ad hoc hack.

Similar story for the `platform/x11/detect.py` change... oh my eyes :(

(cherry picked from commit a2c68d9da7)
2021-04-22 19:43:12 +02:00
Hugo Locurcio
1e3166115a Tweak lightmapper warning message to mention Rosetta emulation on macOS
(cherry picked from commit 47f869b731)
2021-04-22 18:08:30 +02:00
Rémi Verschelde
66625962bf embree: Allow building against system library on Linux
(cherry picked from commit b266cc2315)
2021-04-22 18:07:35 +02:00
JFonS
33d6b1f68f CPU lightmapper environment energy fixes.
* Better handling of the scene's environment energy in the lightmapper
  bakes.
* Fixed a bug where ProceduralSky::get_panorama() returned a reference
  instead of a copy.
* Removed includes to Embree's internal header files.

(cherry picked from commit 2db2d1153d)
2021-04-22 18:07:16 +02:00
Rémi Verschelde
bcbf7ce3b6 Add type_traits include for std::is_trivially_destructible
(cherry picked from commit 3d46f28558)
2021-04-22 17:29:23 +02:00
Rémi Verschelde
b616f41573 fbx: Fix include for zlib that broke unbundling
It's possible to link against system zlib on Linux, so we should use system paths.

(cherry picked from commit 93b7406138)
2021-04-22 17:28:57 +02:00
bruvzg
e86d086573 Fix crash on GDNative API json generator exit.
(cherry picked from commit a4423c82f8)
2021-04-22 17:28:25 +02:00
Rémi Verschelde
0ecbf77e30 Bump version to 3.3.1-rc
Directly RC as we'll keep changes conservative to keep this branch usable
in production at any time.
2021-04-22 15:30:52 +02:00
891 changed files with 59274 additions and 34606 deletions

View File

@@ -6,7 +6,6 @@ env:
GODOT_BASE_BRANCH: 3.x
SCONSFLAGS: platform=android verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
SCONS_CACHE_LIMIT: 4096
ANDROID_NDK_VERSION: 21.1.6352462
jobs:
android-template:
@@ -29,10 +28,6 @@ jobs:
with:
java-version: 8
- name: Install Android NDK r21
run: |
sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;${{env.ANDROID_NDK_VERSION}}'
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
id: android-template-cache
@@ -44,6 +39,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
@@ -64,7 +60,6 @@ jobs:
- name: Compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/${{env.ANDROID_NDK_VERSION}}/
run: |
scons target=release tools=no android_arch=armv7
scons target=release tools=no android_arch=arm64v8

View File

@@ -26,6 +26,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x

View File

@@ -6,7 +6,7 @@ env:
GODOT_BASE_BRANCH: 3.x
SCONSFLAGS: platform=javascript verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
SCONS_CACHE_LIMIT: 4096
EM_VERSION: 1.39.20
EM_VERSION: 2.0.15
EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
@@ -35,6 +35,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Additional cache for Emscripten generated system libraries
- name: Load Emscripten cache

View File

@@ -39,6 +39,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
@@ -104,6 +105,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
@@ -167,6 +169,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
@@ -193,18 +196,30 @@ jobs:
scons tools=yes target=debug use_asan=yes use_ubsan=yes
ls -l bin/
# Download and test project to check leaks and invalid memory usage.
# Download test project
# CI has no audio device, so use the Dummy audio driver to avoid spurious error messages.
- name: Importing and running project project
- name: Download project
run: |
wget2 https://github.com/qarmin/RegressionTestProject/archive/3.x.zip
unzip 3.x.zip
mv "RegressionTestProject-3.x" "test_project"
wget2 https://github.com/qarmin/RegressionTestProject/archive/3.3.zip
unzip 3.3.zip
mv "RegressionTestProject-3.3" "test_project"
echo "----- Open editor to check for memory leaks -----"
# Editor is quite complicated piece of software, so it is easy to introduce bug here
- name: Open and close editor
run: |
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s --audio-driver Dummy -e -q --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
echo "----- Run and test project -----"
# Run test project
- name: Run project
run: |
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s 30 --video-driver GLES3 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
# Check class reference
- name: Check for class reference updates
run: |
echo "Running --doctool to see if this changes the public API without updating the documentation."
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s --doctool . 2>&1 > /dev/null || true
git diff --color --exit-code

View File

@@ -27,6 +27,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
@@ -77,6 +78,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x

View File

@@ -38,6 +38,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
@@ -93,6 +94,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x

View File

@@ -32,6 +32,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
@@ -46,7 +47,7 @@ jobs:
- name: Configuring Python packages
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons pywin32
python -m pip install scons
python --version
scons --version
@@ -83,6 +84,7 @@ jobs:
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
continue-on-error: true
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
@@ -97,7 +99,7 @@ jobs:
- name: Configuring Python packages
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons pywin32
python -m pip install scons
python --version
scons --version

View File

@@ -32,6 +32,7 @@ Erik Selecký <35656626+rxlecky@users.noreply.github.com> <35656626+SeleckyErik@
Fabian <supagu@gmail.com>
Ferenc Arn <tagcup@yahoo.com>
Ferenc Arn <tagcup@yahoo.com> <tagcup@users.noreply.github.com>
foxydevloper <12120644+foxydevloper@users.noreply.github.com>
Fredia Huya-Kouadio <fhuyakou@gmail.com>
Fredia Huya-Kouadio <fhuyakou@gmail.com> <fhuya@google.com>
Geequlim <geequlim@gmail.com>
@@ -56,6 +57,7 @@ Indah Sylvia <ISylvox@yahoo.com>
J08nY <johny@neuromancer.sk> <jancar.jj@gmail.com>
J08nY <johny@neuromancer.sk> <J08nY@users.noreply.github.com>
Jakub Grzesik <kubecz3k@gmail.com>
janglee <merupatel123@gmail.com>
Jérôme Gully <jerome.gully0@gmail.com>
JFonS <joan.fonssanchez@gmail.com>
Juan Linietsky <reduzio@gmail.com>
@@ -68,6 +70,7 @@ Kanabenki <lucien.menassol@gmail.com> <18357657+Kanabenki@users.noreply.github.c
Kelly Thomas <kelly.thomas@hotmail.com.au>
Kongfa Waroros <gongpha@hotmail.com>
K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
kleonc <9283098+kleonc@users.noreply.github.com> <kleonc@users.noreply.github.com>
Leon Krause <lk@leonkrause.com> <eska@eska.me>
Leon Krause <lk@leonkrause.com> <eska014@users.noreply.github.com>
Liz Haas <27thLiz@gmail.com>
@@ -91,9 +94,11 @@ Michael Alexsander <michaelalexsander@protonmail.com>
Nathan Franke <natfra@pm.me> <nathanwfranke@gmail.com>
Nathan Lovato <nathan@gdquest.com>
Nathan Warden <nathan@nathanwarden.com> <nathanwardenlee@icloud.com>
Nicholas Huelin <62965063+SirQuartz@users.noreply.github.com>
Nils ANDRÉ-CHANG <nils@nilsand.re>
Nils ANDRÉ-CHANG <nils@nilsand.re> <nils.andre.chang@gmail.com>
Nuno Donato <nunodonato@gmail.com> <n.donato@estrelasustentavel.pt>
Pawel Kowal <pkowal1982@gmail.com>
Pedro J. Estébanez <pedrojrulez@gmail.com> <RandomShaper@users.noreply.github.com>
Paul Batty <p_batty@hotmail.co.uk>
Paul Batty <p_batty@hotmail.co.uk> <Paulb23@users.noreply.github.com>

View File

@@ -28,12 +28,14 @@ name is available.
(in alphabetical order, with over 10 commits excluding merges)
Aaron Franke (aaronfranke)
Aaron Record (LightningAA)
Alexander Holland (AlexHolly)
Alexey Khoroshavin (allkhor)
Alket Rexhepi (alketii)
Andrea Catania (AndreaCatania)
Andrii Doroshenko (Xrayez)
Andy Moss (MillionOstrich)
Angad Kambli (angad-k)
Anish Bhobe (KidRigger)
Anton Yabchinskiy (a12n)
Anutrix
@@ -43,6 +45,7 @@ name is available.
Ben Brookshire (sheepandshepherd)
Benjamin Larsson (Nallebeorn)
Bernard Liebl (poke1024)
Bhuvan Vemula (Bhu1-V)
Błażej Szczygieł (zaps166)
Bojidar Marinov (bojidar-bg)
Bruno Lourenço (MadEqua)
@@ -64,6 +67,7 @@ name is available.
Dmitry Koteroff (Krakean)
Dominik Jasiński (dreamsComeTrue)
DualMatrix
Ellen Poe (ellenhp)
Emmanuel Barroga (codecustard)
Emmanuel Leblond (touilleMan)
Eoin O'Neill (Eoin-ONeill-Yokai)
@@ -74,7 +78,11 @@ name is available.
est31
Fabian Mathews (supagu)
Fabio Alessandrelli (Faless)
fabriceci
Ferenc Arn (tagcup)
follower
foxydevloper
François Belair (Razoric480)
Franklin Sobrinho (TheHX)
Fredia Huya-Kouadio (m4gr3d)
Geequlim
@@ -86,8 +94,11 @@ name is available.
Hanif Bin Ariffin (hbina)
Haoyu Qiu (timothyqiu)
Hein-Pieter van Braam-Stewart (hpvb)
Hendrik Brucker (Geometror)
hilfazer
Hiroshi Ogawa (hi-ogawa)
homer666
hoontee
Hubert Jarosz (Marqin)
Hugo Locurcio (Calinou)
Ian Bishop (ianb96)
@@ -107,8 +118,10 @@ name is available.
Joshua Grams (JoshuaGrams)
Juan Linietsky (reduz)
Julian Murgia (StraToN)
Julien Nguyen (Blackiris)
Justo Delgado (mrcdk)
Kelly Thomas (KellyThomas)
kleonc
Kongfa Waroros (gongpha)
Kostadin Damyanov (Max-Might)
K. S. Ernest (iFire) Lee (fire)
@@ -137,6 +150,7 @@ name is available.
Matthias Hölzl (hoelzl)
Max Hilbrunner (mhilbrunner)
merumelu
Meru Patel (Janglee123)
Michael Alexsander (YeldhamDev)
MichiRecRoom (LikeLakers2)
mrezai
@@ -144,6 +158,7 @@ name is available.
Nathan Franke (nathanfranke)
Nathan Lovato (NathanLovato)
Nathan Warden (NathanWarden)
Nicholas Huelin (SirQuartz)
Nils André-Chang (NilsIrl)
Noah Beard (TwistedTwigleg)
Nuno Donato (nunodonato)
@@ -181,12 +196,14 @@ name is available.
Stijn Hinlopen (hinlopen)
Swarnim Arun (minraws)
Thakee Nathees (ThakeeNathees)
thebestnom
Theo Hallenius (TheoXD)
Thomas Herzog (karroffel)
Timo Schwarzer (timoschwarzer)
Timo (toger5)
Tomasz Chabora (KoBeWi)
Twarit Waikar (IronicallySerious)
Umang Kalra (theoway)
Vinzenz Feenstra (vinzenz)
박한얼 (volzhs)
V. Vamsi Krishna (vkbsb)

View File

@@ -4,6 +4,260 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [3.3.3] - 2021-08-19
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-3-3) for details.
### Added
#### Input
- [Add `action_get_deadzone()` method to InputMap](https://github.com/godotengine/godot/pull/50065).
#### Porting
- [Android: Add partial support for Android scoped storage](https://github.com/godotengine/godot/pull/50359).
### Changed
#### Nodes
- [GraphEdit: Allow higher and lower maximum zoom values](https://github.com/godotengine/godot/pull/49437).
#### Porting
- [Android: Target API level 30, raise min API level to 19](https://github.com/godotengine/godot/pull/50359).
- [HTML5: Raise default initial memory to 32 MiB](https://github.com/godotengine/godot/pull/50422).
### Fixed
#### Audio
- [Fix cubic resampling algorithm](https://github.com/godotengine/godot/pull/51082).
#### Core
- [Save binary `ProjectSettings` key length properly](https://github.com/godotengine/godot/pull/49649).
#### C#
- [Fix C# bindings generator for default value types](https://github.com/godotengine/godot/pull/49702).
- [Ignore paths with invalid chars in `PathWhich`](https://github.com/godotengine/godot/pull/50918).
#### Editor
- [Fix slow load/save of scenes with many instances of the same script](https://github.com/godotengine/godot/pull/49570).
- [Fix logic for showing tilemap debug collision](https://github.com/godotengine/godot/pull/49075).
- [Fix handling of HiDPI scaling for the curve editor's handles](https://github.com/godotengine/godot/pull/50627).
#### GDScript
- [LSP: Translate file path to URI on LSP symbol requests](https://github.com/godotengine/godot/pull/49687).
- [LSP: Implement `didClose` notification](https://github.com/godotengine/godot/pull/50277).
- LSP: Fix [`SymbolKind` reporting wrong types](https://github.com/godotengine/godot/pull/50914) and [`get_node()` parsing](https://github.com/godotengine/godot/pull/51283).
#### Import
- [glTF: Fix mesh nodes which are also bones](https://github.com/godotengine/godot/pull/49119).
- [Fix loading RLE compressed TGA files](https://github.com/godotengine/godot/pull/49603).
#### Input
- [Fix game controllers ignoring the last listed button](https://github.com/godotengine/godot/pull/48934).
#### Networking
- [Fix parsing some IPv6 URLs for WebSocket](https://github.com/godotengine/godot/pull/48205).
- [WebsocketPeer outbound buffer fixes and buffer size query](https://github.com/godotengine/godot/pull/51037).
- [Fix IP address resolution incorrectly locking the main thread](https://github.com/godotengine/godot/pull/51212).
#### Nodes
- [GridMap: Fix erasing octants in the wrong order](https://github.com/godotengine/godot/pull/50052).
- [PathFollow: Fix forward calculation for the position at the end of the curve](https://github.com/godotengine/godot/pull/50986).
- [RichTextLabel: Fix auto-wrapping on CJK texts](https://github.com/godotengine/godot/pull/49280).
- [SkeletonIK: Fixed issue where bones become detached if multiple SkeletonIK nodes are used](https://github.com/godotengine/godot/pull/49031).
#### Physics
- [Avoid NaNs when calculating inertias for bodies without mass/area](https://github.com/godotengine/godot/pull/49185).
- [Ignore disabled shapes for mass property calculations](https://github.com/godotengine/godot/pull/49699).
#### Porting
- [Android: Add GDNative libraries to Android custom Gradle builds](https://github.com/godotengine/godot/pull/49912).
- [Android: Disable resource optimizations for legacy release builds](https://github.com/godotengine/godot/pull/50664).
- [Android: Resolve issue where the Godot app remains stuck when resuming](https://github.com/godotengine/godot/pull/51584).
- [iOS: Fix plugin configuration loading](https://github.com/godotengine/godot/pull/50433).
- [iOS: Remove duplicate orientation settings in the iOS export preset](https://github.com/godotengine/godot/pull/48943).
- [Linux: Fix crash when using ALSA MIDI with PulseAudio](https://github.com/godotengine/godot/pull/48350).
- [macOS: Fix custom mouse cursor not set after mouse mode change](https://github.com/godotengine/godot/pull/49848).
- [Windows: Fix platform file access to allow file sharing with external programs](https://github.com/godotengine/godot/pull/51430).
- [Windows: Fix code signing with `osslsigncode` from Linux/macOS](https://github.com/godotengine/godot/pull/49985).
- [Fix `Directory::get_space_left()` result on macOS and Linux](https://github.com/godotengine/godot/pull/49222).
#### Rendering
- [Fix potential BakedLightmap crash](https://github.com/godotengine/godot/pull/50150).
- [VisualServer now sorts based on AABB position](https://github.com/godotengine/godot/pull/43506).
- [Fixes depth sorting of meshes with transparent textures](https://github.com/godotengine/godot/pull/50721).
- [Fix CanvasItem bounding rect calculation in some cases](https://github.com/godotengine/godot/pull/49160).
- [Fix flipped binormal in SpatialMaterial triplanar mapping](https://github.com/godotengine/godot/pull/49950).
#### Thirdparty
- mbedtls updated to version 2.16.11 (security fix).
- CA root certificates updated to 2021-07-05 bundle from Mozilla.
## [3.3.2] - 2021-05-24
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-3-2) for details.
### Added
#### GDScript
- [Allow `warning-ignore` in the same line as the respective warning](https://github.com/godotengine/godot/pull/47863).
#### Import
- [Print a warning when importing a repeating NPOT texture in a GLES2 project](https://github.com/godotengine/godot/pull/48817).
### Changed
#### Editor
- [Remove high radiance sizes from the editor due to issues on specific GPUs](https://github.com/godotengine/godot/pull/48906).
### Fixed
#### Build system
- [Android: Remove `-fno-integrated-as`, it can break arm64v8 build](https://github.com/godotengine/godot/pull/48851).
- [HTML5: Fix GDNative build with Emscripten 2.0.19+](https://github.com/godotengine/godot/pull/48831).
- [Windows: Fix Embree crash when building with MinGW](https://github.com/godotengine/godot/pull/48888).
* Official builds are made with MinGW, and Godot 3.3.1 was thus subject to this [crash when baking lightmaps](https://github.com/godotengine/godot/issues/48822).
#### Core
- [Fix STL to Godot type conversion of polypartition](https://github.com/godotengine/godot/pull/48921).
- [Fix duplicate close file when deconstructing ZipArchive](https://github.com/godotengine/godot/pull/49013).
* This would trigger a crash in Godot 3.3.1 when [exiting a project running from a ZIP data pack](https://github.com/godotengine/godot/issues/49012).
#### Editor
- [Fix swapped front/rear directions in viewport rotation control](https://github.com/godotengine/godot/pull/48895).
- [Fix editor crash when exporting profiler data](https://github.com/godotengine/godot/pull/48917).
#### Import
- glTF: Improved error handling around [invalid images](https://github.com/godotengine/godot/pull/48904) and [invalid meshes](https://github.com/godotengine/godot/pull/48912).
- [glTF: Fix incorrect skin deduplication when using named binds](https://github.com/godotengine/godot/pull/48913).
#### Physics
- [Fix ragdoll simulation when parent was readded to scene](https://github.com/godotengine/godot/pull/48823).
- [Fix crash on debug shapes update if CollisionObject is not in tree](https://github.com/godotengine/godot/pull/48974).
#### Porting
- [macOS: Allow "on top" windows to enter full-screen mode](https://github.com/godotengine/godot/pull/49017).
#### Rendering
- [Batching: Fix `item_batch_flags` stale state causing glitches](https://github.com/godotengine/godot/pull/48992).
## [3.3.1] - 2021-05-18
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-3-1) for details.
### Added
#### Build system
- [Android: Allow building template with debug symbols using `gradlew generateDevTemplate`](https://github.com/godotengine/godot/pull/48276).
#### Core
- [Expose `Shape.get_debug_mesh()` to the scripting API](https://github.com/godotengine/godot/pull/48316).
#### Editor
- [Add Ctrl+Shift+A shortcut to instance a scene in the Scene Tree dock](https://github.com/godotengine/godot/pull/47530).
- [Allow negative contrast values in the editor theme settings](https://github.com/godotengine/godot/pull/48540).
- [TileMap: Apply modulate on autotile previews](https://github.com/godotengine/godot/pull/48403).
#### Porting
- [Add support for ARM64 architecture for the Embree raycaster (Apple M1, Linux aarch64)](https://github.com/godotengine/godot/pull/48455).
* Note that the OIDN denoiser is still not available on this architecture.
### Changed
#### Physics
- [Create `CollisionObject` debug shapes using `VisualServer`](https://github.com/godotengine/godot/pull/48588).
#### Porting
- [HTML5: Use 64KiB chunk size in JS HTTPClient, for consistency with native platforms](https://github.com/godotengine/godot/pull/48501).
### Fixed
#### Animation
- [Fix SkeletonIK root bones being twisted incorrectly when rotated](https://github.com/godotengine/godot/pull/48251).
- [Fix skinning initialization in `MeshInstance` when loaded from thread](https://github.com/godotengine/godot/pull/48217).
#### Build system
- [HTML5: Fix build with Emscripten 2.0.17+](https://github.com/godotengine/godot/pull/48320).
* We recommend using Emscripten 2.0.15 for this release, which is the one used in official builds.
- Linux: Fix 32-bit builds' compatibility with older libstdc++. The official builds should be compatibile with Ubuntu 16.04 LTS and any other distribution published since 2016.
- Various compilation fixes for some platforms/compilers, and Linux packaging fixes.
#### Core
- [Fix ZIP files being opened with two file descriptors](https://github.com/godotengine/godot/pull/42337).
- [Fix calculation of PrismMesh normals](https://github.com/godotengine/godot/pull/48775).
- [Fix CSG Path Polygon cache being removed after connect](https://github.com/godotengine/godot/pull/48232).
- [LineEdit: Fix double click to select words and triple click to select whole line](https://github.com/godotengine/godot/pull/46527).
#### Editor
- [Fix race condition in font preview generation which could lock the editor on first edit](https://github.com/godotengine/godot/pull/48308).
- [Fix 3D scene preview generation](https://github.com/godotengine/godot/pull/47172).
- [Fix display of programmatically created value in remote inspector](https://github.com/godotengine/godot/pull/44657).
- [Make LSP update the filesystem for changed scripts](https://github.com/godotengine/godot/pull/47891).
#### Porting
- [HTML5: Fix `target_fps` when window loses focus](https://github.com/godotengine/godot/pull/48543).
- [Linux: Handle having no sinks in the PulseAudio driver](https://github.com/godotengine/godot/pull/48706).
- macOS: Update `Info.plist` to clarify that the minimum required version is now macOS 10.12 (due to use of C++14 features).
- [WebXR: Fix incompatibility with Emscripten 2.0.13+ which made WebXR error out](https://github.com/godotengine/godot/pull/48268).
- [Windows: Fix socket poll timeout](https://github.com/godotengine/godot/pull/48203).
#### Rendering
- [Batching: Fix GLES3 light pass modulates](https://github.com/godotengine/godot/pull/48151).
- [Batching: Fix crash with wrong number of verts in translation](https://github.com/godotengine/godot/pull/48125).
- [Batching: Fix invalid polygon rotation](https://github.com/godotengine/godot/pull/48457).
- [Batching: Fallback for 2D skinning with unrigged polygons](https://github.com/godotengine/godot/pull/48647).
- [Lightmapper: Fixes to environment energy](https://github.com/godotengine/godot/pull/48089).
- [Fix 2D software skinning relative transforms](https://github.com/godotengine/godot/pull/48402).
- [Fix usage of proxy textures on GLES2 `PanoramaSky`](https://github.com/godotengine/godot/pull/48541).
- [Fix refraction offset by manually unpacking normal mappings](https://github.com/godotengine/godot/pull/48478).
- [Disable GIProbe emission when disabled on a material](https://github.com/godotengine/godot/pull/48798).
#### VisualScript
- [Fix wrongly setting default value on property hint change](https://github.com/godotengine/godot/pull/48702).
## [3.3] - 2021-04-21
See the [release announcement](https://godotengine.org/article/godot-3-3-has-arrived) for details.
@@ -148,6 +402,8 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
- [SVG images can now be used as a project icon](https://github.com/godotengine/godot/pull/43369).
- [Tweaked log file names for consistency between Mono and non-Mono builds](https://github.com/godotengine/godot/pull/44148).
- [Tweaked command line `--print-fps` display to display milliseconds per frame timings in addition to FPS](https://github.com/godotengine/godot/pull/47735).
- [OpenSimplexNoise is now guaranteed to give consistent results across platforms](https://github.com/godotengine/godot/issues/47211).
- This change breaks compatibility: you get different results even for the same seed.
#### Editor
@@ -342,6 +598,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
- [Fade screen-space reflections towards the inner margin in GLES3](https://github.com/godotengine/godot/pull/41892).
- [Ensure Reinhard tonemapping values are positive in GLES3](https://github.com/godotengine/godot/pull/42056).
## [3.2.3] - 2020-09-17
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-2-3) for details.
@@ -414,6 +671,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
- Windows: DirectInput: Use correct joypad ID
- Thirdparty library updates: mbedtls 2.16.8, stb_vorbis 1.20, wslay 1.1.1
## [3.2.2] - 2020-06-26
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-2-2) for details.
@@ -499,6 +757,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
- Windows: Do not probe joypads if `DirectInput` cannot be initializer
- Windows: Fix overflow condition with QueryPerformanceCounter
## [3.2.1] - 2020-03-10
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-2-1) for details.
@@ -527,6 +786,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
- Windows: Fix UPNP regression after upstream update
- Windows: Disable NetSocket address reuse
## [3.2] - 2020-01-29
### Added
@@ -1253,6 +1513,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
- **X11:** `OS.set_window_maximized()` now gives up after 0.5 seconds.
- This makes the editor no longer freeze on startup when using fvwm.
## [3.1] - 2019-03-13
### Added
@@ -1512,6 +1773,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
- Fixed a security issue relating to deserializing Variants.
## [3.0] - 2018-01-29
### Added
@@ -1645,6 +1907,10 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
- HTML5 export using asm.js.
- Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly.
[3.3.3]: https://downloads.tuxfamily.org/godotengine/3.3.3/Godot_v3.3.3-stable_changelog_chrono.txt
[3.3.2]: https://downloads.tuxfamily.org/godotengine/3.3.2/Godot_v3.3.2-stable_changelog_chrono.txt
[3.3.1]: https://downloads.tuxfamily.org/godotengine/3.3.1/Godot_v3.3.1-stable_changelog_chrono.txt
[3.3]: https://downloads.tuxfamily.org/godotengine/3.3/Godot_v3.3-stable_changelog_chrono.txt
[3.2.3]: https://downloads.tuxfamily.org/godotengine/3.2.3/Godot_v3.2.3-stable_changelog_chrono.txt
[3.2.2]: https://downloads.tuxfamily.org/godotengine/3.2.2/Godot_v3.2.2-stable_changelog_chrono.txt

View File

@@ -133,6 +133,11 @@ Copyright: 2018, Eric Lasota
2018, Microsoft Corp.
License: Expat
Files: ./thirdparty/embree/
Comment: Embree
Copyright: 2009-2021 Intel Corporation
License: Apache-2.0
Files: ./thirdparty/enet/
Comment: ENet
Copyright: 2002-2020, Lee Salzman

259
DONORS.md
View File

@@ -7,7 +7,7 @@ support of generous donors.
The ways to donate to the project, as well as details on how the funds are
used, are described on [Godot's website](https://godotengine.org/donate).
The following is a list of the current monthly donors, to be have their
The following is a list of the current monthly donors, who will have their
generous deed immortalized in the next stable release of Godot Engine.
## Platinum sponsors
@@ -23,30 +23,32 @@ generous deed immortalized in the next stable release of Godot Engine.
## Silver sponsors
ASIFA-Hollywood <https://www.asifa-hollywood.org>
Moonwards <https://www.moonwards.com>
Zenva Academy <https://academy.zenva.com>
LITSLINK <https://litslink.com>
## Bronze sponsors
Ben Nolan
Brandon Lamb
Garry Newman
Gordon MacPherson
Hunter Dickson
Kitcat490
Kyle Szklenski
Moonwards <https://www.moonwards.com>
TrampolineTales <http://trampolinetales.com>
## Mini sponsors
AD Ford
Alejandro Saucedo
alex brown
Andrew Dunai
Angry Skull
anti666
Ben Nolan
blurp
CD
Christian Baune
Christoffer Sundbom
Christopher Montesano
Christopher Shifflett
Daniel Edwards
Darrin Massena
David Mydlarz
Digital Grows
@@ -56,28 +58,31 @@ generous deed immortalized in the next stable release of Godot Engine.
Gamechuck
GameDev.net
Hein-Pieter van Braam
Jacob McKenney
Jasper Brooks
Javary Co.
Jay Sistar
Jeffery Chiu
John G Gentzel
Jonah Stich
Justin Arnold
Kamil Brzezinski
Justo Delgado Baudí
Kamil Brzezinskip
Marcel Kräml
Marek Belski
Matthieu Huvé
Maxim Karsten
Mike King
Nathan Warden
Neal Gompa (Conan Kudo)
Ninja_5tyl3
Patrick Horn
Patrick Schmidt
Péter Magyar
Rami
Relintai
Ronnie Cheng
Slobodan Milnovic
Stephan Lanfermann
Steve
Stonesoft io
Thomas Krampl
Tristan Pemble
Violin Iliev
@@ -86,23 +91,22 @@ generous deed immortalized in the next stable release of Godot Engine.
## Gold donors
Acheron
Adam Brown
albinaask
Alvaro A Baena R
Andres Hernandez
Asher Glick
Barugon
Carlo Cabanilla
Chris Goddard
Christopher Case
Daniel James
David Gehrig
David Graham
David Snopek
Don B
Ed Morley
Ellen Poe
Florian Rämisch
Forge
Gamejunkey
Hoojib
Jakub Grzesik
Javier Roman
Joan Fons
@@ -112,65 +116,69 @@ generous deed immortalized in the next stable release of Godot Engine.
Klavdij Voncina
kuku
Lex Steers
Luke
Maciej Pendolski
Manuele Finocchiaro
Markus Wiesner
Mason Bially
Matthew Hillier
Michael
m kaersten
Monster Vial
Officine Pixel S.n.c.
Petrus Prinsloo
Rene
Retro Village
Rob Messick
Roland Fredenhagen
Ronan Zeegers
Sandro Jenny
Sarksus
Scott B
Sean
Sergey
Sofox
Stephen Molyneaux
Taylor Ritenour
Tom Langwaldt
Tricky Fat Cat
tukon
Vagabond Arcade
Vitaliy Sapronenko
William Wold
xagonist
Xeno Coliseum
Zaven Muradyan
Adam Nakonieczny
Adrian Adamiak
Alexander J Maynard
Alex de la Mare
Alexey Dyadchenko
Alex Khayrullin
alice gambrell
Andreas Funke
Andrew Cunningham
Andrew Farr
Antanas Paskauskas
Antoni Batchelli
Arch Henderson III
Arisaka Mayuki
Arthur S. Muszynski
Ben Botwin
Brandon Hawkinson
Caleb Sizemore
Can Eris
Cameron Connolly
Charlie Whitfield
Chase Taranto
Chelsea Hash
Chris Petrich
Chris Serino
Christian Leth Jeppesen
Cow
Craig Ostrin
Craig Scarborough
Craig Smith
Cristopher
CzechBlueBear
D
dan didenko
Daniel Hernández Alcojor
Daniel Tebbutt
Darrian Little
Dennis Belfrage
Dev To be curious
@@ -179,29 +187,38 @@ generous deed immortalized in the next stable release of Godot Engine.
Donn Eddy
Easypete
Edgar Sun
Eric
Eric Brand
Eugenio Hugo Salgüero Jáñez
EXUREI
flesk
F S
foxydevloper
Fransiska
Gabrielius Vaiškūnas
Gary Hulst
gavlig
General Chicken
Geoffroy Warin
GGGames.org
GrayDwarf
Guilherme Felipe de C. G. da Silva
Harvey Fong
Hayden Whitehead
Heath Hayes
Horváth Péter
Hu Hund
Hunter Barabas
Jake Burga
James Couzens
Jan Sælid
Jared
Jared White
Jeppe Zapp
Jesús Chicharro
Joel Fivat
Joel Höglund
Johnathan Kupferer
John Knight
Jonathan Turner
Jose Malheiro
Jose Manuel Muñoz Perez
Joseph Crane
@@ -211,40 +228,42 @@ generous deed immortalized in the next stable release of Godot Engine.
Juan T Chen
Juan Velandia
Judd
Julián Absatz
Julian Todd
Juraj Móza
JUSTIN CARROLL
Justo Delgado Baudí
Kelteseth
kickmaniac
kinfox
Kis Levente Lorand
Kos
Lachie
Lain Ballard
Laszlo Kiss
leetNightshade
Leo Fidel R Liban
Liam Smyth
Luc-Frédéric Langis
Łukasz Nowak
LoparPanda
Luca Vazzano
MadScientistCarl
Marcelo Dornbusch Lopes
Marcus Dobler
Marcus Richter
Marek Belski
Mark Barrett
Martin Eigel
Martin Kotz
Martin Soucek
Matt Eunson
matt
Matt Greene
Matthias Toepp
Mecha Kaiju X
medecau
Michael
Michael Bordießer-Krauth
Michael Dürwald
Michael Policastro
MightyPossum
MikadoSC
Mike Barbee
minz1
MuffinManKen
nate etan
Nick Abousselam
@@ -257,24 +276,27 @@ generous deed immortalized in the next stable release of Godot Engine.
Pavel Kotlyar
Pedro Silva
Pete Goodwin
Peter Richmond
Petr Malac
PhaineOfCatz
pl
Raymond Harris
Raz A
Renato Fontes
Rene Tailleur
Rhodochrone
Ricardo Alcantara
Robert Larnach
Rob
Robert McDermott
Robert Willes
Rob McInroy
Rocknight Studios
Rodrigo Favarete
Romeo Disca
Ronnie Ashlock
Ronny Mühle
Ryan Scott
Ryszard Sommefeldt
Samuel Judd
Samuel Smart
Sean Morgan
Sebastian Hutter
Sébastien
@@ -288,32 +310,36 @@ generous deed immortalized in the next stable release of Godot Engine.
Stephan Hennion
Steven Landow
Stoned Xander
Super Izzo
Sven F.
Thomas Bjarnelöf
Thomas Kurz
Tim Howard
Tobias Bocanegra
Todd Smith
Torbulous
toto bibi
Troy Kinsella
Turntsnaco
tweaklab
Valryia
VikFro
Vincent Cloutier
Vlad Ceru Opran
VoidPointer
voxelv
Winston
Wojciech Chojnacki
xzibiting
Yifan Lai
Yuancheng Zhang
Zhou Tuizhi
Zie Weaver
Zoran Kukulj
## Silver donors
1D_Inc
Abraham Haskins
Adam
Adam Brown
Aaron Oldenburg
Actual_Dio
Adam Brunnmeier
Adam Carr
Adam Long
@@ -322,8 +348,8 @@ generous deed immortalized in the next stable release of Godot Engine.
Adam Smeltzer
Adam Szymański
Adisibio
Adrien de Pierres
Agar3s - Giovanny Beltrán
Agustinus Arya
Ahmet Kalyoncu
Aidan O'Flannagain
Aki Mimoto
@@ -334,45 +360,50 @@ generous deed immortalized in the next stable release of Godot Engine.
AleMax
Alessandro Senese
Alexander Erlemann
Alexander Ravenheart
Alexander Ryndin
Alexander Walter (SilvanuZ)
Alexandre Beaudoin
alex clavelle
Alex Chan
Alex Clavelle
alex raeside
Alex (Well Done Games)
Allan Davis
Allen Schade
Aloehart
Anders Marstein Kruke
Andreas Krampitz
Andre Stackhouse
Andrew Groot
andrew james morris
Andrew Mansuetti
Andrew Thomas
Ano Nim
Anthony Avina
Anton Bouwer
aomimezura11
AP Condomines
Arch Toasty
Arda Erol
Armin Preiml
Arseniy M
Arthur Brainville
Ashley Claymore
Astier Mickael
Aubrey Falconer
aurelien condomines
AzulCrescent
Balázs Batári
Baptiste Le Bourhis
Bartosz Bielecki
Benedikt
Benoit Jauvin-Girard
Ben Vercammen
Bernd Jänichen
Bernhard Werner
Bill Thibault
Bjarne Voigtländer
Black Block
blackjacksike
Blair Allen
Bobby CC Wong
Borkzilla
Boyd Trolinger
Bram
brian
Brian Klein
@@ -382,11 +413,11 @@ generous deed immortalized in the next stable release of Godot Engine.
Burney Waring
bwhirt
Caleb Gartner
Caleb Makela
Cameron Meyer
Carlos Cejudo
Carl van der Geest
Carwyn Edwards
Cas Brugman
Casey
Cassidy James
Cédric Givord
Chad Steadman
@@ -399,25 +430,27 @@ generous deed immortalized in the next stable release of Godot Engine.
Christoffer Dahlblom
Christophe Gagnier
Christopher Chin
Christopher Schmitt
Chris Truebe
Clay Heaton
Cody Parker
Conall O
Conner Lane
Corchari
Craig Maloney
Craig Post
CzechBlueBear
C. R. Messen
damucz
Daniel Cheney
Daniel Johnson
DanielMaximiano
Daren Scot Wilson
Dave Walker
David Baker
David Bôle
David May
David Maziarka
David Woodard
deadwithbread
Devin Carraway
Diego Pereira
Dima Fedotov
Dmitry Fisher
Dmytro Korchynskyi
Dominik Wetzel
@@ -434,6 +467,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Egon Elbre
Elgenzay
Elias Nykrem
Emerson MX
Ephemeral
Eric Stokes
Eric Walkingshaw
@@ -445,75 +479,87 @@ generous deed immortalized in the next stable release of Godot Engine.
fby
Fekinox
Felix Bohmann
Flaredown
Forty Doubleu
Francisco Garcia Florez
Francois Holland
Frank
FrostMarble
Game Endeavor
Gareth Knowles
Gary Thomas
George Marques
georgios katsanakis
GFizz
Georgi Petkov
Graham Overby
Greg Lincoln
Greg Olson
Greyson Richey
Grid
Guillaume Audirac
Grominet
Guillaume Pham Ngoc
Guldoman
Gustavo Loureiro dos Reis
Hal A
helija
Hayden Foley
Heribert Hirth
Houdini Blueprints
Hunter Jones
Ian ORourke
Ian Williams
Iiari
IndustrialRobot
Ivan Nikolaev
iveks
Jackson Harmer
Jacob
Jacob D
Jaguar
Jaime Ruiz-Borau Vizárraga
Jake D
Jake Huxell
Jako Danar
James
James A F Manley
James Guardino
James Quincy
James Thomas
Jamie Massey
Janis Skuja
Jan Vetulani
JARKKO PARVIAINEN
Jason Bolton
Jason Malcolm-Herzmark
Jason Uechi
Jeff Hungerford
Jeff Messer
Jeffrey Berube
Jennifer Graves
JernauGurgeh
Jesse Dubay
Jhon Adams
Jim Engstrand
Joe Klemmer
Joel Höglund
John Bruce
John Gabriel
John Szevin
Jonah Branch
Jonas
Jonas Arndt
Jonas Bernemann
Jonas Rudlang
Jonas Yamazaki
Jonatan R
Jonathan Bieber
Jonathan G
Jonathan Wright
Jon Bonazza
Jon Oakes
Jon Sully
Jordan West
Jordy Goodridge
Jorge Antunes
Jorge Araya Navarro
Jose C. Rubio
Joseph Catrambone
Josep Sanchez
Josh Taylor
Joshua Heidrich
jromkjrom
Juanfran
Juan Maggi
Juan Uys
Jueast
Julian Murgia
@@ -523,7 +569,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Justin Spedding
Justin W. Flory
KaDokta
Kalin
Karol Porzycki
Keedong Park
Keinan Powers
Keith Bradner
@@ -532,13 +578,20 @@ generous deed immortalized in the next stable release of Godot Engine.
Kenneth Lee
Kent Jofur
Ketafuki
Kevin van Rooijen
Kiri Jolly
Kjetil Haugland
Kodera Software
Kolandrious
Konstantin Goncharov
Kridsada Thanabulpong
kormai
Krishna Nadoor
Kristian Nygaard Jensen
KR McGinley
Kronarq
KsyTek Games
kycho
Kyle Burnett
Kyle Jacobs
Kyuppin
Lasse le Dous
@@ -549,12 +602,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Leonardo Dimano
Lin Chear
Linus Lind Lundgren
Ludovic DELVAL
Luigi Renna
Luis Gaemperle
Luis M
LunaticInAHat
Major Haul
makoto asano
Malcolm
Marco Lardelli
Mark Jad
@@ -563,34 +616,40 @@ generous deed immortalized in the next stable release of Godot Engine.
Markus Michael Egger
Martin FIbik
Martin Holas
Martin Liška
Martin Trbola
Marvin
Mathieu
Matt Edwards
Matthew Booe
Matt Sylvia
Maverick
Max Fiedler
Maxime Blade
Maxwell
Megasploot
Melissa Mears
Merlyn Morgan-Graham
mewin
mhilbrunner
Michael
Michael Bruce-Lockhart
Michael Haney
Michael Morrison
Michał Skwarek
Michel Candries
MidoriBunn 'tis BS
Mikayla
Mike
Mike Birkhead
Mike Copley
Mike Cunningham
Mitchell J. Wagner
MJacred
ModularMind
Molinghu
Molly Jameson
MoltenGears
MrAZIE
Mrjemandem
Nathan Fish
Nathaniel
nee
@@ -599,105 +658,118 @@ generous deed immortalized in the next stable release of Godot Engine.
Neil Wang
Nerdforge
Nerdyninja
Nicholas
Nicholas La Roux
Nicholas Orlowski
Nick Eldrenkamp
Nick Macholl
Niclas Eriksen
Nicolas Goll-Perrier
Nicolas Rosset
Nicolas SAN AGUSTIN
Nima Farid
Noel Billig
Nuno Dionísio
NZ
oceoh
Okatima
OKV
Oleg Reva
Oleksandr Kryvonos
Omar Delarosa
Orfist
Oriol Muñoz Princep
oscar1000108
Oscar Domingo
Pascal
Patrick Brock
Patrick Nafarrete
Paul Gieske
Paweł Kowal
Paweł Łyczkowski
p_brighenti
Peter Höglund
Peter Richmond
Petrus Prinsloo
Philip Cohoe
Philip Ludington (MrPhil)
Pierre Caye
Piotr Góral
pj
Point08
Preethi Vaidyanathan
pwab
RabidTunes
Rackat
Rad Cat
Rafa Laguna
Raffaele Aramo
Rainer Amler
Rami Hanano
Rammeow
RAMupgrade
Remi Rampin
Rémi Verschelde
Reneator
Riccardo Marini
Richard Hayes
Richard Ivánek
Richard Néveri
Riley
Robert Farr (Larington)
Rob Ruana
Rodrigo Loli
Roger Smith
Roland Rząsa
Roman Tinkov
Ronald Ho Hip (CrimsonZA)
Ronan
Ross Squires
Roy Scayged
Ryan Groom
Sam Caulfield
Sam Edson
Samuele Zolfanelli
scapegoat57
Scott D. Yelich
Scott Longley
Sean Lynch
Sebastian Michailidis
segfault-god
SeongWan Kim
Sergey
Sergiy Onenko
SeungJong k
Shaidak
Shane
Shane Sicienski
Shane Spoor
Siim Raidma
simdee
Simon Jonas Larsen
Simon Schoenenberger
Simon Wenner
sirn
Skalli
smbe19
smo1704
soft circles
Solene Waked
Spencer Everhart
Squirrel
Stéphane Roussel
Steve Cloete
summerblind
Sung soo Choi
Svenne Krap
SxP
tadashi endo
tannhauser_gate
Tarch
Terry
the9thdude
Theodore Lindsey
TheVoiceInMyHead
thomas
Thomas Bechtold
Thomas Detoy
Thomas Horwath
Tianren Qin
Till1805
Tim Drumheller
Tim Erskine
Tim Gleason
Timothy B. MacDonald
Title Plinsut
TMoney
Toadile
Tobias Bradtke
Tom Coxon
Toni Duran
Tony Zhao
Tom Webster
Torgeir Lilleskog
Torsten Crass
toupeira
@@ -708,19 +780,17 @@ generous deed immortalized in the next stable release of Godot Engine.
Troy Bonneau
Tryggve Sollid
Turgut Temucin
Tyler Compton
Tyler Stafos
UltyX
Uther
v01tech
Vaughan Ling
Victor
Viktor Ismagilov
Vincent Foulon
Vi Watch
Vladimir Savin
Vladislav Smirnov
Vytenis Narušis
waka nya
Wayne Haak
werner mendizabal
Wiley Thompson
William Edwards
@@ -729,10 +799,13 @@ generous deed immortalized in the next stable release of Godot Engine.
Wyatt Goodin
x1212
xenomat
Yan Shi
Yegor Smirnov
Zak Stephens
Эльдар Будагов
Zher Huei Lee
蕭惟允
貴宏 小松
郝晨煜
## Bronze donors

View File

@@ -151,6 +151,7 @@ opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise e
# Thirdparty libraries
opts.Add(BoolVariable("builtin_bullet", "Use the built-in Bullet library", True))
opts.Add(BoolVariable("builtin_certs", "Use the built-in SSL certificates bundles", True))
opts.Add(BoolVariable("builtin_embree", "Use the built-in Embree library", True))
opts.Add(BoolVariable("builtin_enet", "Use the built-in ENet library", True))
opts.Add(BoolVariable("builtin_freetype", "Use the built-in FreeType library", True))
opts.Add(BoolVariable("builtin_libogg", "Use the built-in libogg library", True))
@@ -194,7 +195,13 @@ elif env_base["p"] != "":
selected_platform = env_base["p"]
else:
# Missing `platform` argument, try to detect platform automatically
if sys.platform.startswith("linux"):
if (
sys.platform.startswith("linux")
or sys.platform.startswith("dragonfly")
or sys.platform.startswith("freebsd")
or sys.platform.startswith("netbsd")
or sys.platform.startswith("openbsd")
):
selected_platform = "x11"
elif sys.platform == "darwin":
selected_platform = "osx"
@@ -212,7 +219,7 @@ else:
if selected_platform in ["linux", "bsd", "linuxbsd"]:
if selected_platform == "linuxbsd":
# Alias for forward compatibility.
print('Platform "linuxbsd" is still called "x11" in Godot 3.2.x. Building for platform "x11".')
print('Platform "linuxbsd" is still called "x11" in Godot 3.x. Building for platform "x11".')
# Alias for convenience.
selected_platform = "x11"
@@ -421,17 +428,21 @@ if selected_platform in platform_list:
else: # GCC, Clang
version = methods.get_compiler_version(env) or [-1, -1]
gcc_common_warnings = []
common_warnings = []
if methods.using_gcc(env):
gcc_common_warnings += ["-Wno-misleading-indentation"]
common_warnings += ["-Wno-misleading-indentation"]
if version[0] >= 7:
gcc_common_warnings += ["-Wshadow-local"]
common_warnings += ["-Wshadow-local"]
elif methods.using_clang(env) or methods.using_emcc(env):
# We often implement `operator<` for structs of pointers as a requirement
# for putting them in `Set` or `Map`. We don't mind about unreliable ordering.
common_warnings += ["-Wno-ordered-compare-function-pointers"]
if env["warnings"] == "extra":
# Note: enable -Wimplicit-fallthrough for Clang (already part of -Wextra for GCC)
# once we switch to C++11 or later (necessary for our FALLTHROUGH macro).
env.Append(CCFLAGS=["-Wall", "-Wextra", "-Wwrite-strings", "-Wno-unused-parameter"] + gcc_common_warnings)
env.Append(CCFLAGS=["-Wall", "-Wextra", "-Wwrite-strings", "-Wno-unused-parameter"] + common_warnings)
env.Append(CXXFLAGS=["-Wctor-dtor-privacy", "-Wnon-virtual-dtor"])
if methods.using_gcc(env):
env.Append(
@@ -447,9 +458,9 @@ if selected_platform in platform_list:
if version[0] >= 9:
env.Append(CCFLAGS=["-Wattribute-alias=2"])
elif env["warnings"] == "all":
env.Append(CCFLAGS=["-Wall"] + gcc_common_warnings)
env.Append(CCFLAGS=["-Wall"] + common_warnings)
elif env["warnings"] == "moderate":
env.Append(CCFLAGS=["-Wall", "-Wno-unused"] + gcc_common_warnings)
env.Append(CCFLAGS=["-Wall", "-Wno-unused"] + common_warnings)
else: # 'no'
env.Append(CCFLAGS=["-w"])

View File

@@ -40,6 +40,9 @@ with open("script_encryption_key.gen.cpp", "w") as f:
# Add required thirdparty code.
thirdparty_obj = []
env_thirdparty = env.Clone()
env_thirdparty.disable_warnings()
@@ -57,7 +60,7 @@ thirdparty_misc_sources = [
"clipper.cpp",
]
thirdparty_misc_sources = [thirdparty_misc_dir + file for file in thirdparty_misc_sources]
env_thirdparty.add_source_files(env.core_sources, thirdparty_misc_sources)
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_misc_sources)
# Zlib library, can be unbundled
if env["builtin_zlib"]:
@@ -83,7 +86,7 @@ if env["builtin_zlib"]:
if env["target"] == "debug":
env_thirdparty.Append(CPPDEFINES=["ZLIB_DEBUG"])
env_thirdparty.add_source_files(env.core_sources, thirdparty_zlib_sources)
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_zlib_sources)
# Minizip library, could be unbundled in theory
# However, our version has some custom modifications, so it won't compile with the system one
@@ -94,7 +97,7 @@ thirdparty_minizip_sources = [
"zip.c",
]
thirdparty_minizip_sources = [thirdparty_minizip_dir + file for file in thirdparty_minizip_sources]
env_thirdparty.add_source_files(env.core_sources, thirdparty_minizip_sources)
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_minizip_sources)
# Zstd library, can be unbundled in theory
# though we currently use some private symbols
@@ -136,10 +139,14 @@ if env["builtin_zstd"]:
# Also needed in main env includes will trigger warnings
env.Append(CPPDEFINES=["ZSTD_STATIC_LINKING_ONLY"])
env_thirdparty.add_source_files(env.core_sources, thirdparty_zstd_sources)
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_zstd_sources)
# Godot's own sources
env.core_sources += thirdparty_obj
# Godot source files
env.add_source_files(env.core_sources, "*.cpp")
# Certificates
@@ -185,3 +192,6 @@ SConscript("bind/SCsub")
# Build it all as a library
lib = env.add_library("core", env.core_sources)
env.Prepend(LIBS=[lib])
# Needed to force rebuilding the core files when the thirdparty code is updated.
env.Depends(lib, thirdparty_obj)

View File

@@ -815,7 +815,7 @@ int64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
unsigned int hour = ((datetime.has(HOUR_KEY)) ? static_cast<unsigned int>(datetime[HOUR_KEY]) : 0);
unsigned int day = ((datetime.has(DAY_KEY)) ? static_cast<unsigned int>(datetime[DAY_KEY]) : 1);
unsigned int month = ((datetime.has(MONTH_KEY)) ? static_cast<unsigned int>(datetime[MONTH_KEY]) : 1);
unsigned int year = ((datetime.has(YEAR_KEY)) ? static_cast<unsigned int>(datetime[YEAR_KEY]) : 0);
unsigned int year = ((datetime.has(YEAR_KEY)) ? static_cast<unsigned int>(datetime[YEAR_KEY]) : 1970);
/// How many days come before each month (0-12)
static const unsigned short int DAYS_PAST_THIS_YEAR_TABLE[2][13] = {
@@ -826,15 +826,14 @@ int64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
};
ERR_FAIL_COND_V_MSG(second > 59, 0, "Invalid second value of: " + itos(second) + ".");
ERR_FAIL_COND_V_MSG(minute > 59, 0, "Invalid minute value of: " + itos(minute) + ".");
ERR_FAIL_COND_V_MSG(hour > 23, 0, "Invalid hour value of: " + itos(hour) + ".");
ERR_FAIL_COND_V_MSG(year == 0, 0, "Years before 1 AD are not supported. Value passed: " + itos(year) + ".");
ERR_FAIL_COND_V_MSG(month > 12 || month == 0, 0, "Invalid month value of: " + itos(month) + ".");
// Do this check after month is tested as valid
ERR_FAIL_COND_V_MSG(day > MONTH_DAYS_TABLE[LEAPYEAR(year)][month - 1] || day == 0, 0, "Invalid day value of '" + itos(day) + "' which is larger than '" + itos(MONTH_DAYS_TABLE[LEAPYEAR(year)][month - 1]) + "' or 0.");
unsigned int days_in_month = MONTH_DAYS_TABLE[LEAPYEAR(year)][month - 1];
ERR_FAIL_COND_V_MSG(day == 0 || day > days_in_month, 0, "Invalid day value of: " + itos(day) + ". It should be comprised between 1 and " + itos(days_in_month) + " for month " + itos(month) + ".");
// Calculate all the seconds from months past in this year
uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR = DAYS_PAST_THIS_YEAR_TABLE[LEAPYEAR(year)][month - 1] * SECONDS_PER_DAY;
@@ -1192,9 +1191,8 @@ bool _OS::is_keep_screen_on() const {
return OS::get_singleton()->is_keep_screen_on();
}
String _OS::get_system_dir(SystemDir p_dir) const {
return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir));
String _OS::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir), p_shared_storage);
}
String _OS::get_scancode_string(uint32_t p_code) const {
@@ -1411,7 +1409,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_dynamic_memory_usage"), &_OS::get_dynamic_memory_usage);
ClassDB::bind_method(D_METHOD("get_user_data_dir"), &_OS::get_user_data_dir);
ClassDB::bind_method(D_METHOD("get_system_dir", "dir"), &_OS::get_system_dir);
ClassDB::bind_method(D_METHOD("get_system_dir", "dir", "shared_storage"), &_OS::get_system_dir, DEFVAL(true));
ClassDB::bind_method(D_METHOD("get_unique_id"), &_OS::get_unique_id);
ClassDB::bind_method(D_METHOD("is_ok_left_and_cancel_right"), &_OS::is_ok_left_and_cancel_right);
@@ -2534,15 +2532,17 @@ Error _Directory::copy(String p_from, String p_to) {
Error _Directory::rename(String p_from, String p_to) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
ERR_FAIL_COND_V_MSG(p_from.empty() || p_from == "." || p_from == "..", ERR_INVALID_PARAMETER, "Invalid path to rename.");
if (!p_from.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_from);
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from), ERR_DOES_NOT_EXIST, "File does not exist.");
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from) && !d->dir_exists(p_from), ERR_DOES_NOT_EXIST, "File or directory does not exist.");
Error err = d->rename(p_from, p_to);
memdelete(d);
return err;
}
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from), ERR_DOES_NOT_EXIST, "File does not exist.");
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from) && !d->dir_exists(p_from), ERR_DOES_NOT_EXIST, "File or directory does not exist.");
return d->rename(p_from, p_to);
}
Error _Directory::remove(String p_name) {

View File

@@ -347,7 +347,7 @@ public:
SCREEN_ORIENTATION_SENSOR,
};
String get_system_dir(SystemDir p_dir) const;
String get_system_dir(SystemDir p_dir, bool p_shared_storage = true) const;
String get_user_data_dir() const;

View File

@@ -93,14 +93,14 @@ struct Color {
Color inverted() const;
Color contrasted() const;
_FORCE_INLINE_ Color linear_interpolate(const Color &p_b, float p_t) const {
_FORCE_INLINE_ Color linear_interpolate(const Color &p_to, float p_weight) const {
Color res = *this;
res.r += (p_t * (p_b.r - r));
res.g += (p_t * (p_b.g - g));
res.b += (p_t * (p_b.b - b));
res.a += (p_t * (p_b.a - a));
res.r += (p_weight * (p_to.r - r));
res.g += (p_weight * (p_to.g - g));
res.b += (p_weight * (p_to.b - b));
res.a += (p_weight * (p_to.a - a));
return res;
}

View File

@@ -45,6 +45,7 @@ struct _PHashTranslationCmp {
void PHashTranslation::generate(const Ref<Translation> &p_from) {
#ifdef TOOLS_ENABLED
ERR_FAIL_COND(p_from.is_null());
List<StringName> keys;
p_from->get_message_list(&keys);

View File

@@ -6,6 +6,7 @@ env_crypto = env.Clone()
is_builtin = env["builtin_mbedtls"]
has_module = env["module_mbedtls_enabled"]
thirdparty_obj = []
if is_builtin or not has_module:
# Use our headers for builtin or if the module is not going to be compiled.
@@ -35,6 +36,16 @@ if not has_module:
"godot_core_mbedtls_platform.c",
]
thirdparty_mbedtls_sources = [thirdparty_mbedtls_dir + file for file in thirdparty_mbedtls_sources]
env_thirdparty.add_source_files(env.core_sources, thirdparty_mbedtls_sources)
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_mbedtls_sources)
env.core_sources += thirdparty_obj
env_crypto.add_source_files(env.core_sources, "*.cpp")
# Godot source files
core_obj = []
env_crypto.add_source_files(core_obj, "*.cpp")
env.core_sources += core_obj
# Needed to force rebuilding the core files when the thirdparty library is updated.
env.Depends(core_obj, thirdparty_obj)

View File

@@ -415,6 +415,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_19);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_20);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_21);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_22);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE);
@@ -448,6 +449,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_DOWN);
BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(JOY_GUIDE);
BIND_GLOBAL_ENUM_CONSTANT(JOY_MISC1);
BIND_GLOBAL_ENUM_CONSTANT(JOY_PADDLE1);
BIND_GLOBAL_ENUM_CONSTANT(JOY_PADDLE2);

View File

@@ -1104,7 +1104,7 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
void Image::crop_from_point(int p_x, int p_y, int p_width, int p_height) {
ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot crop in compressed or custom image formats.");
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot modify image when it is locked.");
ERR_FAIL_COND_MSG(p_x < 0, "Start x position cannot be smaller than 0.");
ERR_FAIL_COND_MSG(p_y < 0, "Start y position cannot be smaller than 0.");
ERR_FAIL_COND_MSG(p_width <= 0, "Width of image must be greater than 0.");
@@ -1351,7 +1351,8 @@ void Image::expand_x2_hq2x() {
}
void Image::shrink_x2() {
ERR_FAIL_COND(!_can_modify(format));
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot modify image when it is locked.");
ERR_FAIL_COND(data.size() == 0);
if (mipmaps) {
@@ -1455,6 +1456,8 @@ Error Image::generate_mipmaps(bool p_renormalize) {
ERR_FAIL_COND_V_MSG(!_can_modify(format), ERR_UNAVAILABLE, "Cannot generate mipmaps in compressed or custom image formats.");
ERR_FAIL_COND_V_MSG(write_lock.ptr(), ERR_UNAVAILABLE, "Cannot modify image when it is locked.");
ERR_FAIL_COND_V_MSG(format == FORMAT_RGBA4444 || format == FORMAT_RGBA5551, ERR_UNAVAILABLE, "Cannot generate mipmaps in custom image formats.");
ERR_FAIL_COND_V_MSG(width == 0 || height == 0, ERR_UNCONFIGURED, "Cannot generate mipmaps with width or height equal to 0.");
@@ -1587,6 +1590,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma
ERR_FAIL_COND_MSG(p_width > MAX_WIDTH, "Image width cannot be greater than " + itos(MAX_WIDTH) + ".");
ERR_FAIL_COND_MSG(p_height > MAX_HEIGHT, "Image height cannot be greater than " + itos(MAX_HEIGHT) + ".");
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot create image when it is locked.");
ERR_FAIL_INDEX_MSG(p_format, FORMAT_MAX, "Image format out of range, please see Image's Format enum.");
int mm = 0;
int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0);
@@ -1607,6 +1611,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma
ERR_FAIL_COND_MSG(p_height <= 0, "Image height must be greater than 0.");
ERR_FAIL_COND_MSG(p_width > MAX_WIDTH, "Image width cannot be greater than " + itos(MAX_WIDTH) + ".");
ERR_FAIL_COND_MSG(p_height > MAX_HEIGHT, "Image height cannot be greater than " + itos(MAX_HEIGHT) + ".");
ERR_FAIL_INDEX_MSG(p_format, FORMAT_MAX, "Image format out of range, please see Image's Format enum.");
int mm;
int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0);
@@ -3018,6 +3023,8 @@ void Image::premultiply_alpha() {
}
void Image::fix_alpha_edges() {
ERR_FAIL_COND(!_can_modify(format));
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot modify image when it is locked.");
if (data.size() == 0)
return;

View File

@@ -46,6 +46,7 @@ void InputMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("erase_action", "action"), &InputMap::erase_action);
ClassDB::bind_method(D_METHOD("action_set_deadzone", "action", "deadzone"), &InputMap::action_set_deadzone);
ClassDB::bind_method(D_METHOD("action_get_deadzone", "action"), &InputMap::action_get_deadzone);
ClassDB::bind_method(D_METHOD("action_add_event", "action", "event"), &InputMap::action_add_event);
ClassDB::bind_method(D_METHOD("action_has_event", "action", "event"), &InputMap::action_has_event);
ClassDB::bind_method(D_METHOD("action_erase_event", "action", "event"), &InputMap::action_erase_event);
@@ -156,6 +157,12 @@ bool InputMap::has_action(const StringName &p_action) const {
return input_map.has(p_action);
}
float InputMap::action_get_deadzone(const StringName &p_action) {
ERR_FAIL_COND_V_MSG(!input_map.has(p_action), 0.0f, _suggest_actions(p_action));
return input_map[p_action].deadzone;
}
void InputMap::action_set_deadzone(const StringName &p_action, float p_deadzone) {
ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));

View File

@@ -72,6 +72,7 @@ public:
void add_action(const StringName &p_action, float p_deadzone = 0.5);
void erase_action(const StringName &p_action);
float action_get_deadzone(const StringName &p_action);
void action_set_deadzone(const StringName &p_action, float p_deadzone);
void action_add_event(const StringName &p_action, const Ref<InputEvent> &p_event);
bool action_has_event(const StringName &p_action, const Ref<InputEvent> &p_event);

View File

@@ -141,8 +141,9 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p
if (p_dst_max_size < 16) {
uint8_t dst[16];
ret_size = fastlz_decompress(p_src, p_src_size, dst, 16);
fastlz_decompress(p_src, p_src_size, dst, 16);
copymem(p_dst, dst, p_dst_max_size);
ret_size = p_dst_max_size;
} else {
ret_size = fastlz_decompress(p_src, p_src_size, p_dst, p_dst_max_size);
}

View File

@@ -258,6 +258,7 @@ Error FileAccessEncrypted::get_error() const {
void FileAccessEncrypted::store_buffer(const uint8_t *p_src, int p_length) {
ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode.");
ERR_FAIL_COND(!p_src && p_length > 0);
if (pos < data.size()) {

View File

@@ -184,7 +184,7 @@ void FileAccessMemory::store_8(uint8_t p_byte) {
}
void FileAccessMemory::store_buffer(const uint8_t *p_src, int p_length) {
ERR_FAIL_COND(!p_src && p_length > 0);
int left = length - pos;
int write = MIN(p_length, left);
if (write < p_length) {

View File

@@ -45,15 +45,14 @@ static void *godot_open(void *data, const char *p_fname, int mode) {
return NULL;
}
FileAccess *f = (FileAccess *)data;
f->open(p_fname, FileAccess::READ);
FileAccess *f = FileAccess::open(p_fname, FileAccess::READ);
ERR_FAIL_COND_V(!f, nullptr);
return f->is_open() ? data : NULL;
return f;
}
static uLong godot_read(void *data, void *fdata, void *buf, uLong size) {
FileAccess *f = (FileAccess *)data;
FileAccess *f = (FileAccess *)fdata;
f->get_buffer((uint8_t *)buf, size);
return size;
}
@@ -64,14 +63,12 @@ static uLong godot_write(voidpf opaque, voidpf stream, const void *buf, uLong si
}
static long godot_tell(voidpf opaque, voidpf stream) {
FileAccess *f = (FileAccess *)opaque;
FileAccess *f = (FileAccess *)stream;
return f->get_position();
}
static long godot_seek(voidpf opaque, voidpf stream, uLong offset, int origin) {
FileAccess *f = (FileAccess *)opaque;
FileAccess *f = (FileAccess *)stream;
int pos = offset;
switch (origin) {
@@ -91,15 +88,17 @@ static long godot_seek(voidpf opaque, voidpf stream, uLong offset, int origin) {
}
static int godot_close(voidpf opaque, voidpf stream) {
FileAccess *f = (FileAccess *)opaque;
f->close();
FileAccess *f = (FileAccess *)stream;
if (f) {
f->close();
memdelete(f);
f = nullptr;
}
return 0;
}
static int godot_testerror(voidpf opaque, voidpf stream) {
FileAccess *f = (FileAccess *)opaque;
FileAccess *f = (FileAccess *)stream;
return f->get_error() != OK ? 1 : 0;
}
@@ -118,10 +117,8 @@ static void godot_free(voidpf opaque, voidpf address) {
void ZipArchive::close_handle(unzFile p_file) const {
ERR_FAIL_COND_MSG(!p_file, "Cannot close a file if none is open.");
FileAccess *f = (FileAccess *)unzGetOpaque(p_file);
unzCloseCurrentFile(p_file);
unzClose(p_file);
memdelete(f);
}
unzFile ZipArchive::get_file_handle(String p_file) const {
@@ -129,13 +126,10 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
ERR_FAIL_COND_V_MSG(!file_exists(p_file), NULL, "File '" + p_file + " doesn't exist.");
File file = files[p_file];
FileAccess *f = FileAccess::open(packages[file.package].filename, FileAccess::READ);
ERR_FAIL_COND_V_MSG(!f, NULL, "Cannot open file '" + packages[file.package].filename + "'.");
zlib_filefunc_def io;
zeromem(&io, sizeof(io));
io.opaque = f;
io.opaque = nullptr;
io.zopen_file = godot_open;
io.zread_file = godot_read;
io.zwrite_file = godot_write;
@@ -149,7 +143,7 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
io.free_mem = godot_free;
unzFile pkg = unzOpen2(packages[file.package].filename.utf8().get_data(), &io);
ERR_FAIL_COND_V(!pkg, NULL);
ERR_FAIL_COND_V_MSG(!pkg, nullptr, "Cannot open file '" + packages[file.package].filename + "'.");
int unz_err = unzGoToFilePos(pkg, &file.file_pos);
if (unz_err != UNZ_OK || unzOpenCurrentFile(pkg) != UNZ_OK) {
@@ -170,11 +164,9 @@ bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files, size_
return false;
zlib_filefunc_def io;
memset(&io, 0, sizeof(io));
FileAccess *fa = FileAccess::open(p_path, FileAccess::READ);
if (!fa)
return false;
io.opaque = fa;
io.opaque = nullptr;
io.zopen_file = godot_open;
io.zread_file = godot_read;
io.zwrite_file = godot_write;
@@ -252,10 +244,7 @@ ZipArchive::ZipArchive() {
ZipArchive::~ZipArchive() {
for (int i = 0; i < packages.size(); i++) {
FileAccess *f = (FileAccess *)unzGetOpaque(packages[i].zfile);
unzClose(packages[i].zfile);
memdelete(f);
}
packages.clear();

View File

@@ -691,8 +691,10 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
body_left -= rec;
}
}
if (err != OK)
if (err != OK) {
ret.resize(_offset);
break;
}
}
}

View File

@@ -83,12 +83,19 @@ struct _IP_ResolverPrivate {
if (queue[i].status.get() != IP::RESOLVER_STATUS_WAITING)
continue;
queue[i].response = IP::get_singleton()->resolve_hostname(queue[i].hostname, queue[i].type);
if (!queue[i].response.is_valid())
queue[i].status.set(IP::RESOLVER_STATUS_ERROR);
else
queue[i].status.set(IP::RESOLVER_STATUS_DONE);
mutex.lock();
String hostname = queue[i].hostname;
IP::Type type = queue[i].type;
mutex.unlock();
// We should not lock while resolving the hostname,
// only when modifying the queue.
IP_Address response = IP::get_singleton()->resolve_hostname(hostname, type);
MutexLock lock(mutex);
queue[i].response = response;
queue[i].status.set(response.is_valid() ? IP::RESOLVER_STATUS_DONE : IP::RESOLVER_STATUS_ERROR);
}
}
@@ -97,12 +104,8 @@ struct _IP_ResolverPrivate {
_IP_ResolverPrivate *ipr = (_IP_ResolverPrivate *)self;
while (!ipr->thread_abort) {
ipr->sem.wait();
ipr->mutex.lock();
ipr->resolve_queues();
ipr->mutex.unlock();
}
}
@@ -114,19 +117,24 @@ struct _IP_ResolverPrivate {
};
IP_Address IP::resolve_hostname(const String &p_hostname, IP::Type p_type) {
String key = _IP_ResolverPrivate::get_cache_key(p_hostname, p_type);
IP_Address res;
resolver->mutex.lock();
String key = _IP_ResolverPrivate::get_cache_key(p_hostname, p_type);
if (resolver->cache.has(key) && resolver->cache[key].is_valid()) {
IP_Address res = resolver->cache[key];
res = resolver->cache[key];
} else {
// This should be run unlocked so the resolver thread can keep
// resolving other requests.
resolver->mutex.unlock();
return res;
res = _resolve_hostname(p_hostname, p_type);
resolver->mutex.lock();
// We might be overriding another result, but we don't care (they are the
// same hostname).
resolver->cache[key] = res;
}
IP_Address res = _resolve_hostname(p_hostname, p_type);
resolver->cache[key] = res;
resolver->mutex.unlock();
return res;
}
@@ -165,15 +173,10 @@ IP::ResolverStatus IP::get_resolve_item_status(ResolverID p_id) const {
ERR_FAIL_INDEX_V(p_id, IP::RESOLVER_MAX_QUERIES, IP::RESOLVER_STATUS_NONE);
resolver->mutex.lock();
if (resolver->queue[p_id].status.get() == IP::RESOLVER_STATUS_NONE) {
ERR_PRINT("Condition status == IP::RESOLVER_STATUS_NONE");
resolver->mutex.unlock();
return IP::RESOLVER_STATUS_NONE;
}
IP::ResolverStatus res = resolver->queue[p_id].status.get();
resolver->mutex.unlock();
if (res == IP::RESOLVER_STATUS_NONE) {
ERR_PRINT("Condition status == IP::RESOLVER_STATUS_NONE");
}
return res;
}
@@ -199,11 +202,7 @@ void IP::erase_resolve_item(ResolverID p_id) {
ERR_FAIL_INDEX(p_id, IP::RESOLVER_MAX_QUERIES);
resolver->mutex.lock();
resolver->queue[p_id].status.set(IP::RESOLVER_STATUS_NONE);
resolver->mutex.unlock();
}
void IP::clear_cache(const String &p_hostname) {

View File

@@ -138,18 +138,6 @@ public:
ResourceInteractiveLoaderDefault() {}
};
Ref<ResourceInteractiveLoader> ResourceFormatLoader::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
//either this
Ref<Resource> res = load(p_path, p_original_path, r_error);
if (res.is_null())
return Ref<ResourceInteractiveLoader>();
Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault));
ril->resource = res;
return ril;
}
bool ResourceFormatLoader::exists(const String &p_path) const {
return FileAccess::exists(p_path); //by default just check file
}
@@ -168,25 +156,41 @@ void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions)
}
}
RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error) {
// Warning: Derived classes must override either `load` or `load_interactive`. The base code
// here can trigger an infinite recursion otherwise, since `load` calls `load_interactive`
// vice versa.
Ref<ResourceInteractiveLoader> ResourceFormatLoader::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
// Warning: See previous note about the risk of infinite recursion.
Ref<Resource> res = load(p_path, p_original_path, r_error);
if (res.is_null()) {
return Ref<ResourceInteractiveLoader>();
}
Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault));
ril->resource = res;
return ril;
}
RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error) {
// Check user-defined loader if there's any. Hard fail if it returns an error.
if (get_script_instance() && get_script_instance()->has_method("load")) {
Variant res = get_script_instance()->call("load", p_path, p_original_path);
if (res.get_type() == Variant::INT) {
if (r_error)
if (res.get_type() == Variant::INT) { // Error code, abort.
if (r_error) {
*r_error = (Error)res.operator int64_t();
} else {
if (r_error)
}
return RES();
} else { // Success, pass on result.
if (r_error) {
*r_error = OK;
}
return res;
}
}
//or this must be implemented
// Warning: See previous note about the risk of infinite recursion.
Ref<ResourceInteractiveLoader> ril = load_interactive(p_path, p_original_path, r_error);
if (!ril.is_valid())
return RES();

View File

@@ -178,7 +178,7 @@ public:
}
int64_t find(const T &p_val, U p_from = 0) const {
for (U i = 0; i < count; i++) {
for (U i = p_from; i < count; i++) {
if (data[i] == p_val) {
return int64_t(i);
}

View File

@@ -1033,16 +1033,16 @@ void Basis::set_diagonal(const Vector3 &p_diag) {
elements[2][2] = p_diag.z;
}
Basis Basis::slerp(const Basis &target, const real_t &t) const {
Basis Basis::slerp(const Basis &p_to, const real_t &p_weight) const {
//consider scale
Quat from(*this);
Quat to(target);
Quat to(p_to);
Basis b(from.slerp(to, t));
b.elements[0] *= Math::lerp(elements[0].length(), target.elements[0].length(), t);
b.elements[1] *= Math::lerp(elements[1].length(), target.elements[1].length(), t);
b.elements[2] *= Math::lerp(elements[2].length(), target.elements[2].length(), t);
Basis b(from.slerp(to, p_weight));
b.elements[0] *= Math::lerp(elements[0].length(), p_to.elements[0].length(), p_weight);
b.elements[1] *= Math::lerp(elements[1].length(), p_to.elements[1].length(), p_weight);
b.elements[2] *= Math::lerp(elements[2].length(), p_to.elements[2].length(), p_weight);
return b;
}

View File

@@ -172,7 +172,7 @@ public:
bool is_diagonal() const;
bool is_rotation() const;
Basis slerp(const Basis &target, const real_t &t) const;
Basis slerp(const Basis &p_to, const real_t &p_weight) const;
operator String() const;

View File

@@ -18,17 +18,17 @@ void _logic_item_remove_and_reinsert(uint32_t p_ref_id) {
// some overlay elaborate way to find out which tree the node is in!
BVHHandle temp_handle;
temp_handle.set_id(p_ref_id);
_current_tree = _handle_get_tree_id(temp_handle);
uint32_t tree_id = _handle_get_tree_id(temp_handle);
// remove and reinsert
BVH_ABB abb;
node_remove_item(p_ref_id, &abb);
node_remove_item(p_ref_id, tree_id, &abb);
// we must choose where to add to tree
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
_node_add_item(ref.tnode_id, p_ref_id, abb);
refit_upward_and_balance(ref.tnode_id);
refit_upward_and_balance(ref.tnode_id, tree_id);
}
// from randy gaul balance function
@@ -64,7 +64,7 @@ BVH_ABB _logic_abb_merge(const BVH_ABB &a, const BVH_ABB &b) {
// https://github.com/RandyGaul/qu3e
// It is MODIFIED from qu3e version.
// This is the only function used (and _logic_abb_merge helper function).
int32_t _logic_balance(int32_t iA) {
int32_t _logic_balance(int32_t iA, uint32_t p_tree_id) {
// return iA; // uncomment this to bypass balance
TNode *A = &_nodes[iA];
@@ -103,7 +103,7 @@ int32_t _logic_balance(int32_t iA) {
_nodes[A->parent_id].children[1] = iC;
} else {
// check this .. seems dodgy
change_root_node(iC);
change_root_node(iC, p_tree_id);
}
// Swap A and C
@@ -154,7 +154,7 @@ int32_t _logic_balance(int32_t iA) {
else {
// check this .. seems dodgy
change_root_node(iB);
change_root_node(iB, p_tree_id);
}
// Swap A and B

View File

@@ -53,23 +53,25 @@ BVHHandle item_add(T *p_userdata, bool p_active, const AABB &p_aabb, int32_t p_s
// assign to handle to return
handle.set_id(ref_id);
_current_tree = 0;
if (p_pairable)
_current_tree = 1;
uint32_t tree_id = 0;
if (p_pairable) {
tree_id = 1;
}
create_root_node(_current_tree);
create_root_node(tree_id);
// we must choose where to add to tree
if (p_active) {
ref->tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
ref->tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
bool refit = _node_add_item(ref->tnode_id, ref_id, abb);
if (refit) {
// only need to refit from the parent
const TNode &add_node = _nodes[ref->tnode_id];
if (add_node.parent_id != BVHCommon::INVALID)
refit_upward_and_balance(add_node.parent_id);
if (add_node.parent_id != BVHCommon::INVALID) {
refit_upward_and_balance(add_node.parent_id, tree_id);
}
}
} else {
ref->set_inactive();
@@ -137,13 +139,13 @@ bool item_move(BVHHandle p_handle, const AABB &p_aabb) {
return true;
}
_current_tree = _handle_get_tree_id(p_handle);
uint32_t tree_id = _handle_get_tree_id(p_handle);
// remove and reinsert
node_remove_item(ref_id);
node_remove_item(ref_id, tree_id);
// we must choose where to add to tree
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
// add to the tree
bool needs_refit = _node_add_item(ref.tnode_id, ref_id, abb);
@@ -164,7 +166,7 @@ bool item_move(BVHHandle p_handle, const AABB &p_aabb) {
void item_remove(BVHHandle p_handle) {
uint32_t ref_id = p_handle.id();
_current_tree = _handle_get_tree_id(p_handle);
uint32_t tree_id = _handle_get_tree_id(p_handle);
VERBOSE_PRINT("item_remove [" + itos(ref_id) + "] ");
@@ -184,7 +186,7 @@ void item_remove(BVHHandle p_handle) {
// remove the item from the node (only if active)
if (_refs[ref_id].is_active()) {
node_remove_item(ref_id);
node_remove_item(ref_id, tree_id);
}
// remove the item reference
@@ -195,10 +197,10 @@ void item_remove(BVHHandle p_handle) {
}
// don't think refit_all is necessary?
//refit_all(_current_tree);
//refit_all(_tree_id);
#ifdef BVH_VERBOSE_TREE
_debug_recursive_print_tree(_current_tree);
_debug_recursive_print_tree(tree_id);
#endif
}
@@ -215,13 +217,13 @@ bool item_activate(BVHHandle p_handle, const AABB &p_aabb) {
BVH_ABB abb;
abb.from(p_aabb);
_current_tree = _handle_get_tree_id(p_handle);
uint32_t tree_id = _handle_get_tree_id(p_handle);
// we must choose where to add to tree
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
_node_add_item(ref.tnode_id, ref_id, abb);
refit_upward_and_balance(ref.tnode_id);
refit_upward_and_balance(ref.tnode_id, tree_id);
return true;
}
@@ -235,9 +237,11 @@ bool item_deactivate(BVHHandle p_handle) {
return false;
}
uint32_t tree_id = _handle_get_tree_id(p_handle);
// remove from tree
BVH_ABB abb;
node_remove_item(ref_id, &abb);
node_remove_item(ref_id, tree_id, &abb);
// mark as inactive
ref.set_inactive();
@@ -300,29 +304,30 @@ void item_set_pairable(const BVHHandle &p_handle, bool p_pairable, uint32_t p_pa
BVH_ABB abb = leaf.get_aabb(ref.item_id);
// make sure current tree is correct prior to changing
_current_tree = _handle_get_tree_id(p_handle);
uint32_t tree_id = _handle_get_tree_id(p_handle);
// remove from old tree
node_remove_item(ref_id);
node_remove_item(ref_id, tree_id);
// we must set the pairable AFTER getting the current tree
// because the pairable status determines which tree
ex.pairable = p_pairable;
// add to new tree
_current_tree = _handle_get_tree_id(p_handle);
create_root_node(_current_tree);
tree_id = _handle_get_tree_id(p_handle);
create_root_node(tree_id);
// we must choose where to add to tree
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
bool needs_refit = _node_add_item(ref.tnode_id, ref_id, abb);
// only need to refit from the PARENT
if (needs_refit) {
// only need to refit from the parent
const TNode &add_node = _nodes[ref.tnode_id];
if (add_node.parent_id != BVHCommon::INVALID)
refit_upward_and_balance(add_node.parent_id);
if (add_node.parent_id != BVHCommon::INVALID) {
refit_upward_and_balance(add_node.parent_id, tree_id);
}
}
} else {
// always keep this up to date

View File

@@ -65,10 +65,10 @@ void refit_upward(uint32_t p_node_id) {
}
}
void refit_upward_and_balance(uint32_t p_node_id) {
void refit_upward_and_balance(uint32_t p_node_id, uint32_t p_tree_id) {
while (p_node_id != BVHCommon::INVALID) {
uint32_t before = p_node_id;
p_node_id = _logic_balance(p_node_id);
p_node_id = _logic_balance(p_node_id, p_tree_id);
if (before != p_node_id) {
VERBOSE_PRINT("REBALANCED!");

View File

@@ -161,7 +161,6 @@ enum { NUM_TREES = 2,
// Tree 1 - Pairable
// This is more efficient because in physics we only need check non pairable against the pairable tree.
uint32_t _root_node_id[NUM_TREES];
int _current_tree = 0;
// these values may need tweaking according to the project
// the bound of the world, and the average velocities of the objects

View File

@@ -193,7 +193,7 @@ private:
new_child.parent_id = p_parent_id;
}
void node_remove_child(uint32_t p_parent_id, uint32_t p_child_id, bool p_prevent_sibling = false) {
void node_remove_child(uint32_t p_parent_id, uint32_t p_child_id, uint32_t p_tree_id, bool p_prevent_sibling = false) {
TNode &parent = _nodes[p_parent_id];
BVH_ASSERT(!parent.is_leaf());
@@ -228,7 +228,7 @@ private:
if (grandparent_id == BVHCommon::INVALID) {
if (sibling_present) {
// change the root node
change_root_node(sibling_id);
change_root_node(sibling_id, p_tree_id);
// delete the old root node as no longer needed
_nodes.free(p_parent_id);
@@ -240,16 +240,15 @@ private:
if (sibling_present) {
node_replace_child(grandparent_id, p_parent_id, sibling_id);
} else {
node_remove_child(grandparent_id, p_parent_id, true);
node_remove_child(grandparent_id, p_parent_id, p_tree_id, true);
}
// put the node on the free list to recycle
_nodes.free(p_parent_id);
}
// this relies on _current_tree being accurate
void change_root_node(uint32_t p_new_root_id) {
_root_node_id[_current_tree] = p_new_root_id;
void change_root_node(uint32_t p_new_root_id, uint32_t p_tree_id) {
_root_node_id[p_tree_id] = p_new_root_id;
TNode &root = _nodes[p_new_root_id];
// mark no parent
@@ -269,7 +268,7 @@ private:
node.neg_leaf_id = -(int)child_leaf_id;
}
void node_remove_item(uint32_t p_ref_id, BVH_ABB *r_old_aabb = nullptr) {
void node_remove_item(uint32_t p_ref_id, uint32_t p_tree_id, BVH_ABB *r_old_aabb = nullptr) {
// get the reference
ItemRef &ref = _refs[p_ref_id];
uint32_t owner_node_id = ref.tnode_id;
@@ -332,7 +331,7 @@ private:
uint32_t parent_id = tnode.parent_id;
node_remove_child(parent_id, owner_node_id);
node_remove_child(parent_id, owner_node_id, p_tree_id);
refit_upward(parent_id);
// put the node on the free list to recycle

View File

@@ -199,8 +199,8 @@ public:
value += 0.0;
return value;
}
static _ALWAYS_INLINE_ int posmod(int p_x, int p_y) {
int value = p_x % p_y;
static _ALWAYS_INLINE_ int64_t posmod(int64_t p_x, int64_t p_y) {
int64_t value = p_x % p_y;
if ((value < 0 && p_y > 0) || (value > 0 && p_y < 0)) {
value += p_y;
}

View File

@@ -115,13 +115,13 @@ private:
LocalVector<AABB> aabbs;
LocalVector<Element *> elements;
void update(List<Element *, AL> &eles) {
void update(List<Element *, AL> &p_elements) {
// make sure local vector doesn't delete the memory
// no need to be thrashing allocations
aabbs.clear();
elements.clear();
typename List<Element *, AL>::Element *E = eles.front();
typename List<Element *, AL>::Element *E = p_elements.front();
while (E) {
Element *e = E->get();
aabbs.push_back(e->aabb);

View File

@@ -106,18 +106,18 @@ Vector3 Quat::get_euler_yxz() const {
return m.get_euler_yxz();
}
void Quat::operator*=(const Quat &q) {
void Quat::operator*=(const Quat &p_q) {
set(w * q.x + x * q.w + y * q.z - z * q.y,
w * q.y + y * q.w + z * q.x - x * q.z,
w * q.z + z * q.w + x * q.y - y * q.x,
w * q.w - x * q.x - y * q.y - z * q.z);
set(w * p_q.x + x * p_q.w + y * p_q.z - z * p_q.y,
w * p_q.y + y * p_q.w + z * p_q.x - x * p_q.z,
w * p_q.z + z * p_q.w + x * p_q.y - y * p_q.x,
w * p_q.w - x * p_q.x - y * p_q.y - z * p_q.z);
}
Quat Quat::operator*(const Quat &q) const {
Quat Quat::operator*(const Quat &p_q) const {
Quat r = *this;
r *= q;
r *= p_q;
return r;
}
@@ -150,29 +150,29 @@ Quat Quat::inverse() const {
return Quat(-x, -y, -z, w);
}
Quat Quat::slerp(const Quat &q, const real_t &t) const {
Quat Quat::slerp(const Quat &p_to, const real_t &p_weight) const {
#ifdef MATH_CHECKS
ERR_FAIL_COND_V_MSG(!is_normalized(), Quat(), "The start quaternion must be normalized.");
ERR_FAIL_COND_V_MSG(!q.is_normalized(), Quat(), "The end quaternion must be normalized.");
ERR_FAIL_COND_V_MSG(!p_to.is_normalized(), Quat(), "The end quaternion must be normalized.");
#endif
Quat to1;
real_t omega, cosom, sinom, scale0, scale1;
// calc cosine
cosom = dot(q);
cosom = dot(p_to);
// adjust signs (if necessary)
if (cosom < 0.0) {
cosom = -cosom;
to1.x = -q.x;
to1.y = -q.y;
to1.z = -q.z;
to1.w = -q.w;
to1.x = -p_to.x;
to1.y = -p_to.y;
to1.z = -p_to.z;
to1.w = -p_to.w;
} else {
to1.x = q.x;
to1.y = q.y;
to1.z = q.z;
to1.w = q.w;
to1.x = p_to.x;
to1.y = p_to.y;
to1.z = p_to.z;
to1.w = p_to.w;
}
// calculate coefficients
@@ -181,13 +181,13 @@ Quat Quat::slerp(const Quat &q, const real_t &t) const {
// standard case (slerp)
omega = Math::acos(cosom);
sinom = Math::sin(omega);
scale0 = Math::sin((1.0 - t) * omega) / sinom;
scale1 = Math::sin(t * omega) / sinom;
scale0 = Math::sin((1.0 - p_weight) * omega) / sinom;
scale1 = Math::sin(p_weight * omega) / sinom;
} else {
// "from" and "to" quaternions are very close
// ... so we can do a linear interpolation
scale0 = 1.0 - t;
scale1 = t;
scale0 = 1.0 - p_weight;
scale1 = p_weight;
}
// calculate final values
return Quat(
@@ -197,37 +197,37 @@ Quat Quat::slerp(const Quat &q, const real_t &t) const {
scale0 * w + scale1 * to1.w);
}
Quat Quat::slerpni(const Quat &q, const real_t &t) const {
Quat Quat::slerpni(const Quat &p_to, const real_t &p_weight) const {
#ifdef MATH_CHECKS
ERR_FAIL_COND_V_MSG(!is_normalized(), Quat(), "The start quaternion must be normalized.");
ERR_FAIL_COND_V_MSG(!q.is_normalized(), Quat(), "The end quaternion must be normalized.");
ERR_FAIL_COND_V_MSG(!p_to.is_normalized(), Quat(), "The end quaternion must be normalized.");
#endif
const Quat &from = *this;
real_t dot = from.dot(q);
real_t dot = from.dot(p_to);
if (Math::absf(dot) > 0.9999) return from;
real_t theta = Math::acos(dot),
sinT = 1.0 / Math::sin(theta),
newFactor = Math::sin(t * theta) * sinT,
invFactor = Math::sin((1.0 - t) * theta) * sinT;
newFactor = Math::sin(p_weight * theta) * sinT,
invFactor = Math::sin((1.0 - p_weight) * theta) * sinT;
return Quat(invFactor * from.x + newFactor * q.x,
invFactor * from.y + newFactor * q.y,
invFactor * from.z + newFactor * q.z,
invFactor * from.w + newFactor * q.w);
return Quat(invFactor * from.x + newFactor * p_to.x,
invFactor * from.y + newFactor * p_to.y,
invFactor * from.z + newFactor * p_to.z,
invFactor * from.w + newFactor * p_to.w);
}
Quat Quat::cubic_slerp(const Quat &q, const Quat &prep, const Quat &postq, const real_t &t) const {
Quat Quat::cubic_slerp(const Quat &p_b, const Quat &p_pre_a, const Quat &p_post_b, const real_t &p_weight) const {
#ifdef MATH_CHECKS
ERR_FAIL_COND_V_MSG(!is_normalized(), Quat(), "The start quaternion must be normalized.");
ERR_FAIL_COND_V_MSG(!q.is_normalized(), Quat(), "The end quaternion must be normalized.");
ERR_FAIL_COND_V_MSG(!p_b.is_normalized(), Quat(), "The end quaternion must be normalized.");
#endif
//the only way to do slerp :|
real_t t2 = (1.0 - t) * t * 2;
Quat sp = this->slerp(q, t);
Quat sq = prep.slerpni(postq, t);
real_t t2 = (1.0 - p_weight) * p_weight * 2;
Quat sp = this->slerp(p_b, p_weight);
Quat sq = p_pre_a.slerpni(p_post_b, p_weight);
return sp.slerpni(sq, t2);
}

View File

@@ -49,7 +49,7 @@ public:
Quat normalized() const;
bool is_normalized() const;
Quat inverse() const;
_FORCE_INLINE_ real_t dot(const Quat &q) const;
_FORCE_INLINE_ real_t dot(const Quat &p_q) const;
void set_euler_xyz(const Vector3 &p_euler);
Vector3 get_euler_xyz() const;
@@ -59,9 +59,9 @@ public:
void set_euler(const Vector3 &p_euler) { set_euler_yxz(p_euler); };
Vector3 get_euler() const { return get_euler_yxz(); };
Quat slerp(const Quat &q, const real_t &t) const;
Quat slerpni(const Quat &q, const real_t &t) const;
Quat cubic_slerp(const Quat &q, const Quat &prep, const Quat &postq, const real_t &t) const;
Quat slerp(const Quat &p_to, const real_t &p_weight) const;
Quat slerpni(const Quat &p_to, const real_t &p_weight) const;
Quat cubic_slerp(const Quat &p_b, const Quat &p_pre_a, const Quat &p_post_b, const real_t &p_weight) const;
void set_axis_angle(const Vector3 &axis, const real_t &angle);
_FORCE_INLINE_ void get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
@@ -72,8 +72,8 @@ public:
r_axis.z = z * r;
}
void operator*=(const Quat &q);
Quat operator*(const Quat &q) const;
void operator*=(const Quat &p_q);
Quat operator*(const Quat &p_q) const;
Quat operator*(const Vector3 &v) const {
return Quat(w * v.x + y * v.z - z * v.y,
@@ -91,8 +91,8 @@ public:
return v + ((uv * w) + u.cross(uv)) * ((real_t)2);
}
_FORCE_INLINE_ void operator+=(const Quat &q);
_FORCE_INLINE_ void operator-=(const Quat &q);
_FORCE_INLINE_ void operator+=(const Quat &p_q);
_FORCE_INLINE_ void operator-=(const Quat &p_q);
_FORCE_INLINE_ void operator*=(const real_t &s);
_FORCE_INLINE_ void operator/=(const real_t &s);
_FORCE_INLINE_ Quat operator+(const Quat &q2) const;
@@ -121,18 +121,18 @@ public:
Quat(const Vector3 &axis, const real_t &angle) { set_axis_angle(axis, angle); }
Quat(const Vector3 &euler) { set_euler(euler); }
Quat(const Quat &q) :
x(q.x),
y(q.y),
z(q.z),
w(q.w) {
Quat(const Quat &p_q) :
x(p_q.x),
y(p_q.y),
z(p_q.z),
w(p_q.w) {
}
Quat operator=(const Quat &q) {
x = q.x;
y = q.y;
z = q.z;
w = q.w;
Quat operator=(const Quat &p_q) {
x = p_q.x;
y = p_q.y;
z = p_q.z;
w = p_q.w;
return *this;
}
@@ -166,26 +166,26 @@ public:
}
};
real_t Quat::dot(const Quat &q) const {
return x * q.x + y * q.y + z * q.z + w * q.w;
real_t Quat::dot(const Quat &p_q) const {
return x * p_q.x + y * p_q.y + z * p_q.z + w * p_q.w;
}
real_t Quat::length_squared() const {
return dot(*this);
}
void Quat::operator+=(const Quat &q) {
x += q.x;
y += q.y;
z += q.z;
w += q.w;
void Quat::operator+=(const Quat &p_q) {
x += p_q.x;
y += p_q.y;
z += p_q.z;
w += p_q.w;
}
void Quat::operator-=(const Quat &q) {
x -= q.x;
y -= q.y;
z -= q.z;
w -= q.w;
void Quat::operator-=(const Quat &p_q) {
x -= p_q.x;
y -= p_q.y;
z -= p_q.z;
w -= p_q.w;
}
void Quat::operator*=(const real_t &s) {

View File

@@ -134,8 +134,8 @@ Vector2 Vector2::posmodv(const Vector2 &p_modv) const {
return Vector2(Math::fposmod(x, p_modv.x), Math::fposmod(y, p_modv.y));
}
Vector2 Vector2::project(const Vector2 &p_b) const {
return p_b * (dot(p_b) / p_b.length_squared());
Vector2 Vector2::project(const Vector2 &p_to) const {
return p_to * (dot(p_to) / p_to.length_squared());
}
Vector2 Vector2::snapped(const Vector2 &p_by) const {
@@ -158,14 +158,14 @@ Vector2 Vector2::clamped(real_t p_len) const {
return v;
}
Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const {
Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight) const {
Vector2 p0 = p_pre_a;
Vector2 p1 = *this;
Vector2 p2 = p_b;
Vector2 p3 = p_post_b;
real_t t = p_t;
real_t t = p_weight;
real_t t2 = t * t;
real_t t3 = t2 * t;

View File

@@ -70,22 +70,22 @@ struct Vector2 {
real_t distance_squared_to(const Vector2 &p_vector2) const;
real_t angle_to(const Vector2 &p_vector2) const;
real_t angle_to_point(const Vector2 &p_vector2) const;
_FORCE_INLINE_ Vector2 direction_to(const Vector2 &p_b) const;
_FORCE_INLINE_ Vector2 direction_to(const Vector2 &p_to) const;
real_t dot(const Vector2 &p_other) const;
real_t cross(const Vector2 &p_other) const;
Vector2 posmod(const real_t p_mod) const;
Vector2 posmodv(const Vector2 &p_modv) const;
Vector2 project(const Vector2 &p_b) const;
Vector2 project(const Vector2 &p_to) const;
Vector2 plane_project(real_t p_d, const Vector2 &p_vec) const;
Vector2 clamped(real_t p_len) const;
_FORCE_INLINE_ static Vector2 linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_t);
_FORCE_INLINE_ Vector2 linear_interpolate(const Vector2 &p_b, real_t p_t) const;
_FORCE_INLINE_ Vector2 slerp(const Vector2 &p_b, real_t p_t) const;
Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const;
_FORCE_INLINE_ static Vector2 linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_weight);
_FORCE_INLINE_ Vector2 linear_interpolate(const Vector2 &p_to, real_t p_weight) const;
_FORCE_INLINE_ Vector2 slerp(const Vector2 &p_to, real_t p_weight) const;
Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight) const;
Vector2 move_toward(const Vector2 &p_to, const real_t p_delta) const;
Vector2 slide(const Vector2 &p_normal) const;
@@ -230,36 +230,36 @@ _FORCE_INLINE_ bool Vector2::operator!=(const Vector2 &p_vec2) const {
return x != p_vec2.x || y != p_vec2.y;
}
Vector2 Vector2::linear_interpolate(const Vector2 &p_b, real_t p_t) const {
Vector2 Vector2::linear_interpolate(const Vector2 &p_to, real_t p_weight) const {
Vector2 res = *this;
res.x += (p_t * (p_b.x - x));
res.y += (p_t * (p_b.y - y));
res.x += (p_weight * (p_to.x - x));
res.y += (p_weight * (p_to.y - y));
return res;
}
Vector2 Vector2::slerp(const Vector2 &p_b, real_t p_t) const {
Vector2 Vector2::slerp(const Vector2 &p_to, real_t p_weight) const {
#ifdef MATH_CHECKS
ERR_FAIL_COND_V_MSG(!is_normalized(), Vector2(), "The start Vector2 must be normalized.");
#endif
real_t theta = angle_to(p_b);
return rotated(theta * p_t);
real_t theta = angle_to(p_to);
return rotated(theta * p_weight);
}
Vector2 Vector2::direction_to(const Vector2 &p_b) const {
Vector2 ret(p_b.x - x, p_b.y - y);
Vector2 Vector2::direction_to(const Vector2 &p_to) const {
Vector2 ret(p_to.x - x, p_to.y - y);
ret.normalize();
return ret;
}
Vector2 Vector2::linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_t) {
Vector2 Vector2::linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_weight) {
Vector2 res = p_a;
res.x += (p_t * (p_b.x - p_a.x));
res.y += (p_t * (p_b.y - p_a.y));
res.x += (p_weight * (p_b.x - p_a.x));
res.y += (p_weight * (p_b.y - p_a.y));
return res;
}

View File

@@ -76,7 +76,7 @@ Vector3 Vector3::snapped(Vector3 p_val) const {
return v;
}
Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_t) const {
Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const {
Vector3 p0 = p_pre_a;
Vector3 p1 = *this;
@@ -96,7 +96,7 @@ Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a,
p3 = p2 + (p3 - p2) * (bc / cd);
}
real_t t = p_t;
real_t t = p_weight;
real_t t2 = t * t;
real_t t3 = t2 * t;
@@ -108,14 +108,14 @@ Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a,
return out;
}
Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_t) const {
Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const {
Vector3 p0 = p_pre_a;
Vector3 p1 = *this;
Vector3 p2 = p_b;
Vector3 p3 = p_post_b;
real_t t = p_t;
real_t t = p_weight;
real_t t2 = t * t;
real_t t3 = t2 * t;

View File

@@ -88,10 +88,10 @@ struct Vector3 {
/* Static Methods between 2 vector3s */
_FORCE_INLINE_ Vector3 linear_interpolate(const Vector3 &p_b, real_t p_t) const;
_FORCE_INLINE_ Vector3 slerp(const Vector3 &p_b, real_t p_t) const;
Vector3 cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_t) const;
Vector3 cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_t) const;
_FORCE_INLINE_ Vector3 linear_interpolate(const Vector3 &p_to, real_t p_weight) const;
_FORCE_INLINE_ Vector3 slerp(const Vector3 &p_to, real_t p_weight) const;
Vector3 cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const;
Vector3 cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const;
Vector3 move_toward(const Vector3 &p_to, const real_t p_delta) const;
_FORCE_INLINE_ Vector3 cross(const Vector3 &p_b) const;
@@ -105,15 +105,15 @@ struct Vector3 {
_FORCE_INLINE_ Vector3 ceil() const;
_FORCE_INLINE_ Vector3 round() const;
_FORCE_INLINE_ real_t distance_to(const Vector3 &p_b) const;
_FORCE_INLINE_ real_t distance_squared_to(const Vector3 &p_b) const;
_FORCE_INLINE_ real_t distance_to(const Vector3 &p_to) const;
_FORCE_INLINE_ real_t distance_squared_to(const Vector3 &p_to) const;
_FORCE_INLINE_ Vector3 posmod(const real_t p_mod) const;
_FORCE_INLINE_ Vector3 posmodv(const Vector3 &p_modv) const;
_FORCE_INLINE_ Vector3 project(const Vector3 &p_b) const;
_FORCE_INLINE_ Vector3 project(const Vector3 &p_to) const;
_FORCE_INLINE_ real_t angle_to(const Vector3 &p_b) const;
_FORCE_INLINE_ Vector3 direction_to(const Vector3 &p_b) const;
_FORCE_INLINE_ real_t angle_to(const Vector3 &p_to) const;
_FORCE_INLINE_ Vector3 direction_to(const Vector3 &p_to) const;
_FORCE_INLINE_ Vector3 slide(const Vector3 &p_normal) const;
_FORCE_INLINE_ Vector3 bounce(const Vector3 &p_normal) const;
@@ -196,27 +196,27 @@ Vector3 Vector3::round() const {
return Vector3(Math::round(x), Math::round(y), Math::round(z));
}
Vector3 Vector3::linear_interpolate(const Vector3 &p_b, real_t p_t) const {
Vector3 Vector3::linear_interpolate(const Vector3 &p_to, real_t p_weight) const {
return Vector3(
x + (p_t * (p_b.x - x)),
y + (p_t * (p_b.y - y)),
z + (p_t * (p_b.z - z)));
x + (p_weight * (p_to.x - x)),
y + (p_weight * (p_to.y - y)),
z + (p_weight * (p_to.z - z)));
}
Vector3 Vector3::slerp(const Vector3 &p_b, real_t p_t) const {
real_t theta = angle_to(p_b);
return rotated(cross(p_b).normalized(), theta * p_t);
Vector3 Vector3::slerp(const Vector3 &p_to, real_t p_weight) const {
real_t theta = angle_to(p_to);
return rotated(cross(p_to).normalized(), theta * p_weight);
}
real_t Vector3::distance_to(const Vector3 &p_b) const {
real_t Vector3::distance_to(const Vector3 &p_to) const {
return (p_b - *this).length();
return (p_to - *this).length();
}
real_t Vector3::distance_squared_to(const Vector3 &p_b) const {
real_t Vector3::distance_squared_to(const Vector3 &p_to) const {
return (p_b - *this).length_squared();
return (p_to - *this).length_squared();
}
Vector3 Vector3::posmod(const real_t p_mod) const {
@@ -227,17 +227,17 @@ Vector3 Vector3::posmodv(const Vector3 &p_modv) const {
return Vector3(Math::fposmod(x, p_modv.x), Math::fposmod(y, p_modv.y), Math::fposmod(z, p_modv.z));
}
Vector3 Vector3::project(const Vector3 &p_b) const {
return p_b * (dot(p_b) / p_b.length_squared());
Vector3 Vector3::project(const Vector3 &p_to) const {
return p_to * (dot(p_to) / p_to.length_squared());
}
real_t Vector3::angle_to(const Vector3 &p_b) const {
real_t Vector3::angle_to(const Vector3 &p_to) const {
return Math::atan2(cross(p_b).length(), dot(p_b));
return Math::atan2(cross(p_to).length(), dot(p_to));
}
Vector3 Vector3::direction_to(const Vector3 &p_b) const {
Vector3 ret(p_b.x - x, p_b.y - y, p_b.z - z);
Vector3 Vector3::direction_to(const Vector3 &p_to) const {
Vector3 ret(p_to.x - x, p_to.y - y, p_to.z - z);
ret.normalize();
return ret;
}

View File

@@ -591,7 +591,7 @@ void FileAccess::store_csv_line(const Vector<String> &p_values, const String &p_
}
void FileAccess::store_buffer(const uint8_t *p_src, int p_length) {
ERR_FAIL_COND(!p_src && p_length > 0);
for (int i = 0; i < p_length; i++)
store_8(p_src[i]);
}

View File

@@ -85,7 +85,8 @@ enum JoystickList {
JOY_BUTTON_19 = 19,
JOY_BUTTON_20 = 20,
JOY_BUTTON_21 = 21,
JOY_BUTTON_MAX = 22,
JOY_BUTTON_22 = 22,
JOY_BUTTON_MAX = 23,
JOY_L = JOY_BUTTON_4,
JOY_R = JOY_BUTTON_5,
@@ -99,12 +100,13 @@ enum JoystickList {
JOY_DPAD_DOWN = JOY_BUTTON_13,
JOY_DPAD_LEFT = JOY_BUTTON_14,
JOY_DPAD_RIGHT = JOY_BUTTON_15,
JOY_MISC1 = JOY_BUTTON_16,
JOY_PADDLE1 = JOY_BUTTON_17,
JOY_PADDLE2 = JOY_BUTTON_18,
JOY_PADDLE3 = JOY_BUTTON_19,
JOY_PADDLE4 = JOY_BUTTON_20,
JOY_TOUCHPAD = JOY_BUTTON_21,
JOY_GUIDE = JOY_BUTTON_16,
JOY_MISC1 = JOY_BUTTON_17,
JOY_PADDLE1 = JOY_BUTTON_18,
JOY_PADDLE2 = JOY_BUTTON_19,
JOY_PADDLE3 = JOY_BUTTON_20,
JOY_PADDLE4 = JOY_BUTTON_21,
JOY_TOUCHPAD = JOY_BUTTON_22,
JOY_SONY_CIRCLE = JOY_BUTTON_1,
JOY_SONY_X = JOY_BUTTON_0,

View File

@@ -372,8 +372,7 @@ String OS::get_resource_dir() const {
}
// Access system-specific dirs like Documents, Downloads, etc.
String OS::get_system_dir(SystemDir p_dir) const {
String OS::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
return ".";
}
@@ -465,6 +464,27 @@ OS::ScreenOrientation OS::get_screen_orientation() const {
return (OS::ScreenOrientation)_orientation;
}
// Internal helper function that returns the screen orientation enum value from a string
// (generally coming from the Project Settings).
// This is required to keep compatibility with existing projects.
OS::ScreenOrientation OS::get_screen_orientation_from_string(const String &p_orientation) const {
if (p_orientation == "portrait") {
return OS::SCREEN_PORTRAIT;
} else if (p_orientation == "reverse_landscape") {
return OS::SCREEN_REVERSE_LANDSCAPE;
} else if (p_orientation == "reverse_portrait") {
return OS::SCREEN_REVERSE_PORTRAIT;
} else if (p_orientation == "sensor_landscape") {
return OS::SCREEN_SENSOR_LANDSCAPE;
} else if (p_orientation == "sensor_portrait") {
return OS::SCREEN_SENSOR_PORTRAIT;
} else if (p_orientation == "sensor") {
return OS::SCREEN_SENSOR;
}
return OS::SCREEN_LANDSCAPE;
}
void OS::ensure_user_data_dir() {
String dd = get_user_data_dir();
DirAccess *da = DirAccess::open(dd);

View File

@@ -453,7 +453,7 @@ public:
SYSTEM_DIR_RINGTONES,
};
virtual String get_system_dir(SystemDir p_dir) const;
virtual String get_system_dir(SystemDir p_dir, bool p_shared_storage = true) const;
virtual Error move_to_trash(const String &p_path) { return FAILED; }
@@ -475,6 +475,7 @@ public:
virtual void set_screen_orientation(ScreenOrientation p_orientation);
virtual ScreenOrientation get_screen_orientation() const;
ScreenOrientation get_screen_orientation_from_string(const String &p_orientation) const;
virtual void enable_for_stealing_focus(ProcessID pid) {}
virtual void move_window_to_foreground() {}

View File

@@ -128,6 +128,7 @@ Variant PackedDataContainer::_get_at_ofs(uint32_t p_ofs, const uint8_t *p_buf, b
uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const {
PoolVector<uint8_t>::Read rd = data.read();
ERR_FAIL_COND_V(!rd.ptr(), 0);
const uint8_t *r = &rd[p_ofs];
uint32_t type = decode_uint32(r);
@@ -158,6 +159,10 @@ int PackedDataContainer::_size(uint32_t p_ofs) const {
Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, bool &err) const {
PoolVector<uint8_t>::Read rd = data.read();
if (!rd.ptr()) {
err = true;
ERR_FAIL_COND_V(!rd.ptr(), Variant());
}
const uint8_t *r = &rd[p_ofs];
uint32_t type = decode_uint32(r);

View File

@@ -690,8 +690,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
file->store_32(count + 1);
//store how many properties are saved, add one for custom featuers, which must always go first
String key = CoreStringNames::get_singleton()->_custom_features;
file->store_32(key.length());
file->store_string(key);
file->store_pascal_string(key);
int len;
err = encode_variant(p_custom_features, NULL, len, false);
@@ -728,8 +727,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
else
value = get(key);
file->store_32(key.length());
file->store_string(key);
file->store_pascal_string(key);
int len;
err = encode_variant(value, NULL, len, true);
@@ -1059,6 +1057,7 @@ ProjectSettings::ProjectSettings() {
extensions.push_back("gd");
if (Engine::get_singleton()->has_singleton("GodotSharp"))
extensions.push_back("cs");
extensions.push_back("gdshader");
extensions.push_back("shader");
GLOBAL_DEF("editor/search_in_file_extensions", extensions);

View File

@@ -36,6 +36,7 @@
#if !defined(NO_THREADS)
#include <atomic>
#include <type_traits>
// Design goals for these classes:
// - No automatic conversions or arithmetic operators,

View File

@@ -79,6 +79,7 @@ static const char *locale_list[] = {
"ast_ES", // Asturian (Spain)
"ayc_PE", // Southern Aymara (Peru)
"ay_PE", // Aymara (Peru)
"az", // Azerbaijani
"az_AZ", // Azerbaijani (Azerbaijan)
"be", // Belarusian
"be_BY", // Belarusian (Belarus)
@@ -235,6 +236,7 @@ static const char *locale_list[] = {
"ka_GE", // Georgian (Georgia)
"kk_KZ", // Kazakh (Kazakhstan)
"kl_GL", // Kalaallisut (Greenland)
"km", // Central Khmer
"km_KH", // Central Khmer (Cambodia)
"kn_IN", // Kannada (India)
"kok_IN", // Konkani (India)
@@ -385,6 +387,7 @@ static const char *locale_list[] = {
"tr_CY", // Turkish (Cyprus)
"tr_TR", // Turkish (Turkey)
"ts_ZA", // Tsonga (South Africa)
"tt", // Tatar
"tt_RU", // Tatar (Russia)
"tzm", // Central Atlas Tamazight
"tzm_MA", // Central Atlas Tamazight (Marrocos)
@@ -453,6 +456,7 @@ static const char *locale_names[] = {
"Asturian (Spain)",
"Southern Aymara (Peru)",
"Aymara (Peru)",
"Azerbaijani",
"Azerbaijani (Azerbaijan)",
"Belarusian",
"Belarusian (Belarus)",
@@ -609,6 +613,7 @@ static const char *locale_names[] = {
"Georgian (Georgia)",
"Kazakh (Kazakhstan)",
"Kalaallisut (Greenland)",
"Central Khmer",
"Central Khmer (Cambodia)",
"Kannada (India)",
"Konkani (India)",
@@ -759,6 +764,7 @@ static const char *locale_names[] = {
"Turkish (Cyprus)",
"Turkish (Turkey)",
"Tsonga (South Africa)",
"Tatar",
"Tatar (Russia)",
"Central Atlas Tamazight",
"Central Atlas Tamazight (Marrocos)",

View File

@@ -151,6 +151,71 @@ void CharString::copy_from(const char *p_cstr) {
strcpy(ptrw(), p_cstr);
}
Error String::parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path) const {
// Splits the URL into scheme, host, port, path. Strip credentials when present.
String base = *this;
r_scheme = "";
r_host = "";
r_port = 0;
r_path = "";
int pos = base.find("://");
// Scheme
if (pos != -1) {
r_scheme = base.substr(0, pos + 3).to_lower();
base = base.substr(pos + 3, base.length() - pos - 3);
}
pos = base.find("/");
// Path
if (pos != -1) {
r_path = base.substr(pos, base.length() - pos);
base = base.substr(0, pos);
}
// Host
pos = base.find("@");
if (pos != -1) {
// Strip credentials
base = base.substr(pos + 1, base.length() - pos - 1);
}
if (base.begins_with("[")) {
// Literal IPv6
pos = base.rfind("]");
if (pos == -1) {
return ERR_INVALID_PARAMETER;
}
r_host = base.substr(1, pos - 1);
base = base.substr(pos + 1, base.length() - pos - 1);
} else {
// Anything else
if (base.get_slice_count(":") > 2) {
return ERR_INVALID_PARAMETER;
}
pos = base.rfind(":");
if (pos == -1) {
r_host = base;
base = "";
} else {
r_host = base.substr(0, pos);
base = base.substr(pos, base.length() - pos);
}
}
if (r_host.empty()) {
return ERR_INVALID_PARAMETER;
}
r_host = r_host.to_lower();
// Port
if (base.begins_with(":")) {
base = base.substr(1, base.length() - 1);
if (!base.is_valid_integer()) {
return ERR_INVALID_PARAMETER;
}
r_port = base.to_int();
if (r_port < 1 || r_port > 65535) {
return ERR_INVALID_PARAMETER;
}
}
return OK;
}
void String::copy_from(const char *p_cstr) {
if (!p_cstr) {

View File

@@ -334,6 +334,7 @@ public:
String c_unescape() const;
String json_escape() const;
String word_wrap(int p_chars_per_line) const;
Error parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path) const;
String percent_encode() const;
String percent_decode() const;

View File

@@ -632,6 +632,10 @@ struct _VariantCall {
r_ret = decompressed;
ERR_FAIL_MSG("Decompression buffer size must be greater than zero.");
}
if (ba->size() == 0) {
r_ret = decompressed;
ERR_FAIL_MSG("Compressed buffer size must be greater than zero.");
}
decompressed.resize(buffer_size);
int result = Compression::decompress(decompressed.write().ptr(), buffer_size, ba->read().ptr(), ba->size(), mode);
@@ -1681,9 +1685,9 @@ void register_variant_methods() {
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmod, REAL, "mod", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmodv, VECTOR2, "modv", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, project, VECTOR2, "b", varray());
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", REAL, "t", varray());
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "b", REAL, "t", varray());
ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "t", varray());
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "to", REAL, "weight", varray());
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "to", REAL, "weight", varray());
ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "weight", varray());
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, move_toward, VECTOR2, "to", REAL, "delta", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, REAL, "phi", varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, tangent, varray());
@@ -1729,9 +1733,9 @@ void register_variant_methods() {
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, inverse, varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, snapped, VECTOR3, "by", varray());
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", REAL, "phi", varray());
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", REAL, "t", varray());
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "b", REAL, "t", varray());
ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "t", varray());
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "to", REAL, "weight", varray());
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "to", REAL, "weight", varray());
ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "weight", varray());
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, move_toward, VECTOR3, "to", REAL, "delta", varray());
ADDFUNC1R(VECTOR3, REAL, Vector3, dot, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, cross, VECTOR3, "b", varray());
@@ -1769,9 +1773,9 @@ void register_variant_methods() {
ADDFUNC0R(QUAT, QUAT, Quat, inverse, varray());
ADDFUNC1R(QUAT, REAL, Quat, dot, QUAT, "b", varray());
ADDFUNC1R(QUAT, VECTOR3, Quat, xform, VECTOR3, "v", varray());
ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", REAL, "t", varray());
ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", REAL, "t", varray());
ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "t", varray());
ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "to", REAL, "weight", varray());
ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "to", REAL, "weight", varray());
ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "weight", varray());
ADDFUNC0R(QUAT, VECTOR3, Quat, get_euler, varray());
ADDFUNC1(QUAT, NIL, Quat, set_euler, VECTOR3, "euler", varray());
ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", REAL, "angle", varray());
@@ -1785,7 +1789,7 @@ void register_variant_methods() {
ADDFUNC0R(COLOR, REAL, Color, gray, varray());
ADDFUNC0R(COLOR, COLOR, Color, inverted, varray());
ADDFUNC0R(COLOR, COLOR, Color, contrasted, varray());
ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", REAL, "t", varray());
ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "to", REAL, "weight", varray());
ADDFUNC1R(COLOR, COLOR, Color, blend, COLOR, "over", varray());
ADDFUNC1R(COLOR, COLOR, Color, lightened, REAL, "amount", varray());
ADDFUNC1R(COLOR, COLOR, Color, darkened, REAL, "amount", varray());
@@ -1988,7 +1992,7 @@ void register_variant_methods() {
ADDFUNC1R(BASIS, VECTOR3, Basis, xform, VECTOR3, "v", varray());
ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray());
ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray());
ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", REAL, "t", varray());
ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "to", REAL, "weight", varray());
// For complicated reasons, the epsilon argument is always discarded. See #45062.
ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", REAL, "epsilon", varray(CMP_EPSILON));
ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray());

View File

@@ -76,11 +76,10 @@ public:
typedef Error (*ParseResourceFunc)(void *p_self, Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str);
struct ResourceParser {
void *userdata;
ParseResourceFunc func;
ParseResourceFunc ext_func;
ParseResourceFunc sub_func;
void *userdata = nullptr;
ParseResourceFunc func = nullptr;
ParseResourceFunc ext_func = nullptr;
ParseResourceFunc sub_func = nullptr;
};
enum TokenType {

View File

@@ -1003,7 +1003,10 @@
<constant name="JOY_BUTTON_21" value="21" enum="JoystickList">
Gamepad button 21.
</constant>
<constant name="JOY_BUTTON_MAX" value="22" enum="JoystickList">
<constant name="JOY_BUTTON_22" value="22" enum="JoystickList">
Gamepad button 22.
</constant>
<constant name="JOY_BUTTON_MAX" value="23" enum="JoystickList">
Represents the maximum number of joystick buttons supported.
</constant>
<constant name="JOY_SONY_CIRCLE" value="1" enum="JoystickList">
@@ -1081,22 +1084,25 @@
<constant name="JOY_DPAD_RIGHT" value="15" enum="JoystickList">
Gamepad DPad right.
</constant>
<constant name="JOY_MISC1" value="16" enum="JoystickList">
<constant name="JOY_GUIDE" value="16" enum="JoystickList">
Gamepad SDL guide button.
</constant>
<constant name="JOY_MISC1" value="17" enum="JoystickList">
Gamepad SDL miscellaneous button.
</constant>
<constant name="JOY_PADDLE1" value="17" enum="JoystickList">
<constant name="JOY_PADDLE1" value="18" enum="JoystickList">
Gamepad SDL paddle 1 button.
</constant>
<constant name="JOY_PADDLE2" value="18" enum="JoystickList">
<constant name="JOY_PADDLE2" value="19" enum="JoystickList">
Gamepad SDL paddle 2 button.
</constant>
<constant name="JOY_PADDLE3" value="19" enum="JoystickList">
<constant name="JOY_PADDLE3" value="20" enum="JoystickList">
Gamepad SDL paddle 3 button.
</constant>
<constant name="JOY_PADDLE4" value="20" enum="JoystickList">
<constant name="JOY_PADDLE4" value="21" enum="JoystickList">
Gamepad SDL paddle 4 button.
</constant>
<constant name="JOY_TOUCHPAD" value="21" enum="JoystickList">
<constant name="JOY_TOUCHPAD" value="22" enum="JoystickList">
Gamepad SDL touchpad button.
</constant>
<constant name="JOY_L" value="4" enum="JoystickList">

View File

@@ -15,192 +15,154 @@
</tutorials>
<methods>
<method name="AABB">
<return type="AABB">
</return>
<argument index="0" name="position" type="Vector3">
</argument>
<argument index="1" name="size" type="Vector3">
</argument>
<return type="AABB" />
<argument index="0" name="position" type="Vector3" />
<argument index="1" name="size" type="Vector3" />
<description>
Constructs an [AABB] from a position and size.
</description>
</method>
<method name="abs">
<return type="AABB">
</return>
<return type="AABB" />
<description>
Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive.
</description>
</method>
<method name="encloses">
<return type="bool">
</return>
<argument index="0" name="with" type="AABB">
</argument>
<return type="bool" />
<argument index="0" name="with" type="AABB" />
<description>
Returns [code]true[/code] if this [AABB] completely encloses another one.
</description>
</method>
<method name="expand">
<return type="AABB">
</return>
<argument index="0" name="to_point" type="Vector3">
</argument>
<return type="AABB" />
<argument index="0" name="to_point" type="Vector3" />
<description>
Returns this [AABB] expanded to include a given point.
</description>
</method>
<method name="get_area">
<return type="float">
</return>
<return type="float" />
<description>
Returns the volume of the [AABB].
</description>
</method>
<method name="get_endpoint">
<return type="Vector3">
</return>
<argument index="0" name="idx" type="int">
</argument>
<return type="Vector3" />
<argument index="0" name="idx" type="int" />
<description>
Gets the position of the 8 endpoints of the [AABB] in space.
</description>
</method>
<method name="get_longest_axis">
<return type="Vector3">
</return>
<return type="Vector3" />
<description>
Returns the normalized longest axis of the [AABB].
</description>
</method>
<method name="get_longest_axis_index">
<return type="int">
</return>
<return type="int" />
<description>
Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants).
</description>
</method>
<method name="get_longest_axis_size">
<return type="float">
</return>
<return type="float" />
<description>
Returns the scalar length of the longest axis of the [AABB].
</description>
</method>
<method name="get_shortest_axis">
<return type="Vector3">
</return>
<return type="Vector3" />
<description>
Returns the normalized shortest axis of the [AABB].
</description>
</method>
<method name="get_shortest_axis_index">
<return type="int">
</return>
<return type="int" />
<description>
Returns the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum).
</description>
</method>
<method name="get_shortest_axis_size">
<return type="float">
</return>
<return type="float" />
<description>
Returns the scalar length of the shortest axis of the [AABB].
</description>
</method>
<method name="get_support">
<return type="Vector3">
</return>
<argument index="0" name="dir" type="Vector3">
</argument>
<return type="Vector3" />
<argument index="0" name="dir" type="Vector3" />
<description>
Returns the support point in a given direction. This is useful for collision detection algorithms.
</description>
</method>
<method name="grow">
<return type="AABB">
</return>
<argument index="0" name="by" type="float">
</argument>
<return type="AABB" />
<argument index="0" name="by" type="float" />
<description>
Returns a copy of the [AABB] grown a given amount of units towards all the sides.
</description>
</method>
<method name="has_no_area">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if the [AABB] is flat or empty.
</description>
</method>
<method name="has_no_surface">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if the [AABB] is empty.
</description>
</method>
<method name="has_point">
<return type="bool">
</return>
<argument index="0" name="point" type="Vector3">
</argument>
<return type="bool" />
<argument index="0" name="point" type="Vector3" />
<description>
Returns [code]true[/code] if the [AABB] contains a point.
</description>
</method>
<method name="intersection">
<return type="AABB">
</return>
<argument index="0" name="with" type="AABB">
</argument>
<return type="AABB" />
<argument index="0" name="with" type="AABB" />
<description>
Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
</description>
</method>
<method name="intersects">
<return type="bool">
</return>
<argument index="0" name="with" type="AABB">
</argument>
<return type="bool" />
<argument index="0" name="with" type="AABB" />
<description>
Returns [code]true[/code] if the [AABB] overlaps with another.
</description>
</method>
<method name="intersects_plane">
<return type="bool">
</return>
<argument index="0" name="plane" type="Plane">
</argument>
<return type="bool" />
<argument index="0" name="plane" type="Plane" />
<description>
Returns [code]true[/code] if the [AABB] is on both sides of a plane.
</description>
</method>
<method name="intersects_segment">
<return type="bool">
</return>
<argument index="0" name="from" type="Vector3">
</argument>
<argument index="1" name="to" type="Vector3">
</argument>
<return type="bool" />
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="to" type="Vector3" />
<description>
Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code].
</description>
</method>
<method name="is_equal_approx">
<return type="bool">
</return>
<argument index="0" name="aabb" type="AABB">
</argument>
<return type="bool" />
<argument index="0" name="aabb" type="AABB" />
<description>
Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="merge">
<return type="AABB">
</return>
<argument index="0" name="with" type="AABB">
</argument>
<return type="AABB" />
<argument index="0" name="with" type="AABB" />
<description>
Returns a larger [AABB] that contains both this [AABB] and [code]with[/code].
</description>

View File

@@ -12,36 +12,31 @@
</tutorials>
<methods>
<method name="get_anchor_name" qualifiers="const">
<return type="String">
</return>
<return type="String" />
<description>
Returns the name given to this anchor.
</description>
</method>
<method name="get_is_active" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if the anchor is being tracked and [code]false[/code] if no anchor with this ID is currently known.
</description>
</method>
<method name="get_mesh" qualifiers="const">
<return type="Mesh">
</return>
<return type="Mesh" />
<description>
If provided by the [ARVRInterface], this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes.
</description>
</method>
<method name="get_plane" qualifiers="const">
<return type="Plane">
</return>
<return type="Plane" />
<description>
Returns a plane aligned with our anchor; handy for intersection testing.
</description>
</method>
<method name="get_size" qualifiers="const">
<return type="Vector3">
</return>
<return type="Vector3" />
<description>
Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table.
</description>
@@ -54,8 +49,7 @@
</members>
<signals>
<signal name="mesh_updated">
<argument index="0" name="mesh" type="Mesh">
</argument>
<argument index="0" name="mesh" type="Mesh" />
<description>
Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being [code]mesh_updated[/code].
</description>

View File

@@ -13,54 +13,45 @@
</tutorials>
<methods>
<method name="get_controller_name" qualifiers="const">
<return type="String">
</return>
<return type="String" />
<description>
If active, returns the name of the associated controller if provided by the AR/VR SDK used.
</description>
</method>
<method name="get_hand" qualifiers="const">
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return>
<return type="int" enum="ARVRPositionalTracker.TrackerHand" />
<description>
Returns the hand holding this controller, if known. See [enum ARVRPositionalTracker.TrackerHand].
</description>
</method>
<method name="get_is_active" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if the bound controller is active. ARVR systems attempt to track active controllers.
</description>
</method>
<method name="get_joystick_axis" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="axis" type="int">
</argument>
<return type="float" />
<argument index="0" name="axis" type="int" />
<description>
Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller.
</description>
</method>
<method name="get_joystick_id" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the ID of the joystick object bound to this. Every controller tracked by the [ARVRServer] that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
</description>
</method>
<method name="get_mesh" qualifiers="const">
<return type="Mesh">
</return>
<return type="Mesh" />
<description>
If provided by the [ARVRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller.
</description>
</method>
<method name="is_button_pressed" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="button" type="int">
</argument>
<return type="int" />
<argument index="0" name="button" type="int" />
<description>
Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoystickList], in particular the [code]JOY_VR_*[/code] constants.
</description>
@@ -80,22 +71,19 @@
</members>
<signals>
<signal name="button_pressed">
<argument index="0" name="button" type="int">
</argument>
<argument index="0" name="button" type="int" />
<description>
Emitted when a button on this controller is pressed.
</description>
</signal>
<signal name="button_release">
<argument index="0" name="button" type="int">
</argument>
<argument index="0" name="button" type="int" />
<description>
Emitted when a button on this controller is released.
</description>
</signal>
<signal name="mesh_updated">
<argument index="0" name="mesh" type="Mesh">
</argument>
<argument index="0" name="mesh" type="Mesh" />
<description>
Emitted when the mesh associated with the controller changes or when one becomes available. Generally speaking this will be a static mesh after becoming available.
</description>

View File

@@ -12,43 +12,37 @@
</tutorials>
<methods>
<method name="get_camera_feed_id">
<return type="int">
</return>
<return type="int" />
<description>
If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the [CameraServer] for this interface.
</description>
</method>
<method name="get_capabilities" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface.
</description>
</method>
<method name="get_name" qualifiers="const">
<return type="String">
</return>
<return type="String" />
<description>
Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).
</description>
</method>
<method name="get_render_targetsize">
<return type="Vector2">
</return>
<return type="Vector2" />
<description>
Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
</description>
</method>
<method name="get_tracking_status" qualifiers="const">
<return type="int" enum="ARVRInterface.Tracking_status">
</return>
<return type="int" enum="ARVRInterface.Tracking_status" />
<description>
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
</description>
</method>
<method name="initialize">
<return type="bool">
</return>
<return type="bool" />
<description>
Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
@@ -58,15 +52,13 @@
</description>
</method>
<method name="is_stereo">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if the current output of this interface is in stereo.
</description>
</method>
<method name="uninitialize">
<return type="void">
</return>
<return type="void" />
<description>
Turns the interface off.
</description>

View File

@@ -13,80 +13,68 @@
</tutorials>
<methods>
<method name="get_hand" qualifiers="const">
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return>
<return type="int" enum="ARVRPositionalTracker.TrackerHand" />
<description>
Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
</description>
</method>
<method name="get_joy_id" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID.
</description>
</method>
<method name="get_mesh" qualifiers="const">
<return type="Mesh">
</return>
<return type="Mesh" />
<description>
Returns the mesh related to a controller or anchor point if one is available.
</description>
</method>
<method name="get_name" qualifiers="const">
<return type="String">
</return>
<return type="String" />
<description>
Returns the controller or anchor point's name if available.
</description>
</method>
<method name="get_orientation" qualifiers="const">
<return type="Basis">
</return>
<return type="Basis" />
<description>
Returns the controller's orientation matrix.
</description>
</method>
<method name="get_position" qualifiers="const">
<return type="Vector3">
</return>
<return type="Vector3" />
<description>
Returns the world-space controller position.
</description>
</method>
<method name="get_tracker_id" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [ARVRController] and [ARVRAnchor] nodes.
</description>
</method>
<method name="get_tracks_orientation" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if this device tracks orientation.
</description>
</method>
<method name="get_tracks_position" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if this device tracks position.
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Transform">
</return>
<argument index="0" name="adjust_by_reference_frame" type="bool">
</argument>
<return type="Transform" />
<argument index="0" name="adjust_by_reference_frame" type="bool" />
<description>
Returns the transform combining this device's orientation and position.
</description>
</method>
<method name="get_type" qualifiers="const">
<return type="int" enum="ARVRServer.TrackerType">
</return>
<return type="int" enum="ARVRServer.TrackerType" />
<description>
Returns the tracker's type.
</description>

View File

@@ -11,12 +11,9 @@
</tutorials>
<methods>
<method name="center_on_hmd">
<return type="void">
</return>
<argument index="0" name="rotation_mode" type="int" enum="ARVRServer.RotationMode">
</argument>
<argument index="1" name="keep_height" type="bool">
</argument>
<return type="void" />
<argument index="0" name="rotation_mode" type="int" enum="ARVRServer.RotationMode" />
<argument index="1" name="keep_height" type="bool" />
<description>
This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently.
For platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.
@@ -27,84 +24,70 @@
</description>
</method>
<method name="find_interface" qualifiers="const">
<return type="ARVRInterface">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="ARVRInterface" />
<argument index="0" name="name" type="String" />
<description>
Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
</description>
</method>
<method name="get_hmd_transform">
<return type="Transform">
</return>
<return type="Transform" />
<description>
Returns the primary interface's transformation.
</description>
</method>
<method name="get_interface" qualifiers="const">
<return type="ARVRInterface">
</return>
<argument index="0" name="idx" type="int">
</argument>
<return type="ARVRInterface" />
<argument index="0" name="idx" type="int" />
<description>
Returns the interface registered at a given index in our list of interfaces.
</description>
</method>
<method name="get_interface_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code].
</description>
</method>
<method name="get_interfaces" qualifiers="const">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns a list of available interfaces the ID and name of each interface.
</description>
</method>
<method name="get_last_commit_usec">
<return type="int">
</return>
<return type="int" />
<description>
Returns the absolute timestamp (in μs) of the last [ARVRServer] commit of the AR/VR eyes to [VisualServer]. The value comes from an internal call to [method OS.get_ticks_usec].
</description>
</method>
<method name="get_last_frame_usec">
<return type="int">
</return>
<return type="int" />
<description>
Returns the duration (in μs) of the last frame. This is computed as the difference between [method get_last_commit_usec] and [method get_last_process_usec] when committing.
</description>
</method>
<method name="get_last_process_usec">
<return type="int">
</return>
<return type="int" />
<description>
Returns the absolute timestamp (in μs) of the last [ARVRServer] process callback. The value comes from an internal call to [method OS.get_ticks_usec].
</description>
</method>
<method name="get_reference_frame" qualifiers="const">
<return type="Transform">
</return>
<return type="Transform" />
<description>
Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces.
</description>
</method>
<method name="get_tracker" qualifiers="const">
<return type="ARVRPositionalTracker">
</return>
<argument index="0" name="idx" type="int">
</argument>
<return type="ARVRPositionalTracker" />
<argument index="0" name="idx" type="int" />
<description>
Returns the positional tracker at the given ID.
</description>
</method>
<method name="get_tracker_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of trackers currently registered.
</description>
@@ -120,37 +103,29 @@
</members>
<signals>
<signal name="interface_added">
<argument index="0" name="interface_name" type="String">
</argument>
<argument index="0" name="interface_name" type="String" />
<description>
Emitted when a new interface has been added.
</description>
</signal>
<signal name="interface_removed">
<argument index="0" name="interface_name" type="String">
</argument>
<argument index="0" name="interface_name" type="String" />
<description>
Emitted when an interface is removed.
</description>
</signal>
<signal name="tracker_added">
<argument index="0" name="tracker_name" type="String">
</argument>
<argument index="1" name="type" type="int">
</argument>
<argument index="2" name="id" type="int">
</argument>
<argument index="0" name="tracker_name" type="String" />
<argument index="1" name="type" type="int" />
<argument index="2" name="id" type="int" />
<description>
Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [ARVRAnchor]s for an AR solution, it is important to react to this signal to add the appropriate [ARVRController] or [ARVRAnchor] nodes related to this new tracker.
</description>
</signal>
<signal name="tracker_removed">
<argument index="0" name="tracker_name" type="String">
</argument>
<argument index="1" name="type" type="int">
</argument>
<argument index="2" name="id" type="int">
</argument>
<argument index="0" name="tracker_name" type="String" />
<argument index="1" name="type" type="int" />
<argument index="2" name="id" type="int" />
<description>
Emitted when a tracker is removed. You should remove any [ARVRController] or [ARVRAnchor] points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one).
</description>

View File

@@ -18,44 +18,34 @@
return min(0, abs(u - v) - 1)
[/codeblock]
[method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) &lt;= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest cost paths. Here, the cost of a path equals to the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the end points of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals to the sum of Euclidean distances of all segments in the path.
If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest-cost paths. Here, the cost of a path equals the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the endpoints of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals the sum of Euclidean distances of all segments in the path.
</description>
<tutorials>
</tutorials>
<methods>
<method name="_compute_cost" qualifiers="virtual">
<return type="float">
</return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Called when computing the cost between two connected points.
Note that this function is hidden in the default [code]AStar[/code] class.
</description>
</method>
<method name="_estimate_cost" qualifiers="virtual">
<return type="float">
</return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Called when estimating the cost between a point and the path's ending point.
Note that this function is hidden in the default [code]AStar[/code] class.
</description>
</method>
<method name="add_point">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="position" type="Vector3">
</argument>
<argument index="2" name="weight_scale" type="float" default="1.0">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="position" type="Vector3" />
<argument index="2" name="weight_scale" type="float" default="1.0" />
<description>
Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
@@ -67,34 +57,25 @@
</description>
</method>
<method name="are_points_connected" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<argument index="2" name="bidirectional" type="bool" default="true">
</argument>
<return type="bool" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Returns whether the two given points are directly connected by a segment. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment.
</description>
</method>
<method name="clear">
<return type="void">
</return>
<return type="void" />
<description>
Clears all the points and segments.
</description>
</method>
<method name="connect_points">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<argument index="2" name="bidirectional" type="bool" default="true">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
[codeblock]
@@ -106,42 +87,32 @@
</description>
</method>
<method name="disconnect_points">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<argument index="2" name="bidirectional" type="bool" default="true">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains.
</description>
</method>
<method name="get_available_point_id" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the next available point ID with no point associated to it.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="to_position" type="Vector3">
</argument>
<argument index="1" name="include_disabled" type="bool" default="false">
</argument>
<return type="int" />
<argument index="0" name="to_position" type="Vector3" />
<argument index="1" name="include_disabled" type="bool" default="false" />
<description>
Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
[b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="to_position" type="Vector3">
</argument>
<return type="Vector3" />
<argument index="0" name="to_position" type="Vector3" />
<description>
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
[codeblock]
@@ -155,12 +126,9 @@
</description>
</method>
<method name="get_id_path">
<return type="PoolIntArray">
</return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="PoolIntArray" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
[codeblock]
@@ -181,17 +149,14 @@
</description>
</method>
<method name="get_point_capacity" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code].
</description>
</method>
<method name="get_point_connections">
<return type="PoolIntArray">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="PoolIntArray" />
<argument index="0" name="id" type="int" />
<description>
Returns an array with the IDs of the points that form the connection with the given point.
[codeblock]
@@ -209,114 +174,88 @@
</description>
</method>
<method name="get_point_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of points currently in the points pool.
</description>
</method>
<method name="get_point_path">
<return type="PoolVector3Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="PoolVector3Array" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PoolVector3Array] and will print an error message.
</description>
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="Vector3" />
<argument index="0" name="id" type="int" />
<description>
Returns the position of the point associated with the given [code]id[/code].
</description>
</method>
<method name="get_point_weight_scale" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="float" />
<argument index="0" name="id" type="int" />
<description>
Returns the weight scale of the point associated with the given [code]id[/code].
</description>
</method>
<method name="get_points">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns an array of all points.
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
Returns whether a point associated with the given [code]id[/code] exists.
</description>
</method>
<method name="is_point_disabled" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
</description>
</method>
<method name="remove_point">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<description>
Removes the point associated with the given [code]id[/code] from the points pool.
</description>
</method>
<method name="reserve_space">
<return type="void">
</return>
<argument index="0" name="num_nodes" type="int">
</argument>
<return type="void" />
<argument index="0" name="num_nodes" type="int" />
<description>
Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="disabled" type="bool" default="true">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="disabled" type="bool" default="true" />
<description>
Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
</description>
</method>
<method name="set_point_position">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="position" type="Vector3">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="position" type="Vector3" />
<description>
Sets the [code]position[/code] for the point with the given [code]id[/code].
</description>
</method>
<method name="set_point_weight_scale">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="weight_scale" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="weight_scale" type="float" />
<description>
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>

View File

@@ -10,38 +10,28 @@
</tutorials>
<methods>
<method name="_compute_cost" qualifiers="virtual">
<return type="float">
</return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Called when computing the cost between two connected points.
Note that this function is hidden in the default [code]AStar2D[/code] class.
</description>
</method>
<method name="_estimate_cost" qualifiers="virtual">
<return type="float">
</return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Called when estimating the cost between a point and the path's ending point.
Note that this function is hidden in the default [code]AStar2D[/code] class.
</description>
</method>
<method name="add_point">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
<argument index="2" name="weight_scale" type="float" default="1.0">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="position" type="Vector2" />
<argument index="2" name="weight_scale" type="float" default="1.0" />
<description>
Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
@@ -53,32 +43,24 @@
</description>
</method>
<method name="are_points_connected" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="bool" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns whether there is a connection/segment between the given points.
</description>
</method>
<method name="clear">
<return type="void">
</return>
<return type="void" />
<description>
Clears all the points and segments.
</description>
</method>
<method name="connect_points">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<argument index="2" name="bidirectional" type="bool" default="true">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
[codeblock]
@@ -90,40 +72,31 @@
</description>
</method>
<method name="disconnect_points">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Deletes the segment between the given points.
</description>
</method>
<method name="get_available_point_id" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the next available point ID with no point associated to it.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="to_position" type="Vector2">
</argument>
<argument index="1" name="include_disabled" type="bool" default="false">
</argument>
<return type="int" />
<argument index="0" name="to_position" type="Vector2" />
<argument index="1" name="include_disabled" type="bool" default="false" />
<description>
Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
[b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="to_position" type="Vector2">
</argument>
<return type="Vector2" />
<argument index="0" name="to_position" type="Vector2" />
<description>
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
[codeblock]
@@ -137,12 +110,9 @@
</description>
</method>
<method name="get_id_path">
<return type="PoolIntArray">
</return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="PoolIntArray" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
[codeblock]
@@ -163,17 +133,14 @@
</description>
</method>
<method name="get_point_capacity" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code].
</description>
</method>
<method name="get_point_connections">
<return type="PoolIntArray">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="PoolIntArray" />
<argument index="0" name="id" type="int" />
<description>
Returns an array with the IDs of the points that form the connection with the given point.
[codeblock]
@@ -191,114 +158,88 @@
</description>
</method>
<method name="get_point_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of points currently in the points pool.
</description>
</method>
<method name="get_point_path">
<return type="PoolVector2Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
<return type="PoolVector2Array" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PoolVector2Array] and will print an error message.
</description>
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="Vector2" />
<argument index="0" name="id" type="int" />
<description>
Returns the position of the point associated with the given [code]id[/code].
</description>
</method>
<method name="get_point_weight_scale" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="float" />
<argument index="0" name="id" type="int" />
<description>
Returns the weight scale of the point associated with the given [code]id[/code].
</description>
</method>
<method name="get_points">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns an array of all points.
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
Returns whether a point associated with the given [code]id[/code] exists.
</description>
</method>
<method name="is_point_disabled" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
</description>
</method>
<method name="remove_point">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<description>
Removes the point associated with the given [code]id[/code] from the points pool.
</description>
</method>
<method name="reserve_space">
<return type="void">
</return>
<argument index="0" name="num_nodes" type="int">
</argument>
<return type="void" />
<argument index="0" name="num_nodes" type="int" />
<description>
Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="disabled" type="bool" default="true">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="disabled" type="bool" default="true" />
<description>
Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
</description>
</method>
<method name="set_point_position">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="position" type="Vector2" />
<description>
Sets the [code]position[/code] for the point with the given [code]id[/code].
</description>
</method>
<method name="set_point_weight_scale">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="weight_scale" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="weight_scale" type="float" />
<description>
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>

View File

@@ -10,47 +10,37 @@
</tutorials>
<methods>
<method name="add_button">
<return type="Button">
</return>
<argument index="0" name="text" type="String">
</argument>
<argument index="1" name="right" type="bool" default="false">
</argument>
<argument index="2" name="action" type="String" default="&quot;&quot;">
</argument>
<return type="Button" />
<argument index="0" name="text" type="String" />
<argument index="1" name="right" type="bool" default="false" />
<argument index="2" name="action" type="String" default="&quot;&quot;" />
<description>
Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed.
If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons.
</description>
</method>
<method name="add_cancel">
<return type="Button">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="Button" />
<argument index="0" name="name" type="String" />
<description>
Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button.
</description>
</method>
<method name="get_label">
<return type="Label">
</return>
<return type="Label" />
<description>
Returns the label used for built-in text.
</description>
</method>
<method name="get_ok">
<return type="Button">
</return>
<return type="Button" />
<description>
Returns the OK [Button] instance.
</description>
</method>
<method name="register_text_enter">
<return type="void">
</return>
<argument index="0" name="line_edit" type="Node">
</argument>
<return type="void" />
<argument index="0" name="line_edit" type="Node" />
<description>
Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
</description>
@@ -76,8 +66,7 @@
</description>
</signal>
<signal name="custom_action">
<argument index="0" name="action" type="String">
</argument>
<argument index="0" name="action" type="String" />
<description>
Emitted when a custom button is pressed. See [method add_button].
</description>

View File

@@ -13,26 +13,21 @@
</tutorials>
<methods>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if an animation is currently being played.
</description>
</method>
<method name="play">
<return type="void">
</return>
<argument index="0" name="anim" type="String" default="&quot;&quot;">
</argument>
<argument index="1" name="backwards" type="bool" default="false">
</argument>
<return type="void" />
<argument index="0" name="anim" type="String" default="&quot;&quot;" />
<argument index="1" name="backwards" type="bool" default="false" />
<description>
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<return type="void" />
<description>
Stops the current animation (does not reset the frame counter).
</description>

View File

@@ -11,24 +11,20 @@
</tutorials>
<methods>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if an animation is currently being played.
</description>
</method>
<method name="play">
<return type="void">
</return>
<argument index="0" name="anim" type="String" default="&quot;&quot;">
</argument>
<return type="void" />
<argument index="0" name="anim" type="String" default="&quot;&quot;" />
<description>
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<return type="void" />
<description>
Stops the current animation (does not reset the frame counter).
</description>

View File

@@ -13,30 +13,23 @@
</tutorials>
<methods>
<method name="get_frame_delay" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="frame" type="int">
</argument>
<return type="float" />
<argument index="0" name="frame" type="int" />
<description>
Returns the given frame's delay value.
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
<return type="Texture">
</return>
<argument index="0" name="frame" type="int">
</argument>
<return type="Texture" />
<argument index="0" name="frame" type="int" />
<description>
Returns the given frame's [Texture].
</description>
</method>
<method name="set_frame_delay">
<return type="void">
</return>
<argument index="0" name="frame" type="int">
</argument>
<argument index="1" name="delay" type="float">
</argument>
<return type="void" />
<argument index="0" name="frame" type="int" />
<argument index="1" name="delay" type="float" />
<description>
Sets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code].
For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:
@@ -49,12 +42,9 @@
</description>
</method>
<method name="set_frame_texture">
<return type="void">
</return>
<argument index="0" name="frame" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
</argument>
<return type="void" />
<argument index="0" name="frame" type="int" />
<argument index="1" name="texture" type="Texture" />
<description>
Assigns a [Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.

View File

@@ -21,673 +21,487 @@
</tutorials>
<methods>
<method name="add_track">
<return type="int">
</return>
<argument index="0" name="type" type="int" enum="Animation.TrackType">
</argument>
<argument index="1" name="at_position" type="int" default="-1">
</argument>
<return type="int" />
<argument index="0" name="type" type="int" enum="Animation.TrackType" />
<argument index="1" name="at_position" type="int" default="-1" />
<description>
Adds a track to the Animation.
</description>
</method>
<method name="animation_track_get_key_animation" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="String" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the animation name at the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="animation_track_insert_key">
<return type="int">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="animation" type="String">
</argument>
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="animation" type="String" />
<description>
Inserts a key with value [code]animation[/code] at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="animation_track_set_key_animation">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="animation" type="String">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="animation" type="String" />
<description>
Sets the key identified by [code]key_idx[/code] to value [code]animation[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="audio_track_get_key_end_offset" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the end offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
End offset is the number of seconds cut off at the ending of the audio stream.
</description>
</method>
<method name="audio_track_get_key_start_offset" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the start offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
Start offset is the number of seconds cut off at the beginning of the audio stream.
</description>
</method>
<method name="audio_track_get_key_stream" qualifiers="const">
<return type="Resource">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="Resource" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the audio stream of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_insert_key">
<return type="int">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="stream" type="Resource">
</argument>
<argument index="3" name="start_offset" type="float" default="0">
</argument>
<argument index="4" name="end_offset" type="float" default="0">
</argument>
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="stream" type="Resource" />
<argument index="3" name="start_offset" type="float" default="0" />
<argument index="4" name="end_offset" type="float" default="0" />
<description>
Inserts an Audio Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of an Audio Track.
[code]stream[/code] is the [AudioStream] resource to play. [code]start_offset[/code] is the number of seconds cut off at the beginning of the audio stream, while [code]end_offset[/code] is at the ending.
</description>
</method>
<method name="audio_track_set_key_end_offset">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="offset" type="float">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="offset" type="float" />
<description>
Sets the end offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_set_key_start_offset">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="offset" type="float">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="offset" type="float" />
<description>
Sets the start offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_set_key_stream">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="stream" type="Resource">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="stream" type="Resource" />
<description>
Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="bezier_track_get_key_in_handle" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="Vector2" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the in handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_get_key_out_handle" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="Vector2" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the out handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_get_key_value" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the value of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_insert_key">
<return type="int">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="value" type="float">
</argument>
<argument index="3" name="in_handle" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="value" type="float" />
<argument index="3" name="in_handle" type="Vector2" default="Vector2( 0, 0 )" />
<argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )" />
<description>
Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track.
[code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point.
</description>
</method>
<method name="bezier_track_interpolate" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<description>
Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_in_handle">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="in_handle" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="in_handle" type="Vector2" />
<description>
Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_out_handle">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="out_handle" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="out_handle" type="Vector2" />
<description>
Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_value">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="value" type="float">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="value" type="float" />
<description>
Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="clear">
<return type="void">
</return>
<return type="void" />
<description>
Clear the animation (clear all tracks and reset all).
</description>
</method>
<method name="copy_track">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="to_animation" type="Animation">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="to_animation" type="Animation" />
<description>
Adds a new track that is a copy of the given track from [code]to_animation[/code].
</description>
</method>
<method name="find_track" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="path" type="NodePath">
</argument>
<return type="int" />
<argument index="0" name="path" type="NodePath" />
<description>
Returns the index of the specified track. If the track is not found, return -1.
</description>
</method>
<method name="get_track_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the amount of tracks in the animation.
</description>
</method>
<method name="method_track_get_key_indices" qualifiers="const">
<return type="PoolIntArray">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time_sec" type="float">
</argument>
<argument index="2" name="delta" type="float">
</argument>
<return type="PoolIntArray" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time_sec" type="float" />
<argument index="2" name="delta" type="float" />
<description>
Returns all the key indices of a method track, given a position and delta time.
</description>
</method>
<method name="method_track_get_name" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="String" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the method name of a method track.
</description>
</method>
<method name="method_track_get_params" qualifiers="const">
<return type="Array">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="Array" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the arguments values to be called on a method track for a given key in a given track.
</description>
</method>
<method name="remove_track">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<description>
Removes a track by specifying the track index.
</description>
</method>
<method name="track_find_key" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="exact" type="bool" default="false">
</argument>
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="exact" type="bool" default="false" />
<description>
Finds the key index by time in a given track. Optionally, only find it if the exact time is given.
</description>
</method>
<method name="track_get_interpolation_loop_wrap" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. New tracks wrap the interpolation loop by default.
</description>
</method>
<method name="track_get_interpolation_type" qualifiers="const">
<return type="int" enum="Animation.InterpolationType">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="int" enum="Animation.InterpolationType" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns the interpolation type of a given track.
</description>
</method>
<method name="track_get_key_count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns the amount of keys in a given track.
</description>
</method>
<method name="track_get_key_time" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the time at which the key is located.
</description>
</method>
<method name="track_get_key_transition" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
</description>
</method>
<method name="track_get_key_value" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="Variant" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the value of a given key in a given track.
</description>
</method>
<method name="track_get_path" qualifiers="const">
<return type="NodePath">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="NodePath" />
<argument index="0" name="track_idx" type="int" />
<description>
Gets the path of a track. For more information on the path format, see [method track_set_path].
</description>
</method>
<method name="track_get_type" qualifiers="const">
<return type="int" enum="Animation.TrackType">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="int" enum="Animation.TrackType" />
<argument index="0" name="track_idx" type="int" />
<description>
Gets the type of a track.
</description>
</method>
<method name="track_insert_key">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="key" type="Variant">
</argument>
<argument index="3" name="transition" type="float" default="1">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="key" type="Variant" />
<argument index="3" name="transition" type="float" default="1" />
<description>
Insert a generic key in a given track.
</description>
</method>
<method name="track_is_enabled" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns [code]true[/code] if the track at index [code]idx[/code] is enabled.
</description>
</method>
<method name="track_is_imported" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code].
</description>
</method>
<method name="track_move_down">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<description>
Moves a track down.
</description>
</method>
<method name="track_move_to">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="to_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="to_idx" type="int" />
<description>
Changes the index position of track [code]idx[/code] to the one defined in [code]to_idx[/code].
</description>
</method>
<method name="track_move_up">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<description>
Moves a track up.
</description>
</method>
<method name="track_remove_key">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Removes a key by index in a given track.
</description>
</method>
<method name="track_remove_key_at_position">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="position" type="float">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="position" type="float" />
<description>
Removes a key by position (seconds) in a given track.
</description>
</method>
<method name="track_set_enabled">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="enabled" type="bool">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="enabled" type="bool" />
<description>
Enables/disables the given track. Tracks are enabled by default.
</description>
</method>
<method name="track_set_imported">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="imported" type="bool">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="imported" type="bool" />
<description>
Sets the given track as imported or not.
</description>
</method>
<method name="track_set_interpolation_loop_wrap">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="interpolation" type="bool">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="interpolation" type="bool" />
<description>
If [code]true[/code], the track at [code]idx[/code] wraps the interpolation loop.
</description>
</method>
<method name="track_set_interpolation_type">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType" />
<description>
Sets the interpolation type of a given track.
</description>
</method>
<method name="track_set_key_time">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="time" type="float">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="time" type="float" />
<description>
Sets the time of an existing key.
</description>
</method>
<method name="track_set_key_transition">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
<argument index="2" name="transition" type="float">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="transition" type="float" />
<description>
Sets the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
</description>
</method>
<method name="track_set_key_value">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="key" type="int">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key" type="int" />
<argument index="2" name="value" type="Variant" />
<description>
Sets the value of an existing key.
</description>
</method>
<method name="track_set_path">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="path" type="NodePath">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="path" type="NodePath" />
<description>
Sets the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code].
Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code].
For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
</description>
</method>
<method name="track_swap">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="with_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="with_idx" type="int" />
<description>
Swaps the track [code]idx[/code]'s index position with the track [code]with_idx[/code].
</description>
</method>
<method name="transform_track_insert_key">
<return type="int">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="location" type="Vector3">
</argument>
<argument index="3" name="rotation" type="Quat">
</argument>
<argument index="4" name="scale" type="Vector3">
</argument>
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="location" type="Vector3" />
<argument index="3" name="rotation" type="Quat" />
<argument index="4" name="scale" type="Vector3" />
<description>
Insert a transform key for a transform track.
</description>
</method>
<method name="transform_track_interpolate" qualifiers="const">
<return type="Array">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time_sec" type="float">
</argument>
<return type="Array" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time_sec" type="float" />
<description>
Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]).
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
<return type="PoolIntArray">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time_sec" type="float">
</argument>
<argument index="2" name="delta" type="float">
</argument>
<return type="PoolIntArray" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time_sec" type="float" />
<argument index="2" name="delta" type="float" />
<description>
Returns all the key indices of a value track, given a position and delta time.
</description>
</method>
<method name="value_track_get_update_mode" qualifiers="const">
<return type="int" enum="Animation.UpdateMode">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<return type="int" enum="Animation.UpdateMode" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns the update mode of a value track.
</description>
</method>
<method name="value_track_interpolate" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="time_sec" type="float">
</argument>
<return type="Variant" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time_sec" type="float" />
<description>
Returns the interpolated value at the given time (in seconds). The [code]track_idx[/code] must be the index of a value track.
</description>
</method>
<method name="value_track_set_update_mode">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
<argument index="1" name="mode" type="int" enum="Animation.UpdateMode">
</argument>
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="mode" type="int" enum="Animation.UpdateMode" />
<description>
Sets the update mode (see [enum UpdateMode]) of a value track.
</description>

View File

@@ -12,158 +12,117 @@
</tutorials>
<methods>
<method name="add_input">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree].
</description>
</method>
<method name="blend_animation">
<return type="void">
</return>
<argument index="0" name="animation" type="String">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="delta" type="float">
</argument>
<argument index="3" name="seeked" type="bool">
</argument>
<argument index="4" name="blend" type="float">
</argument>
<return type="void" />
<argument index="0" name="animation" type="String" />
<argument index="1" name="time" type="float" />
<argument index="2" name="delta" type="float" />
<argument index="3" name="seeked" type="bool" />
<argument index="4" name="blend" type="float" />
<description>
Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened.
</description>
</method>
<method name="blend_input">
<return type="float">
</return>
<argument index="0" name="input_index" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="seek" type="bool">
</argument>
<argument index="3" name="blend" type="float">
</argument>
<argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0">
</argument>
<argument index="5" name="optimize" type="bool" default="true">
</argument>
<return type="float" />
<argument index="0" name="input_index" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="seek" type="bool" />
<argument index="3" name="blend" type="float" />
<argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
<argument index="5" name="optimize" type="bool" default="true" />
<description>
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options).
</description>
</method>
<method name="blend_node">
<return type="float">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
<argument index="2" name="time" type="float">
</argument>
<argument index="3" name="seek" type="bool">
</argument>
<argument index="4" name="blend" type="float">
</argument>
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0">
</argument>
<argument index="6" name="optimize" type="bool" default="true">
</argument>
<return type="float" />
<argument index="0" name="name" type="String" />
<argument index="1" name="node" type="AnimationNode" />
<argument index="2" name="time" type="float" />
<argument index="3" name="seek" type="bool" />
<argument index="4" name="blend" type="float" />
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
<argument index="6" name="optimize" type="bool" default="true" />
<description>
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition.
</description>
</method>
<method name="get_caption" qualifiers="virtual">
<return type="String">
</return>
<return type="String" />
<description>
Gets the text caption for this node (used by some editors).
</description>
</method>
<method name="get_child_by_name" qualifiers="virtual">
<return type="Object">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="Object" />
<argument index="0" name="name" type="String" />
<description>
Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
</description>
</method>
<method name="get_child_nodes" qualifiers="virtual">
<return type="Dictionary">
</return>
<return type="Dictionary" />
<description>
Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
</description>
</method>
<method name="get_input_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Amount of inputs in this node, only useful for nodes that go into [AnimationNodeBlendTree].
</description>
</method>
<method name="get_input_name">
<return type="String">
</return>
<argument index="0" name="input" type="int">
</argument>
<return type="String" />
<argument index="0" name="input" type="int" />
<description>
Gets the name of an input by index.
</description>
</method>
<method name="get_parameter" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="Variant" />
<argument index="0" name="name" type="String" />
<description>
Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
</description>
</method>
<method name="get_parameter_default_value" qualifiers="virtual">
<return type="Variant">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="Variant" />
<argument index="0" name="name" type="String" />
<description>
Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
</description>
</method>
<method name="get_parameter_list" qualifiers="virtual">
<return type="Array">
</return>
<return type="Array" />
<description>
Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
</description>
</method>
<method name="has_filter" qualifiers="virtual">
<return type="String">
</return>
<return type="String" />
<description>
Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
</description>
</method>
<method name="is_path_filtered" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="path" type="NodePath">
</argument>
<return type="bool" />
<argument index="0" name="path" type="NodePath" />
<description>
Returns [code]true[/code] whether a given path is filtered.
</description>
</method>
<method name="process" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="time" type="float">
</argument>
<argument index="1" name="seek" type="bool">
</argument>
<return type="void" />
<argument index="0" name="time" type="float" />
<argument index="1" name="seek" type="bool" />
<description>
User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
@@ -171,32 +130,24 @@
</description>
</method>
<method name="remove_input">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
Removes an input, call this only when inactive.
</description>
</method>
<method name="set_filter_path">
<return type="void">
</return>
<argument index="0" name="path" type="NodePath">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="path" type="NodePath" />
<argument index="1" name="enable" type="bool" />
<description>
Adds or removes a path for the filter.
</description>
</method>
<method name="set_parameter">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="value" type="Variant" />
<description>
Sets a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes.
</description>

View File

@@ -14,70 +14,53 @@
</tutorials>
<methods>
<method name="add_blend_point">
<return type="void">
</return>
<argument index="0" name="node" type="AnimationRootNode">
</argument>
<argument index="1" name="pos" type="float">
</argument>
<argument index="2" name="at_index" type="int" default="-1">
</argument>
<return type="void" />
<argument index="0" name="node" type="AnimationRootNode" />
<argument index="1" name="pos" type="float" />
<argument index="2" name="at_index" type="int" default="-1" />
<description>
Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="get_blend_point_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of points on the blend axis.
</description>
</method>
<method name="get_blend_point_node" qualifiers="const">
<return type="AnimationRootNode">
</return>
<argument index="0" name="point" type="int">
</argument>
<return type="AnimationRootNode" />
<argument index="0" name="point" type="int" />
<description>
Returns the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="point" type="int">
</argument>
<return type="float" />
<argument index="0" name="point" type="int" />
<description>
Returns the position of the point at index [code]point[/code].
</description>
</method>
<method name="remove_blend_point">
<return type="void">
</return>
<argument index="0" name="point" type="int">
</argument>
<return type="void" />
<argument index="0" name="point" type="int" />
<description>
Removes the point at index [code]point[/code] from the blend axis.
</description>
</method>
<method name="set_blend_point_node">
<return type="void">
</return>
<argument index="0" name="point" type="int">
</argument>
<argument index="1" name="node" type="AnimationRootNode">
</argument>
<return type="void" />
<argument index="0" name="point" type="int" />
<argument index="1" name="node" type="AnimationRootNode" />
<description>
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="set_blend_point_position">
<return type="void">
</return>
<argument index="0" name="point" type="int">
</argument>
<argument index="1" name="pos" type="float">
</argument>
<return type="void" />
<argument index="0" name="point" type="int" />
<argument index="1" name="pos" type="float" />
<description>
Updates the position of the point at index [code]point[/code] on the blend axis.
</description>

View File

@@ -14,112 +14,84 @@
</tutorials>
<methods>
<method name="add_blend_point">
<return type="void">
</return>
<argument index="0" name="node" type="AnimationRootNode">
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
<argument index="2" name="at_index" type="int" default="-1">
</argument>
<return type="void" />
<argument index="0" name="node" type="AnimationRootNode" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="at_index" type="int" default="-1" />
<description>
Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="add_triangle">
<return type="void">
</return>
<argument index="0" name="x" type="int">
</argument>
<argument index="1" name="y" type="int">
</argument>
<argument index="2" name="z" type="int">
</argument>
<argument index="3" name="at_index" type="int" default="-1">
</argument>
<return type="void" />
<argument index="0" name="x" type="int" />
<argument index="1" name="y" type="int" />
<argument index="2" name="z" type="int" />
<argument index="3" name="at_index" type="int" default="-1" />
<description>
Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="get_blend_point_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of points in the blend space.
</description>
</method>
<method name="get_blend_point_node" qualifiers="const">
<return type="AnimationRootNode">
</return>
<argument index="0" name="point" type="int">
</argument>
<return type="AnimationRootNode" />
<argument index="0" name="point" type="int" />
<description>
Returns the [AnimationRootNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="point" type="int">
</argument>
<return type="Vector2" />
<argument index="0" name="point" type="int" />
<description>
Returns the position of the point at index [code]point[/code].
</description>
</method>
<method name="get_triangle_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of triangles in the blend space.
</description>
</method>
<method name="get_triangle_point">
<return type="int">
</return>
<argument index="0" name="triangle" type="int">
</argument>
<argument index="1" name="point" type="int">
</argument>
<return type="int" />
<argument index="0" name="triangle" type="int" />
<argument index="1" name="point" type="int" />
<description>
Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code].
</description>
</method>
<method name="remove_blend_point">
<return type="void">
</return>
<argument index="0" name="point" type="int">
</argument>
<return type="void" />
<argument index="0" name="point" type="int" />
<description>
Removes the point at index [code]point[/code] from the blend space.
</description>
</method>
<method name="remove_triangle">
<return type="void">
</return>
<argument index="0" name="triangle" type="int">
</argument>
<return type="void" />
<argument index="0" name="triangle" type="int" />
<description>
Removes the triangle at index [code]triangle[/code] from the blend space.
</description>
</method>
<method name="set_blend_point_node">
<return type="void">
</return>
<argument index="0" name="point" type="int">
</argument>
<argument index="1" name="node" type="AnimationRootNode">
</argument>
<return type="void" />
<argument index="0" name="point" type="int" />
<argument index="1" name="node" type="AnimationRootNode" />
<description>
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="set_blend_point_position">
<return type="void">
</return>
<argument index="0" name="point" type="int">
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="point" type="int" />
<argument index="1" name="pos" type="Vector2" />
<description>
Updates the position of the point at index [code]point[/code] on the blend axis.
</description>

View File

@@ -11,96 +11,71 @@
</tutorials>
<methods>
<method name="add_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="node" type="AnimationNode" />
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
<description>
Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later.
</description>
</method>
<method name="connect_node">
<return type="void">
</return>
<argument index="0" name="input_node" type="String">
</argument>
<argument index="1" name="input_index" type="int">
</argument>
<argument index="2" name="output_node" type="String">
</argument>
<return type="void" />
<argument index="0" name="input_node" type="String" />
<argument index="1" name="input_index" type="int" />
<argument index="2" name="output_node" type="String" />
<description>
Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code].
</description>
</method>
<method name="disconnect_node">
<return type="void">
</return>
<argument index="0" name="input_node" type="String">
</argument>
<argument index="1" name="input_index" type="int">
</argument>
<return type="void" />
<argument index="0" name="input_node" type="String" />
<argument index="1" name="input_index" type="int" />
<description>
Disconnects the node connected to the specified input.
</description>
</method>
<method name="get_node" qualifiers="const">
<return type="AnimationNode">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="AnimationNode" />
<argument index="0" name="name" type="String" />
<description>
Returns the sub-node with the specified [code]name[/code].
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="Vector2" />
<argument index="0" name="name" type="String" />
<description>
Returns the position of the sub-node with the specified [code]name[/code].
</description>
</method>
<method name="has_node" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="bool" />
<argument index="0" name="name" type="String" />
<description>
Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists.
</description>
</method>
<method name="remove_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Removes a sub-node.
</description>
</method>
<method name="rename_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="new_name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="new_name" type="String" />
<description>
Changes the name of a sub-node.
</description>
</method>
<method name="set_node_position">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="position" type="Vector2" />
<description>
Modifies the position of a sub-node.
</description>

View File

@@ -12,16 +12,13 @@
</tutorials>
<methods>
<method name="get_mix_mode" qualifiers="const">
<return type="int" enum="AnimationNodeOneShot.MixMode">
</return>
<return type="int" enum="AnimationNodeOneShot.MixMode" />
<description>
</description>
</method>
<method name="set_mix_mode">
<return type="void">
</return>
<argument index="0" name="mode" type="int" enum="AnimationNodeOneShot.MixMode">
</argument>
<return type="void" />
<argument index="0" name="mode" type="int" enum="AnimationNodeOneShot.MixMode" />
<description>
</description>
</method>

View File

@@ -16,218 +16,167 @@
</tutorials>
<methods>
<method name="add_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="node" type="AnimationNode" />
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
<description>
Adds a new node to the graph. The [code]position[/code] is used for display in the editor.
</description>
</method>
<method name="add_transition">
<return type="void">
</return>
<argument index="0" name="from" type="String">
</argument>
<argument index="1" name="to" type="String">
</argument>
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition">
</argument>
<return type="void" />
<argument index="0" name="from" type="String" />
<argument index="1" name="to" type="String" />
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition" />
<description>
Adds a transition between the given nodes.
</description>
</method>
<method name="get_end_node" qualifiers="const">
<return type="String">
</return>
<return type="String" />
<description>
Returns the graph's end node.
</description>
</method>
<method name="get_graph_offset" qualifiers="const">
<return type="Vector2">
</return>
<return type="Vector2" />
<description>
Returns the draw offset of the graph. Used for display in the editor.
</description>
</method>
<method name="get_node" qualifiers="const">
<return type="AnimationNode">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="AnimationNode" />
<argument index="0" name="name" type="String" />
<description>
Returns the animation node with the given name.
</description>
</method>
<method name="get_node_name" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="node" type="AnimationNode">
</argument>
<return type="String" />
<argument index="0" name="node" type="AnimationNode" />
<description>
Returns the given animation node's name.
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="Vector2" />
<argument index="0" name="name" type="String" />
<description>
Returns the given node's coordinates. Used for display in the editor.
</description>
</method>
<method name="get_start_node" qualifiers="const">
<return type="String">
</return>
<return type="String" />
<description>
Returns the graph's end node.
</description>
</method>
<method name="get_transition" qualifiers="const">
<return type="AnimationNodeStateMachineTransition">
</return>
<argument index="0" name="idx" type="int">
</argument>
<return type="AnimationNodeStateMachineTransition" />
<argument index="0" name="idx" type="int" />
<description>
Returns the given transition.
</description>
</method>
<method name="get_transition_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of connections in the graph.
</description>
</method>
<method name="get_transition_from" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="idx" type="int">
</argument>
<return type="String" />
<argument index="0" name="idx" type="int" />
<description>
Returns the given transition's start node.
</description>
</method>
<method name="get_transition_to" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="idx" type="int">
</argument>
<return type="String" />
<argument index="0" name="idx" type="int" />
<description>
Returns the given transition's end node.
</description>
</method>
<method name="has_node" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="bool" />
<argument index="0" name="name" type="String" />
<description>
Returns [code]true[/code] if the graph contains the given node.
</description>
</method>
<method name="has_transition" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="from" type="String">
</argument>
<argument index="1" name="to" type="String">
</argument>
<return type="bool" />
<argument index="0" name="from" type="String" />
<argument index="1" name="to" type="String" />
<description>
Returns [code]true[/code] if there is a transition between the given nodes.
</description>
</method>
<method name="remove_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Deletes the given node from the graph.
</description>
</method>
<method name="remove_transition">
<return type="void">
</return>
<argument index="0" name="from" type="String">
</argument>
<argument index="1" name="to" type="String">
</argument>
<return type="void" />
<argument index="0" name="from" type="String" />
<argument index="1" name="to" type="String" />
<description>
Deletes the transition between the two specified nodes.
</description>
</method>
<method name="remove_transition_by_index">
<return type="void">
</return>
<argument index="0" name="idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="idx" type="int" />
<description>
Deletes the given transition by index.
</description>
</method>
<method name="rename_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="new_name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="new_name" type="String" />
<description>
Renames the given node.
</description>
</method>
<method name="replace_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="node" type="AnimationNode" />
<description>
Replaces the node and keeps its transitions unchanged.
</description>
</method>
<method name="set_end_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Sets the given node as the graph end point.
</description>
</method>
<method name="set_graph_offset">
<return type="void">
</return>
<argument index="0" name="offset" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="offset" type="Vector2" />
<description>
Sets the draw offset of the graph. Used for display in the editor.
</description>
</method>
<method name="set_node_position">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="position" type="Vector2" />
<description>
Sets the node's coordinates. Used for display in the editor.
</description>
</method>
<method name="set_start_node">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Sets the given node as the graph start point.
</description>

View File

@@ -16,60 +16,50 @@
</tutorials>
<methods>
<method name="get_current_length" qualifiers="const">
<return type="float">
</return>
<return type="float" />
<description>
</description>
</method>
<method name="get_current_node" qualifiers="const">
<return type="String">
</return>
<return type="String" />
<description>
Returns the currently playing animation state.
</description>
</method>
<method name="get_current_play_position" qualifiers="const">
<return type="float">
</return>
<return type="float" />
<description>
Returns the playback position within the current animation state.
</description>
</method>
<method name="get_travel_path" qualifiers="const">
<return type="PoolStringArray">
</return>
<return type="PoolStringArray" />
<description>
Returns the current travel path as computed internally by the A* algorithm.
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if an animation is playing.
</description>
</method>
<method name="start">
<return type="void">
</return>
<argument index="0" name="node" type="String">
</argument>
<return type="void" />
<argument index="0" name="node" type="String" />
<description>
Starts playing the given animation.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<return type="void" />
<description>
Stops the currently playing animation.
</description>
</method>
<method name="travel">
<return type="void">
</return>
<argument index="0" name="to_node" type="String">
</argument>
<return type="void" />
<argument index="0" name="to_node" type="String" />
<description>
Transitions from the current state to another one, following the shortest path.
</description>

View File

@@ -13,38 +13,28 @@
</tutorials>
<methods>
<method name="get_input_caption" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="input" type="int">
</argument>
<return type="String" />
<argument index="0" name="input" type="int" />
<description>
</description>
</method>
<method name="is_input_set_as_auto_advance" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="input" type="int">
</argument>
<return type="bool" />
<argument index="0" name="input" type="int" />
<description>
</description>
</method>
<method name="set_input_as_auto_advance">
<return type="void">
</return>
<argument index="0" name="input" type="int">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="input" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="set_input_caption">
<return type="void">
</return>
<argument index="0" name="input" type="int">
</argument>
<argument index="1" name="caption" type="String">
</argument>
<return type="void" />
<argument index="0" name="input" type="int" />
<argument index="1" name="caption" type="String" />
<description>
</description>
</method>

View File

@@ -15,136 +15,106 @@
</tutorials>
<methods>
<method name="add_animation">
<return type="int" enum="Error">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="animation" type="Animation">
</argument>
<return type="int" enum="Error" />
<argument index="0" name="name" type="String" />
<argument index="1" name="animation" type="Animation" />
<description>
Adds [code]animation[/code] to the player accessible with the key [code]name[/code].
</description>
</method>
<method name="advance">
<return type="void">
</return>
<argument index="0" name="delta" type="float">
</argument>
<return type="void" />
<argument index="0" name="delta" type="float" />
<description>
Shifts position in the animation timeline and immediately updates the animation. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
</description>
</method>
<method name="animation_get_next" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="anim_from" type="String">
</argument>
<return type="String" />
<argument index="0" name="anim_from" type="String" />
<description>
Returns the name of the next animation in the queue.
</description>
</method>
<method name="animation_set_next">
<return type="void">
</return>
<argument index="0" name="anim_from" type="String">
</argument>
<argument index="1" name="anim_to" type="String">
</argument>
<return type="void" />
<argument index="0" name="anim_from" type="String" />
<argument index="1" name="anim_to" type="String" />
<description>
Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes.
</description>
</method>
<method name="clear_caches">
<return type="void">
</return>
<return type="void" />
<description>
[AnimationPlayer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again.
</description>
</method>
<method name="clear_queue">
<return type="void">
</return>
<return type="void" />
<description>
Clears all queued, unplayed animations.
</description>
</method>
<method name="find_animation" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="animation" type="Animation">
</argument>
<return type="String" />
<argument index="0" name="animation" type="Animation" />
<description>
Returns the name of [code]animation[/code] or an empty string if not found.
</description>
</method>
<method name="get_animation" qualifiers="const">
<return type="Animation">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="Animation" />
<argument index="0" name="name" type="String" />
<description>
Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found.
</description>
</method>
<method name="get_animation_list" qualifiers="const">
<return type="PoolStringArray">
</return>
<return type="PoolStringArray" />
<description>
Returns the list of stored animation names.
</description>
</method>
<method name="get_blend_time" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="anim_from" type="String">
</argument>
<argument index="1" name="anim_to" type="String">
</argument>
<return type="float" />
<argument index="0" name="anim_from" type="String" />
<argument index="1" name="anim_to" type="String" />
<description>
Gets the blend time (in seconds) between two animations, referenced by their names.
</description>
</method>
<method name="get_playing_speed" qualifiers="const">
<return type="float">
</return>
<return type="float" />
<description>
Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.
</description>
</method>
<method name="get_queue">
<return type="PoolStringArray">
</return>
<return type="PoolStringArray" />
<description>
Returns a list of the animation names that are currently queued to play.
</description>
</method>
<method name="has_animation" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="bool" />
<argument index="0" name="name" type="String" />
<description>
Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code].
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if playing an animation.
</description>
</method>
<method name="play">
<return type="void">
</return>
<argument index="0" name="name" type="String" default="&quot;&quot;">
</argument>
<argument index="1" name="custom_blend" type="float" default="-1">
</argument>
<argument index="2" name="custom_speed" type="float" default="1.0">
</argument>
<argument index="3" name="from_end" type="bool" default="false">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" default="&quot;&quot;" />
<argument index="1" name="custom_blend" type="float" default="-1" />
<argument index="2" name="custom_speed" type="float" default="1.0" />
<argument index="3" name="from_end" type="bool" default="false" />
<description>
Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).
The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing.
@@ -152,76 +122,57 @@
</description>
</method>
<method name="play_backwards">
<return type="void">
</return>
<argument index="0" name="name" type="String" default="&quot;&quot;">
</argument>
<argument index="1" name="custom_blend" type="float" default="-1">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" default="&quot;&quot;" />
<argument index="1" name="custom_blend" type="float" default="-1" />
<description>
Plays the animation with key [code]name[/code] in reverse.
This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information.
</description>
</method>
<method name="queue">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Queues an animation for playback once the current one is done.
[b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow.
</description>
</method>
<method name="remove_animation">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Removes the animation with key [code]name[/code].
</description>
</method>
<method name="rename_animation">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="newname" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="newname" type="String" />
<description>
Renames an existing animation with key [code]name[/code] to [code]newname[/code].
</description>
</method>
<method name="seek">
<return type="void">
</return>
<argument index="0" name="seconds" type="float">
</argument>
<argument index="1" name="update" type="bool" default="false">
</argument>
<return type="void" />
<argument index="0" name="seconds" type="float" />
<argument index="1" name="update" type="bool" default="false" />
<description>
Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped.
</description>
</method>
<method name="set_blend_time">
<return type="void">
</return>
<argument index="0" name="anim_from" type="String">
</argument>
<argument index="1" name="anim_to" type="String">
</argument>
<argument index="2" name="sec" type="float">
</argument>
<return type="void" />
<argument index="0" name="anim_from" type="String" />
<argument index="1" name="anim_to" type="String" />
<argument index="2" name="sec" type="float" />
<description>
Specifies a blend time (in seconds) between two animations, referenced by their names.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<argument index="0" name="reset" type="bool" default="true">
</argument>
<return type="void" />
<argument index="0" name="reset" type="bool" default="true" />
<description>
Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation.
@@ -266,24 +217,20 @@
</members>
<signals>
<signal name="animation_changed">
<argument index="0" name="old_name" type="String">
</argument>
<argument index="1" name="new_name" type="String">
</argument>
<argument index="0" name="old_name" type="String" />
<argument index="1" name="new_name" type="String" />
<description>
If the currently being played animation changes, this signal will notify of such change.
</description>
</signal>
<signal name="animation_finished">
<argument index="0" name="anim_name" type="String">
</argument>
<argument index="0" name="anim_name" type="String" />
<description>
Notifies when an animation finished playing.
</description>
</signal>
<signal name="animation_started">
<argument index="0" name="anim_name" type="String">
</argument>
<argument index="0" name="anim_name" type="String" />
<description>
Notifies when an animation starts playing.
</description>

View File

@@ -7,33 +7,27 @@
Note: When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/3.3/tutorials/animation/animation_tree.html</link>
<link title="Using AnimationTree">https://docs.godotengine.org/en/3.3/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="advance">
<return type="void">
</return>
<argument index="0" name="delta" type="float">
</argument>
<return type="void" />
<argument index="0" name="delta" type="float" />
<description>
Manually advance the animations by the specified time (in seconds).
</description>
</method>
<method name="get_root_motion_transform" qualifiers="const">
<return type="Transform">
</return>
<return type="Transform" />
<description>
Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation.
Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation. See also [member root_motion_track] and [RootMotionView].
</description>
</method>
<method name="rename_parameter">
<return type="void">
</return>
<argument index="0" name="old_name" type="String">
</argument>
<argument index="1" name="new_name" type="String">
</argument>
<return type="void" />
<argument index="0" name="old_name" type="String" />
<argument index="1" name="new_name" type="String" />
<description>
</description>
</method>
@@ -50,7 +44,7 @@
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place.
If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView].
</member>
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
The root animation node of this [AnimationTree]. See [AnimationNode].

View File

@@ -13,116 +13,86 @@
</tutorials>
<methods>
<method name="add_node">
<return type="void">
</return>
<argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType">
</argument>
<argument index="1" name="id" type="String">
</argument>
<return type="void" />
<argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType" />
<argument index="1" name="id" type="String" />
<description>
Adds a [code]type[/code] node to the graph with name [code]id[/code].
</description>
</method>
<method name="advance">
<return type="void">
</return>
<argument index="0" name="delta" type="float">
</argument>
<return type="void" />
<argument index="0" name="delta" type="float" />
<description>
Shifts position in the animation timeline. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
</description>
</method>
<method name="animation_node_get_animation" qualifiers="const">
<return type="Animation">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="Animation" />
<argument index="0" name="id" type="String" />
<description>
Returns the [AnimationPlayer]'s [Animation] bound to the [AnimationTreePlayer]'s animation node with name [code]id[/code].
</description>
</method>
<method name="animation_node_get_master_animation" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="String" />
<argument index="0" name="id" type="String" />
<description>
Returns the name of the [member master_player]'s [Animation] bound to this animation node.
</description>
</method>
<method name="animation_node_get_position" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the absolute playback timestamp of the animation node with name [code]id[/code].
</description>
</method>
<method name="animation_node_set_animation">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="animation" type="Animation">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="animation" type="Animation" />
<description>
Binds a new [Animation] from the [member master_player] to the [AnimationTreePlayer]'s animation node with name [code]id[/code].
</description>
</method>
<method name="animation_node_set_filter_path">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="path" type="NodePath">
</argument>
<argument index="2" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="path" type="NodePath" />
<argument index="2" name="enable" type="bool" />
<description>
If [code]enable[/code] is [code]true[/code], the animation node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
</description>
</method>
<method name="animation_node_set_master_animation">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="source" type="String">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="source" type="String" />
<description>
Binds the [Animation] named [code]source[/code] from [member master_player] to the animation node [code]id[/code]. Recalculates caches.
</description>
</method>
<method name="are_nodes_connected" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="dst_id" type="String">
</argument>
<argument index="2" name="dst_input_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="id" type="String" />
<argument index="1" name="dst_id" type="String" />
<argument index="2" name="dst_input_idx" type="int" />
<description>
Returns whether node [code]id[/code] and [code]dst_id[/code] are connected at the specified slot.
</description>
</method>
<method name="blend2_node_get_amount" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the blend amount of a Blend2 node given its name.
</description>
</method>
<method name="blend2_node_set_amount">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="blend" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="blend" type="float" />
<description>
Sets the blend amount of a Blend2 node given its name and value.
A Blend2 node blends two animations (A and B) with the amount between 0 and 1.
@@ -130,34 +100,25 @@
</description>
</method>
<method name="blend2_node_set_filter_path">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="path" type="NodePath">
</argument>
<argument index="2" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="path" type="NodePath" />
<argument index="2" name="enable" type="bool" />
<description>
If [code]enable[/code] is [code]true[/code], the Blend2 node with name [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
</description>
</method>
<method name="blend3_node_get_amount" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the blend amount of a Blend3 node given its name.
</description>
</method>
<method name="blend3_node_set_amount">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="blend" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="blend" type="float" />
<description>
Sets the blend amount of a Blend3 node given its name and value.
A Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1.
@@ -165,21 +126,16 @@
</description>
</method>
<method name="blend4_node_get_amount" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="Vector2" />
<argument index="0" name="id" type="String" />
<description>
Returns the blend amount of a Blend4 node given its name.
</description>
</method>
<method name="blend4_node_set_amount">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="blend" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="blend" type="Vector2" />
<description>
Sets the blend amount of a Blend4 node given its name and value.
A Blend4 Node blends two pairs of animations.
@@ -187,305 +143,231 @@
</description>
</method>
<method name="connect_nodes">
<return type="int" enum="Error">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="dst_id" type="String">
</argument>
<argument index="2" name="dst_input_idx" type="int">
</argument>
<return type="int" enum="Error" />
<argument index="0" name="id" type="String" />
<argument index="1" name="dst_id" type="String" />
<argument index="2" name="dst_input_idx" type="int" />
<description>
Connects node [code]id[/code] to [code]dst_id[/code] at the specified input slot.
</description>
</method>
<method name="disconnect_nodes">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="dst_input_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="dst_input_idx" type="int" />
<description>
Disconnects nodes connected to [code]id[/code] at the specified input slot.
</description>
</method>
<method name="get_node_list">
<return type="PoolStringArray">
</return>
<return type="PoolStringArray" />
<description>
Returns a [PoolStringArray] containing the name of all nodes.
</description>
</method>
<method name="mix_node_get_amount" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the mix amount of a Mix node given its name.
</description>
</method>
<method name="mix_node_set_amount">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="ratio" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="ratio" type="float" />
<description>
Sets the mix amount of a Mix node given its name and value.
A Mix node adds input b to input a by the amount given by ratio.
</description>
</method>
<method name="node_exists" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="node" type="String">
</argument>
<return type="bool" />
<argument index="0" name="node" type="String" />
<description>
Check if a node exists (by name).
</description>
</method>
<method name="node_get_input_count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="int" />
<argument index="0" name="id" type="String" />
<description>
Returns the input count for a given node. Different types of nodes have different amount of inputs.
</description>
</method>
<method name="node_get_input_source" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="idx" type="int">
</argument>
<return type="String" />
<argument index="0" name="id" type="String" />
<argument index="1" name="idx" type="int" />
<description>
Returns the input source for a given node input.
</description>
</method>
<method name="node_get_position" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="Vector2" />
<argument index="0" name="id" type="String" />
<description>
Returns position of a node in the graph given its name.
</description>
</method>
<method name="node_get_type" qualifiers="const">
<return type="int" enum="AnimationTreePlayer.NodeType">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="int" enum="AnimationTreePlayer.NodeType" />
<argument index="0" name="id" type="String" />
<description>
Gets the node type, will return from [enum NodeType] enum.
</description>
</method>
<method name="node_rename">
<return type="int" enum="Error">
</return>
<argument index="0" name="node" type="String">
</argument>
<argument index="1" name="new_name" type="String">
</argument>
<return type="int" enum="Error" />
<argument index="0" name="node" type="String" />
<argument index="1" name="new_name" type="String" />
<description>
Renames a node in the graph.
</description>
</method>
<method name="node_set_position">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="screen_position" type="Vector2">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="screen_position" type="Vector2" />
<description>
Sets the position of a node in the graph given its name and position.
</description>
</method>
<method name="oneshot_node_get_autorestart_delay" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the autostart delay of a OneShot node given its name.
</description>
</method>
<method name="oneshot_node_get_autorestart_random_delay" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the autostart random delay of a OneShot node given its name.
</description>
</method>
<method name="oneshot_node_get_fadein_time" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the fade in time of a OneShot node given its name.
</description>
</method>
<method name="oneshot_node_get_fadeout_time" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the fade out time of a OneShot node given its name.
</description>
</method>
<method name="oneshot_node_has_autorestart" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="bool" />
<argument index="0" name="id" type="String" />
<description>
Returns whether a OneShot node will auto restart given its name.
</description>
</method>
<method name="oneshot_node_is_active" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="bool" />
<argument index="0" name="id" type="String" />
<description>
Returns whether a OneShot node is active given its name.
</description>
</method>
<method name="oneshot_node_set_autorestart">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="enable" type="bool" />
<description>
Sets the autorestart property of a OneShot node given its name and value.
</description>
</method>
<method name="oneshot_node_set_autorestart_delay">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="delay_sec" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="delay_sec" type="float" />
<description>
Sets the autorestart delay of a OneShot node given its name and value in seconds.
</description>
</method>
<method name="oneshot_node_set_autorestart_random_delay">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="rand_sec" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="rand_sec" type="float" />
<description>
Sets the autorestart random delay of a OneShot node given its name and value in seconds.
</description>
</method>
<method name="oneshot_node_set_fadein_time">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="time_sec" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="time_sec" type="float" />
<description>
Sets the fade in time of a OneShot node given its name and value in seconds.
</description>
</method>
<method name="oneshot_node_set_fadeout_time">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="time_sec" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="time_sec" type="float" />
<description>
Sets the fade out time of a OneShot node given its name and value in seconds.
</description>
</method>
<method name="oneshot_node_set_filter_path">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="path" type="NodePath">
</argument>
<argument index="2" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="path" type="NodePath" />
<argument index="2" name="enable" type="bool" />
<description>
If [code]enable[/code] is [code]true[/code], the OneShot node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
</description>
</method>
<method name="oneshot_node_start">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<description>
Starts a OneShot node given its name.
</description>
</method>
<method name="oneshot_node_stop">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<description>
Stops the OneShot node with name [code]id[/code].
</description>
</method>
<method name="recompute_caches">
<return type="void">
</return>
<return type="void" />
<description>
Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state.
</description>
</method>
<method name="remove_node">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<description>
Removes the animation node with name [code]id[/code].
</description>
</method>
<method name="reset">
<return type="void">
</return>
<return type="void" />
<description>
Resets this [AnimationTreePlayer].
</description>
</method>
<method name="timescale_node_get_scale" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the time scale value of the TimeScale node with name [code]id[/code].
</description>
</method>
<method name="timescale_node_set_scale">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="scale" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="scale" type="float" />
<description>
Sets the time scale of the TimeScale node with name [code]id[/code] to [code]scale[/code].
The TimeScale node is used to speed [Animation]s up if the scale is above 1 or slow them down if it is below 1.
@@ -493,108 +375,80 @@
</description>
</method>
<method name="timeseek_node_seek">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="seconds" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="seconds" type="float" />
<description>
Sets the time seek value of the TimeSeek node with name [code]id[/code] to [code]seconds[/code].
This functions as a seek in the [Animation] or the blend or mix of [Animation]s input in it.
</description>
</method>
<method name="transition_node_delete_input">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="input_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="input_idx" type="int" />
<description>
Deletes the input at [code]input_idx[/code] for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_get_current" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="int" />
<argument index="0" name="id" type="String" />
<description>
Returns the index of the currently evaluated input for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_get_input_count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="int" />
<argument index="0" name="id" type="String" />
<description>
Returns the number of inputs for the transition node with name [code]id[/code]. You can add inputs by right-clicking on the transition node.
</description>
</method>
<method name="transition_node_get_xfade_time" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="id" type="String">
</argument>
<return type="float" />
<argument index="0" name="id" type="String" />
<description>
Returns the cross fade time for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_has_input_auto_advance" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="input_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="id" type="String" />
<argument index="1" name="input_idx" type="int" />
<description>
Returns [code]true[/code] if the input at [code]input_idx[/code] on the transition node with name [code]id[/code] is set to automatically advance to the next input upon completion.
</description>
</method>
<method name="transition_node_set_current">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="input_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="input_idx" type="int" />
<description>
The transition node with name [code]id[/code] sets its current input at [code]input_idx[/code].
</description>
</method>
<method name="transition_node_set_input_auto_advance">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="input_idx" type="int">
</argument>
<argument index="2" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="input_idx" type="int" />
<argument index="2" name="enable" type="bool" />
<description>
The transition node with name [code]id[/code] advances to its next input automatically when the input at [code]input_idx[/code] completes.
</description>
</method>
<method name="transition_node_set_input_count">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="count" type="int">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="count" type="int" />
<description>
Resizes the number of inputs available for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_set_xfade_time">
<return type="void">
</return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="time_sec" type="float">
</argument>
<return type="void" />
<argument index="0" name="id" type="String" />
<argument index="1" name="time_sec" type="float" />
<description>
The transition node with name [code]id[/code] sets its cross fade time to [code]time_sec[/code].
</description>

View File

@@ -12,52 +12,42 @@
</tutorials>
<methods>
<method name="get_collision_layer_bit" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bit" type="int">
</argument>
<return type="bool" />
<argument index="0" name="bit" type="int" />
<description>
Returns an individual bit on the layer mask.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bit" type="int">
</argument>
<return type="bool" />
<argument index="0" name="bit" type="int" />
<description>
Returns an individual bit on the collision mask.
</description>
</method>
<method name="get_overlapping_areas" qualifiers="const">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns a list of intersecting [Area]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns a list of intersecting [PhysicsBody]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="overlaps_area" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="area" type="Node">
</argument>
<return type="bool" />
<argument index="0" name="area" type="Node" />
<description>
If [code]true[/code], the given area overlaps the Area.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
</description>
</method>
<method name="overlaps_body" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="body" type="Node">
</argument>
<return type="bool" />
<argument index="0" name="body" type="Node" />
<description>
If [code]true[/code], the given physics body overlaps the Area.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
@@ -65,23 +55,17 @@
</description>
</method>
<method name="set_collision_layer_bit">
<return type="void">
</return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
</argument>
<return type="void" />
<argument index="0" name="bit" type="int" />
<argument index="1" name="value" type="bool" />
<description>
Set/clear individual bits on the layer mask. This simplifies editing this [Area]'s layers.
</description>
</method>
<method name="set_collision_mask_bit">
<return type="void">
</return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
</argument>
<return type="void" />
<argument index="0" name="bit" type="int" />
<argument index="1" name="value" type="bool" />
<description>
Set/clear individual bits on the collision mask. This simplifies editing which [Area] layers this [Area] scans.
</description>
@@ -105,7 +89,7 @@
The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8">
The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
</member>
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
@@ -147,30 +131,24 @@
</members>
<signals>
<signal name="area_entered">
<argument index="0" name="area" type="Area">
</argument>
<argument index="0" name="area" type="Area" />
<description>
Emitted when another Area enters this Area. Requires [member monitoring] to be set to [code]true[/code].
[code]area[/code] the other Area.
</description>
</signal>
<signal name="area_exited">
<argument index="0" name="area" type="Area">
</argument>
<argument index="0" name="area" type="Area" />
<description>
Emitted when another Area exits this Area. Requires [member monitoring] to be set to [code]true[/code].
[code]area[/code] the other Area.
</description>
</signal>
<signal name="area_shape_entered">
<argument index="0" name="area_id" type="int">
</argument>
<argument index="1" name="area" type="Area">
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
<argument index="3" name="local_shape" type="int">
</argument>
<argument index="0" name="area_id" type="int" />
<argument index="1" name="area" type="Area" />
<argument index="2" name="area_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_id[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer].
@@ -180,14 +158,10 @@
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_id" type="int">
</argument>
<argument index="1" name="area" type="Area">
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
<argument index="3" name="local_shape" type="int">
</argument>
<argument index="0" name="area_id" type="int" />
<argument index="1" name="area" type="Area" />
<argument index="2" name="area_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_id[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer].
@@ -197,30 +171,24 @@
</description>
</signal>
<signal name="body_entered">
<argument index="0" name="body" type="Node">
</argument>
<argument index="0" name="body" type="Node" />
<description>
Emitted when a [PhysicsBody] or [GridMap] enters this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap].
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Node">
</argument>
<argument index="0" name="body" type="Node" />
<description>
Emitted when a [PhysicsBody] or [GridMap] exits this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap].
</description>
</signal>
<signal name="body_shape_entered">
<argument index="0" name="body_id" type="int">
</argument>
<argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
<argument index="3" name="local_shape" type="int">
</argument>
<argument index="0" name="body_id" type="int" />
<argument index="1" name="body" type="Node" />
<argument index="2" name="body_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
[code]body_id[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer].
@@ -230,14 +198,10 @@
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_id" type="int">
</argument>
<argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
<argument index="3" name="local_shape" type="int">
</argument>
<argument index="0" name="body_id" type="int" />
<argument index="1" name="body" type="Node" />
<argument index="2" name="body_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
[code]body_id[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer].

View File

@@ -14,76 +14,60 @@
</tutorials>
<methods>
<method name="get_collision_layer_bit" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bit" type="int">
</argument>
<return type="bool" />
<argument index="0" name="bit" type="int" />
<description>
Returns an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bit" type="int">
</argument>
<return type="bool" />
<argument index="0" name="bit" type="int" />
<description>
Returns an individual bit on the collision mask. Describes whether this area will collide with others on the given layer.
</description>
</method>
<method name="get_overlapping_areas" qualifiers="const">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns a list of intersecting [Area2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns a list of intersecting [PhysicsBody2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="overlaps_area" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="area" type="Node">
</argument>
<return type="bool" />
<argument index="0" name="area" type="Node" />
<description>
If [code]true[/code], the given area overlaps the Area2D.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
</description>
</method>
<method name="overlaps_body" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="body" type="Node">
</argument>
<return type="bool" />
<argument index="0" name="body" type="Node" />
<description>
If [code]true[/code], the given physics body overlaps the Area2D.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</method>
<method name="set_collision_layer_bit">
<return type="void">
</return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
</argument>
<return type="void" />
<argument index="0" name="bit" type="int" />
<argument index="1" name="value" type="bool" />
<description>
Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
</description>
</method>
<method name="set_collision_mask_bit">
<return type="void">
</return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
</argument>
<return type="void" />
<argument index="0" name="bit" type="int" />
<argument index="1" name="value" type="bool" />
<description>
Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
</description>
@@ -107,7 +91,7 @@
The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="98.0">
The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
</member>
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
@@ -137,30 +121,24 @@
</members>
<signals>
<signal name="area_entered">
<argument index="0" name="area" type="Area2D">
</argument>
<argument index="0" name="area" type="Area2D" />
<description>
Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code].
[code]area[/code] the other Area2D.
</description>
</signal>
<signal name="area_exited">
<argument index="0" name="area" type="Area2D">
</argument>
<argument index="0" name="area" type="Area2D" />
<description>
Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code].
[code]area[/code] the other Area2D.
</description>
</signal>
<signal name="area_shape_entered">
<argument index="0" name="area_id" type="int">
</argument>
<argument index="1" name="area" type="Area2D">
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
<argument index="3" name="local_shape" type="int">
</argument>
<argument index="0" name="area_id" type="int" />
<argument index="1" name="area" type="Area2D" />
<argument index="2" name="area_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [Physics2DServer].
@@ -170,14 +148,10 @@
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_id" type="int">
</argument>
<argument index="1" name="area" type="Area2D">
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
<argument index="3" name="local_shape" type="int">
</argument>
<argument index="0" name="area_id" type="int" />
<argument index="1" name="area" type="Area2D" />
<argument index="2" name="area_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [Physics2DServer].
@@ -187,30 +161,24 @@
</description>
</signal>
<signal name="body_entered">
<argument index="0" name="body" type="Node">
</argument>
<argument index="0" name="body" type="Node" />
<description>
Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Node">
</argument>
<argument index="0" name="body" type="Node" />
<description>
Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_shape_entered">
<argument index="0" name="body_id" type="int">
</argument>
<argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
<argument index="3" name="local_shape" type="int">
</argument>
<argument index="0" name="body_id" type="int" />
<argument index="1" name="body" type="Node" />
<argument index="2" name="body_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [Physics2DServer].
@@ -220,14 +188,10 @@
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_id" type="int">
</argument>
<argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
<argument index="3" name="local_shape" type="int">
</argument>
<argument index="0" name="body_id" type="int" />
<argument index="1" name="body" type="Node" />
<argument index="2" name="body_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [Physics2DServer].

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Array" version="3.3">
<brief_description>
Generic array datatype.
A generic array datatype.
</brief_description>
<description>
Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.).
A generic array that can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 is the second to last, etc.).
[b]Example:[/b]
[codeblock]
var array = ["One", 2, 3, "Four"]
@@ -21,85 +21,69 @@
print(array1 + array2) # ["One", 2, 3, "Four"]
[/codeblock]
[b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient.
[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array which can be modified independently of the original array, use [method duplicate].
[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate].
[b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
</description>
<tutorials>
</tutorials>
<methods>
<method name="Array">
<return type="Array">
</return>
<argument index="0" name="from" type="PoolColorArray">
</argument>
<return type="Array" />
<argument index="0" name="from" type="PoolColorArray" />
<description>
Constructs an array from a [PoolColorArray].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
<argument index="0" name="from" type="PoolVector3Array">
</argument>
<return type="Array" />
<argument index="0" name="from" type="PoolVector3Array" />
<description>
Constructs an array from a [PoolVector3Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
<argument index="0" name="from" type="PoolVector2Array">
</argument>
<return type="Array" />
<argument index="0" name="from" type="PoolVector2Array" />
<description>
Constructs an array from a [PoolVector2Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
<argument index="0" name="from" type="PoolStringArray">
</argument>
<return type="Array" />
<argument index="0" name="from" type="PoolStringArray" />
<description>
Constructs an array from a [PoolStringArray].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
<argument index="0" name="from" type="PoolRealArray">
</argument>
<return type="Array" />
<argument index="0" name="from" type="PoolRealArray" />
<description>
Constructs an array from a [PoolRealArray].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
<argument index="0" name="from" type="PoolIntArray">
</argument>
<return type="Array" />
<argument index="0" name="from" type="PoolIntArray" />
<description>
Constructs an array from a [PoolIntArray].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
<argument index="0" name="from" type="PoolByteArray">
</argument>
<return type="Array" />
<argument index="0" name="from" type="PoolByteArray" />
<description>
Constructs an array from a [PoolByteArray].
</description>
</method>
<method name="append">
<argument index="0" name="value" type="Variant">
</argument>
<argument index="0" name="value" type="Variant" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="Array">
</argument>
<argument index="0" name="array" type="Array" />
<description>
Appends another array at the end of this array.
[codeblock]
@@ -111,36 +95,27 @@
</description>
</method>
<method name="back">
<return type="Variant">
</return>
<return type="Variant" />
<description>
Returns the last element of the array. Prints an error and returns [code]null[/code] if the array is empty.
[b]Note:[/b] Calling this function is not the same as writing [code]array[-1][/code]. If the array is empty, accessing by index will pause project execution when running from the editor.
</description>
</method>
<method name="bsearch">
<return type="int">
</return>
<argument index="0" name="value" type="Variant">
</argument>
<argument index="1" name="before" type="bool" default="true">
</argument>
<return type="int" />
<argument index="0" name="value" type="Variant" />
<argument index="1" name="before" type="bool" default="true" />
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
<method name="bsearch_custom">
<return type="int">
</return>
<argument index="0" name="value" type="Variant">
</argument>
<argument index="1" name="obj" type="Object">
</argument>
<argument index="2" name="func" type="String">
</argument>
<argument index="3" name="before" type="bool" default="true">
</argument>
<return type="int" />
<argument index="0" name="value" type="Variant" />
<argument index="1" name="obj" type="Object" />
<argument index="2" name="func" type="String" />
<argument index="3" name="before" type="bool" default="true" />
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method declared in the [code]obj[/code]. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
[codeblock]
@@ -174,34 +149,28 @@
</description>
</method>
<method name="count">
<return type="int">
</return>
<argument index="0" name="value" type="Variant">
</argument>
<return type="int" />
<argument index="0" name="value" type="Variant" />
<description>
Returns the number of times an element is in the array.
</description>
</method>
<method name="duplicate">
<return type="Array">
</return>
<argument index="0" name="deep" type="bool" default="false">
</argument>
<return type="Array" />
<argument index="0" name="deep" type="bool" default="false" />
<description>
Returns a copy of the array.
If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns [code]true[/code] if the array is empty.
</description>
</method>
<method name="erase">
<argument index="0" name="value" type="Variant">
</argument>
<argument index="0" name="value" type="Variant" />
<description>
Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
@@ -209,38 +178,30 @@
</description>
</method>
<method name="find">
<return type="int">
</return>
<argument index="0" name="what" type="Variant">
</argument>
<argument index="1" name="from" type="int" default="0">
</argument>
<return type="int" />
<argument index="0" name="what" type="Variant" />
<argument index="1" name="from" type="int" default="0" />
<description>
Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="find_last">
<return type="int">
</return>
<argument index="0" name="value" type="Variant">
</argument>
<return type="int" />
<argument index="0" name="value" type="Variant" />
<description>
Searches the array in reverse order for a value and returns its index or [code]-1[/code] if not found.
</description>
</method>
<method name="front">
<return type="Variant">
</return>
<return type="Variant" />
<description>
Returns the first element of the array. Prints an error and returns [code]null[/code] if the array is empty.
[b]Note:[/b] Calling this function is not the same as writing [code]array[0][/code]. If the array is empty, accessing by index will pause project execution when running from the editor.
</description>
</method>
<method name="has">
<return type="bool">
</return>
<argument index="0" name="value" type="Variant">
</argument>
<return type="bool" />
<argument index="0" name="value" type="Variant" />
<description>
Returns [code]true[/code] if the array contains the given value.
[codeblock]
@@ -258,18 +219,15 @@
</description>
</method>
<method name="hash">
<return type="int">
</return>
<return type="int" />
<description>
Returns a hashed integer value representing the array and its contents.
[b]Note:[/b] Arrays with equal contents can still produce different hashes. Only the exact same arrays will produce the same hashed integer value.
</description>
</method>
<method name="insert">
<argument index="0" name="position" type="int">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
<argument index="0" name="position" type="int" />
<argument index="1" name="value" type="Variant" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]).
[b]Note:[/b] This method acts in-place and doesn't return a value.
@@ -282,52 +240,45 @@
</description>
</method>
<method name="max">
<return type="Variant">
</return>
<return type="Variant" />
<description>
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<method name="min">
<return type="Variant">
</return>
<return type="Variant" />
<description>
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<method name="pop_back">
<return type="Variant">
</return>
<return type="Variant" />
<description>
Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front].
</description>
</method>
<method name="pop_front">
<return type="Variant">
</return>
<return type="Variant" />
<description>
Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back].
[b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be.
</description>
</method>
<method name="push_back">
<argument index="0" name="value" type="Variant">
</argument>
<argument index="0" name="value" type="Variant" />
<description>
Appends an element at the end of the array. See also [method push_front].
</description>
</method>
<method name="push_front">
<argument index="0" name="value" type="Variant">
</argument>
<argument index="0" name="value" type="Variant" />
<description>
Adds an element at the beginning of the array. See also [method push_back].
[b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be.
</description>
</method>
<method name="remove">
<argument index="0" name="position" type="int">
</argument>
<argument index="0" name="position" type="int" />
<description>
Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
@@ -335,19 +286,15 @@
</description>
</method>
<method name="resize">
<argument index="0" name="size" type="int">
</argument>
<argument index="0" name="size" type="int" />
<description>
Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code].
</description>
</method>
<method name="rfind">
<return type="int">
</return>
<argument index="0" name="what" type="Variant">
</argument>
<argument index="1" name="from" type="int" default="-1">
</argument>
<return type="int" />
<argument index="0" name="what" type="Variant" />
<argument index="1" name="from" type="int" default="-1" />
<description>
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
</description>
@@ -358,23 +305,17 @@
</description>
</method>
<method name="size">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of elements in the array.
</description>
</method>
<method name="slice">
<return type="Array">
</return>
<argument index="0" name="begin" type="int">
</argument>
<argument index="1" name="end" type="int">
</argument>
<argument index="2" name="step" type="int" default="1">
</argument>
<argument index="3" name="deep" type="bool" default="false">
</argument>
<return type="Array" />
<argument index="0" name="begin" type="int" />
<argument index="1" name="end" type="int" />
<argument index="2" name="step" type="int" default="1" />
<argument index="3" name="deep" type="bool" default="false" />
<description>
Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
</description>
@@ -391,12 +332,11 @@
</description>
</method>
<method name="sort_custom">
<argument index="0" name="obj" type="Object">
</argument>
<argument index="1" name="func" type="String">
</argument>
<argument index="0" name="obj" type="Object" />
<argument index="1" name="func" type="String" />
<description>
Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array.
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblock]
class MyCustomSorter:

View File

@@ -30,156 +30,119 @@
</tutorials>
<methods>
<method name="add_blend_shape">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added.
</description>
</method>
<method name="add_surface_from_arrays">
<return type="void">
</return>
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
</argument>
<argument index="1" name="arrays" type="Array">
</argument>
<argument index="2" name="blend_shapes" type="Array" default="[ ]">
</argument>
<argument index="3" name="compress_flags" type="int" default="97280">
</argument>
<return type="void" />
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<argument index="1" name="arrays" type="Array" />
<argument index="2" name="blend_shapes" type="Array" default="[ ]" />
<argument index="3" name="compress_flags" type="int" default="97280" />
<description>
Creates a new surface.
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used.
Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
</description>
</method>
<method name="clear_blend_shapes">
<return type="void">
</return>
<return type="void" />
<description>
Removes all blend shapes from this [ArrayMesh].
</description>
</method>
<method name="get_blend_shape_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of blend shapes that the [ArrayMesh] holds.
</description>
</method>
<method name="get_blend_shape_name" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="index" type="int">
</argument>
<return type="String" />
<argument index="0" name="index" type="int" />
<description>
Returns the name of the blend shape at this index.
</description>
</method>
<method name="lightmap_unwrap">
<return type="int" enum="Error">
</return>
<argument index="0" name="transform" type="Transform">
</argument>
<argument index="1" name="texel_size" type="float">
</argument>
<return type="int" enum="Error" />
<argument index="0" name="transform" type="Transform" />
<argument index="1" name="texel_size" type="float" />
<description>
Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping.
</description>
</method>
<method name="regen_normalmaps">
<return type="void">
</return>
<return type="void" />
<description>
Will regenerate normal maps for the [ArrayMesh].
</description>
</method>
<method name="surface_find_by_name" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="int" />
<argument index="0" name="name" type="String" />
<description>
Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned.
</description>
</method>
<method name="surface_get_array_index_len" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<return type="int" />
<argument index="0" name="surf_idx" type="int" />
<description>
Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_array_len" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<return type="int" />
<argument index="0" name="surf_idx" type="int" />
<description>
Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_format" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<return type="int" />
<argument index="0" name="surf_idx" type="int" />
<description>
Returns the format mask of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_name" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<return type="String" />
<argument index="0" name="surf_idx" type="int" />
<description>
Gets the name assigned to this surface.
</description>
</method>
<method name="surface_get_primitive_type" qualifiers="const">
<return type="int" enum="Mesh.PrimitiveType">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<return type="int" enum="Mesh.PrimitiveType" />
<argument index="0" name="surf_idx" type="int" />
<description>
Returns the primitive type of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_remove">
<return type="void">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="surf_idx" type="int" />
<description>
Removes a surface at position [code]surf_idx[/code], shifting greater surfaces one [code]surf_idx[/code] slot down.
</description>
</method>
<method name="surface_set_name">
<return type="void">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<argument index="1" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="surf_idx" type="int" />
<argument index="1" name="name" type="String" />
<description>
Sets a name for a given surface.
</description>
</method>
<method name="surface_update_region">
<return type="void">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<argument index="1" name="offset" type="int">
</argument>
<argument index="2" name="data" type="PoolByteArray">
</argument>
<return type="void" />
<argument index="0" name="surf_idx" type="int" />
<argument index="1" name="offset" type="int" />
<argument index="2" name="data" type="PoolByteArray" />
<description>
Updates a specified region of mesh arrays on the GPU.
[b]Warning:[/b] Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments.

View File

@@ -11,55 +11,46 @@
</tutorials>
<methods>
<method name="can_get_buffer" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="frames" type="int">
</argument>
<return type="bool" />
<argument index="0" name="frames" type="int" />
<description>
Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer.
</description>
</method>
<method name="clear_buffer">
<return type="void">
</return>
<return type="void" />
<description>
Clears the internal ring buffer.
</description>
</method>
<method name="get_buffer">
<return type="PoolVector2Array">
</return>
<argument index="0" name="frames" type="int">
</argument>
<return type="PoolVector2Array" />
<argument index="0" name="frames" type="int" />
<description>
Gets the next [code]frames[/code] audio samples from the internal ring buffer.
Returns a [PoolVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PoolVector2Array] if insufficient data was available.
</description>
</method>
<method name="get_buffer_length_frames" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the total size of the internal ring buffer in frames.
</description>
</method>
<method name="get_discarded_frames" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of audio frames discarded from the audio bus due to full buffer.
</description>
</method>
<method name="get_frames_available" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of frames available to read using [method get_buffer].
</description>
</method>
<method name="get_pushed_frames" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of audio frames inserted from the audio bus.
</description>

View File

@@ -10,110 +10,80 @@
</tutorials>
<methods>
<method name="get_voice_cutoff_hz" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_delay_ms" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_depth_ms" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_level_db" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_pan" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_rate_hz" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="set_voice_cutoff_hz">
<return type="void">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="cutoff_hz" type="float">
</argument>
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="cutoff_hz" type="float" />
<description>
</description>
</method>
<method name="set_voice_delay_ms">
<return type="void">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="delay_ms" type="float">
</argument>
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="delay_ms" type="float" />
<description>
</description>
</method>
<method name="set_voice_depth_ms">
<return type="void">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="depth_ms" type="float">
</argument>
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="depth_ms" type="float" />
<description>
</description>
</method>
<method name="set_voice_level_db">
<return type="void">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="level_db" type="float">
</argument>
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="level_db" type="float" />
<description>
</description>
</method>
<method name="set_voice_pan">
<return type="void">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="pan" type="float">
</argument>
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="pan" type="float" />
<description>
</description>
</method>
<method name="set_voice_rate_hz">
<return type="void">
</return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="rate_hz" type="float">
</argument>
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="rate_hz" type="float" />
<description>
</description>
</method>

View File

@@ -11,28 +11,22 @@
</tutorials>
<methods>
<method name="get_band_count" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
Returns the number of bands of the equalizer.
</description>
</method>
<method name="get_band_gain_db" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="band_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="band_idx" type="int" />
<description>
Returns the band's gain at the specified index, in dB.
</description>
</method>
<method name="set_band_gain_db">
<return type="void">
</return>
<argument index="0" name="band_idx" type="int">
</argument>
<argument index="1" name="volume_db" type="float">
</argument>
<return type="void" />
<argument index="0" name="band_idx" type="int" />
<argument index="1" name="volume_db" type="float" />
<description>
Sets band's gain at the specified index, in dB.
</description>

View File

@@ -12,24 +12,20 @@
</tutorials>
<methods>
<method name="get_recording" qualifiers="const">
<return type="AudioStreamSample">
</return>
<return type="AudioStreamSample" />
<description>
Returns the recorded sample.
</description>
</method>
<method name="is_recording_active" qualifiers="const">
<return type="bool">
</return>
<return type="bool" />
<description>
Returns whether the recording is active or not.
</description>
</method>
<method name="set_recording_active">
<return type="void">
</return>
<argument index="0" name="record" type="bool">
</argument>
<return type="void" />
<argument index="0" name="record" type="bool" />
<description>
If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
</description>

View File

@@ -8,14 +8,10 @@
</tutorials>
<methods>
<method name="get_magnitude_for_frequency_range" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="from_hz" type="float">
</argument>
<argument index="1" name="to_hz" type="float">
</argument>
<argument index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1">
</argument>
<return type="Vector2" />
<argument index="0" name="from_hz" type="float" />
<argument index="1" name="to_hz" type="float" />
<argument index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1" />
<description>
</description>
</method>

View File

@@ -14,380 +14,291 @@
</tutorials>
<methods>
<method name="add_bus">
<return type="void">
</return>
<argument index="0" name="at_position" type="int" default="-1">
</argument>
<return type="void" />
<argument index="0" name="at_position" type="int" default="-1" />
<description>
Adds a bus at [code]at_position[/code].
</description>
</method>
<method name="add_bus_effect">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect" type="AudioEffect">
</argument>
<argument index="2" name="at_position" type="int" default="-1">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect" type="AudioEffect" />
<argument index="2" name="at_position" type="int" default="-1" />
<description>
Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code].
</description>
</method>
<method name="capture_get_device">
<return type="String">
</return>
<return type="String" />
<description>
Name of the current device for audio input (see [method capture_get_device_list]).
</description>
</method>
<method name="capture_get_device_list">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns the names of all audio input devices detected on the system.
</description>
</method>
<method name="capture_set_device">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Sets which audio input device is used for audio capture.
</description>
</method>
<method name="generate_bus_layout" qualifiers="const">
<return type="AudioBusLayout">
</return>
<return type="AudioBusLayout" />
<description>
Generates an [AudioBusLayout] using the available buses and effects.
</description>
</method>
<method name="get_bus_channels" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<return type="int" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the amount of channels of the bus at index [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect">
<return type="AudioEffect">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<return type="AudioEffect" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<description>
Returns the [AudioEffect] at position [code]effect_idx[/code] in bus [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect_count">
<return type="int">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<return type="int" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the number of effects on the bus at [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect_instance">
<return type="AudioEffectInstance">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<argument index="2" name="channel" type="int" default="0">
</argument>
<return type="AudioEffectInstance" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<argument index="2" name="channel" type="int" default="0" />
<description>
Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel).
</description>
</method>
<method name="get_bus_index" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="bus_name" type="String">
</argument>
<return type="int" />
<argument index="0" name="bus_name" type="String" />
<description>
Returns the index of the bus with the name [code]bus_name[/code].
</description>
</method>
<method name="get_bus_name" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<return type="String" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the name of the bus with the index [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_peak_volume_left_db" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="channel" type="int">
</argument>
<return type="float" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="channel" type="int" />
<description>
Returns the peak volume of the left speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
</description>
</method>
<method name="get_bus_peak_volume_right_db" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="channel" type="int">
</argument>
<return type="float" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="channel" type="int" />
<description>
Returns the peak volume of the right speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
</description>
</method>
<method name="get_bus_send" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<return type="String" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the name of the bus that the bus at index [code]bus_idx[/code] sends to.
</description>
</method>
<method name="get_bus_volume_db" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<return type="float" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the volume of the bus at index [code]bus_idx[/code] in dB.
</description>
</method>
<method name="get_device_list">
<return type="Array">
</return>
<return type="Array" />
<description>
Returns the names of all audio devices detected on the system.
</description>
</method>
<method name="get_mix_rate" qualifiers="const">
<return type="float">
</return>
<return type="float" />
<description>
Returns the sample rate at the output of the [AudioServer].
</description>
</method>
<method name="get_output_latency" qualifiers="const">
<return type="float">
</return>
<return type="float" />
<description>
Returns the audio driver's output latency.
</description>
</method>
<method name="get_speaker_mode" qualifiers="const">
<return type="int" enum="AudioServer.SpeakerMode">
</return>
<return type="int" enum="AudioServer.SpeakerMode" />
<description>
Returns the speaker configuration.
</description>
</method>
<method name="get_time_since_last_mix" qualifiers="const">
<return type="float">
</return>
<return type="float" />
<description>
Returns the relative time since the last mix occurred.
</description>
</method>
<method name="get_time_to_next_mix" qualifiers="const">
<return type="float">
</return>
<return type="float" />
<description>
Returns the relative time until the next mix occurs.
</description>
</method>
<method name="is_bus_bypassing_effects" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="bus_idx" type="int" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
</description>
</method>
<method name="is_bus_effect_enabled" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<description>
If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
</description>
</method>
<method name="is_bus_mute" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="bus_idx" type="int" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
</description>
</method>
<method name="is_bus_solo" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<return type="bool" />
<argument index="0" name="bus_idx" type="int" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
</description>
</method>
<method name="lock">
<return type="void">
</return>
<return type="void" />
<description>
Locks the audio driver's main loop.
[b]Note:[/b] Remember to unlock it afterwards.
</description>
</method>
<method name="move_bus">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="to_index" type="int">
</argument>
<return type="void" />
<argument index="0" name="index" type="int" />
<argument index="1" name="to_index" type="int" />
<description>
Moves the bus from index [code]index[/code] to index [code]to_index[/code].
</description>
</method>
<method name="remove_bus">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
Removes the bus at index [code]index[/code].
</description>
</method>
<method name="remove_bus_effect">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<description>
Removes the effect at index [code]effect_idx[/code] from the bus at index [code]bus_idx[/code].
</description>
</method>
<method name="set_bus_bypass_effects">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
</description>
</method>
<method name="set_bus_effect_enabled">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<argument index="2" name="enabled" type="bool">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<argument index="2" name="enabled" type="bool" />
<description>
If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
</description>
</method>
<method name="set_bus_layout">
<return type="void">
</return>
<argument index="0" name="bus_layout" type="AudioBusLayout">
</argument>
<return type="void" />
<argument index="0" name="bus_layout" type="AudioBusLayout" />
<description>
Overwrites the currently used [AudioBusLayout].
</description>
</method>
<method name="set_bus_mute">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
</description>
</method>
<method name="set_bus_name">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="name" type="String">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="name" type="String" />
<description>
Sets the name of the bus at index [code]bus_idx[/code] to [code]name[/code].
</description>
</method>
<method name="set_bus_send">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="send" type="String">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="send" type="String" />
<description>
Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code].
</description>
</method>
<method name="set_bus_solo">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
</description>
</method>
<method name="set_bus_volume_db">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="volume_db" type="float">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="volume_db" type="float" />
<description>
Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code].
</description>
</method>
<method name="swap_bus_effects">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<argument index="2" name="by_effect_idx" type="int">
</argument>
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<argument index="2" name="by_effect_idx" type="int" />
<description>
Swaps the position of two effects in bus [code]bus_idx[/code].
</description>
</method>
<method name="unlock">
<return type="void">
</return>
<return type="void" />
<description>
Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)
</description>

View File

@@ -14,8 +14,7 @@
</tutorials>
<methods>
<method name="get_length" qualifiers="const">
<return type="float">
</return>
<return type="float" />
<description>
Returns the length of the audio stream in seconds.
</description>

View File

@@ -9,44 +9,35 @@
</tutorials>
<methods>
<method name="can_push_buffer" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="amount" type="int">
</argument>
<return type="bool" />
<argument index="0" name="amount" type="int" />
<description>
</description>
</method>
<method name="clear_buffer">
<return type="void">
</return>
<return type="void" />
<description>
</description>
</method>
<method name="get_frames_available" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
</description>
</method>
<method name="get_skips" qualifiers="const">
<return type="int">
</return>
<return type="int" />
<description>
</description>
</method>
<method name="push_buffer">
<return type="bool">
</return>
<argument index="0" name="frames" type="PoolVector2Array">
</argument>
<return type="bool" />
<argument index="0" name="frames" type="PoolVector2Array" />
<description>
</description>
</method>
<method name="push_frame">
<return type="bool">
</return>
<argument index="0" name="frame" type="Vector2">
</argument>
<return type="bool" />
<argument index="0" name="frame" type="Vector2" />
<description>
</description>
</method>

View File

@@ -5,6 +5,7 @@
</brief_description>
<description>
Plays an audio stream non-positionally.
To play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer].
</description>
<tutorials>
<link title="Audio streams">https://docs.godotengine.org/en/3.3/tutorials/audio/audio_streams.html</link>
@@ -16,40 +17,33 @@
</tutorials>
<methods>
<method name="get_playback_position">
<return type="float">
</return>
<return type="float" />
<description>
Returns the position in the [AudioStream] in seconds.
</description>
</method>
<method name="get_stream_playback">
<return type="AudioStreamPlayback">
</return>
<return type="AudioStreamPlayback" />
<description>
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer].
</description>
</method>
<method name="play">
<return type="void">
</return>
<argument index="0" name="from_position" type="float" default="0.0">
</argument>
<return type="void" />
<argument index="0" name="from_position" type="float" default="0.0" />
<description>
Plays the audio from the given [code]from_position[/code], in seconds.
</description>
</method>
<method name="seek">
<return type="void">
</return>
<argument index="0" name="to_position" type="float">
</argument>
<return type="void" />
<argument index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<return type="void" />
<description>
Stops the audio.
</description>

View File

@@ -1,50 +1,45 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer2D" inherits="Node2D" version="3.3">
<brief_description>
Plays audio in 2D.
Plays positional sound in 2D space.
</brief_description>
<description>
Plays audio that dampens with distance from screen center.
See also [AudioStreamPlayer] to play a sound non-positionally.
[b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
<link>https://docs.godotengine.org/en/3.3/tutorials/audio/audio_streams.html</link>
</tutorials>
<methods>
<method name="get_playback_position">
<return type="float">
</return>
<return type="float" />
<description>
Returns the position in the [AudioStream].
</description>
</method>
<method name="get_stream_playback">
<return type="AudioStreamPlayback">
</return>
<return type="AudioStreamPlayback" />
<description>
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D].
</description>
</method>
<method name="play">
<return type="void">
</return>
<argument index="0" name="from_position" type="float" default="0.0">
</argument>
<return type="void" />
<argument index="0" name="from_position" type="float" default="0.0" />
<description>
Plays the audio from the given position [code]from_position[/code], in seconds.
</description>
</method>
<method name="seek">
<return type="void">
</return>
<argument index="0" name="to_position" type="float">
</argument>
<return type="void" />
<argument index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<return type="void" />
<description>
Stops the audio.
</description>

View File

@@ -1,51 +1,46 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer3D" inherits="Spatial" version="3.3">
<brief_description>
Plays 3D sound in 3D space.
Plays positional sound in 3D space.
</brief_description>
<description>
Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code].
By default, audio is heard from the camera position. This can be changed by adding a [Listener] node to the scene and enabling it by calling [method Listener.make_current] on it.
See also [AudioStreamPlayer] to play a sound non-positionally.
[b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
<link>https://docs.godotengine.org/en/3.3/tutorials/audio/audio_streams.html</link>
</tutorials>
<methods>
<method name="get_playback_position">
<return type="float">
</return>
<return type="float" />
<description>
Returns the position in the [AudioStream].
</description>
</method>
<method name="get_stream_playback">
<return type="AudioStreamPlayback">
</return>
<return type="AudioStreamPlayback" />
<description>
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D].
</description>
</method>
<method name="play">
<return type="void">
</return>
<argument index="0" name="from_position" type="float" default="0.0">
</argument>
<return type="void" />
<argument index="0" name="from_position" type="float" default="0.0" />
<description>
Plays the audio from the given position [code]from_position[/code], in seconds.
</description>
</method>
<method name="seek">
<return type="void">
</return>
<argument index="0" name="to_position" type="float">
</argument>
<return type="void" />
<argument index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<return type="void" />
<description>
Stops the audio.
</description>

View File

@@ -11,10 +11,8 @@
</tutorials>
<methods>
<method name="save_to_wav">
<return type="int" enum="Error">
</return>
<argument index="0" name="path" type="String">
</argument>
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
[b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.

View File

@@ -11,12 +11,9 @@
</tutorials>
<methods>
<method name="bake">
<return type="int" enum="BakedLightmap.BakeError">
</return>
<argument index="0" name="from_node" type="Node" default="null">
</argument>
<argument index="1" name="data_save_path" type="String" default="&quot;&quot;">
</argument>
<return type="int" enum="BakedLightmap.BakeError" />
<argument index="0" name="from_node" type="Node" default="null" />
<argument index="1" name="data_save_path" type="String" default="&quot;&quot;" />
<description>
Bakes the lightmap, scanning from the given [code]from_node[/code] root and saves the resulting [BakedLightmapData] in [code]data_save_path[/code]. If no save path is provided it will try to match the path from the current [member light_data].
</description>

Some files were not shown because too many files have changed in this diff Show More