Compare commits

...

650 Commits
master ... 3.1

Author SHA1 Message Date
Rémi Verschelde 22eeafc735
mbedtls: Backport "Fix x86_64 assembly for bignum multiplication"
Backports PR https://github.com/ARMmbed/mbedtls/pull/4948 to fix a regression
with our macOS builds using Clang 12.

Fixes #53297.

(cherry picked from commit 4cf3056ca6)
2021-10-25 10:54:09 +02:00
Rémi Verschelde f73113fae8
mbedtls: Update to upstream version 2.16.11
(cherry picked from commit cd7b25588b)
2021-10-25 10:52:20 +02:00
Fabio Alessandrelli 1b7ada718c
Bump mbedtls to version 2.16.10.
(cherry picked from commit 18bc1f2a8f)
2021-10-25 10:51:05 +02:00
Rémi Verschelde 95cdcc40ca
mbedtls: Update to upstream version 2.16.9
(cherry picked from commit 2872006039)
2021-10-25 10:48:37 +02:00
Fabio Alessandrelli 0c612bc0c6
Update mbedTLS to version 2.16.8 (+ patch).
(cherry picked from commit a905764e3d)
2021-10-25 10:48:22 +02:00
Fabio Alessandrelli 47be89199f
Update to mbedtls 2.16.7
(cherry picked from commit 8ddf9fe4b0)
2021-10-25 10:48:03 +02:00
Rémi Verschelde 47cdad91a2
mbedtls: Update to upstream version 2.16.6
Fixes https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2020-04

(cherry picked from commit 6b00357d53)
2021-10-25 10:46:35 +02:00
volzhs e6402d8730
Update libwebp to 1.1.0
(cherry picked from commit 65f2ab1b61)
2021-10-25 10:44:55 +02:00
Rémi Verschelde 1e83420e75
Relicense Godot logo from CC-BY-3.0 to CC-BY-4.0
Just a version update to be on the standard version.
This has been approved by the copyright holder Andrea Calabró.

(cherry picked from commit 6d26ff4eda)
2021-10-25 10:44:28 +02:00
Rémi Verschelde e16f264a7e
Windows: Fix build with SCons 4.2.0
(cherry picked from commit c191cfbddf)
2021-08-01 11:08:36 +02:00
Jairo f18a8d3ffc Optional Unix Socket disable for devices that do not support it
(cherry picked from commit fe068b61ad)
2020-06-15 10:55:28 +02:00
Rémi Verschelde ebc76d6c0f Drop now unused curl_hostcheck.c
One less thirdparty library to document \o/

(cherry picked from commit 05cf8b7c63)
2020-05-25 17:57:08 +02:00
Rémi Verschelde 8e50c00a13 Windows: Appease capricious MSVC versions with moody headers
Fixes #37799.
Fixes #37986.

(cherry picked from commit 4d3a18d9ff)
2020-05-25 17:56:15 +02:00
Rémi Verschelde ecbaa6e8a0 Fix potential divisions by 0 reported by MSVC
The `TextEdit` one was indeed a potential bug.
The `PCKPacker` one seems to be a false positive, it's already in a
`for` loop that depends on `files.size()`.

(cherry picked from commit ca4e4506db)
2020-05-25 17:55:07 +02:00
Rémi Verschelde cd205bfe69 Linux: Add Mesa 20 "Intel" to prime detection
Diff in `glxinfo` between Mesa 19.3.4 and 20.0.1:
```diff
-OpenGL vendor string: Intel Open Source Technology Center
-OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2)
-OpenGL core profile version string: 4.6 (Core Profile) Mesa 19.3.4
+OpenGL vendor string: Intel
+OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
+OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.1
```

(cherry picked from commit db28e7ef69)
2020-05-25 17:55:07 +02:00
Rémi Verschelde 0f1a729aa8
Merge pull request #36651 from xsellier/backport/spinbox-apply
[3.1][cherry-pick] Add apply method to SpinBox
2020-05-16 12:32:38 +02:00
Rémi Verschelde 83049909fa Update AUTHORS and DONORS list
New contributor added to AUTHORS:
@muiroc

Thanks to all contributors and donors for making Godot possible!

Sorry for the late March update and missed February update, I made sure
to include patrons for both February and March in this commit.

(cherry picked from commit 5b97db325a)
2020-03-11 14:48:38 +01:00
Rémi Verschelde e09dd4dce4 Update AUTHORS and DONORS list
New contributor added to AUTHORS:
@ericrybick, @MadEqua

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 3ca87b9bef)
2020-03-11 14:48:32 +01:00
Rémi Verschelde 85904dfc75 Update AUTHORS and DONORS list
New contributor added to AUTHORS:
@dankan1890

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit f2699a8e60)
2020-03-11 14:48:27 +01:00
Rémi Verschelde fa2fabce6d Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@allkhor, @Eoin-ONeill-Yokai, @timothyqiu, @madmiraal, @zaksnet

Update sponsors on splash screen.

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 9432520449)
2020-03-11 14:48:21 +01:00
Rémi Verschelde 40a0abea8d mbedtls: Re-add patch to disable VIA padlock
The comment mentioned a conflict with libwebsockets, but we actually
still get this conflict even now that we don't use libwebsockets.
Not sure what component is clashing but we should basically just keep
this patch.

Follow-up to #36823.

(cherry picked from commit 8189abd64a)

Note: For the 3.1 branch, only modifies the README.md a bit as I had
kept the patch removed in master/3.2.
2020-03-10 09:32:08 +01:00
Rémi Verschelde 1e9c726231 mbedtls: Re-apply upstream PR 1453 after #36823
For some weird reason 'git apply' does not error out when it does nothing,
so I missed that I did not apply the patch properly in #36823...

This broke the UWP 32-bit x86 build.

(cherry picked from commit 9a727714ee)
2020-03-09 19:50:05 +01:00
Rémi Verschelde 9b8f66a825 Travis: Fix clang-format on non-master branches
`git diff-tree` used to fail on the `3.2` branch (and other non-master
branches) as Travis doesn't actually check that branch from the remote:
```
fatal: ambiguous argument '3.2': unknown revision or path not in the
working tree.
```

The exit code would still be 0 so we'd miss badly formatted commits
targeting stable branches.

We do it manually to ensure that it's going to work as we want it.

(cherry picked from commit e479231b21)
2020-03-06 11:50:09 +01:00
bruvzg 279ada89ab Replace IOHIDDeviceRegisterRemovalCallback with IOHIDManagerRegisterDeviceRemovalCallback to fix gamepad disconnection callback on macOS Catalina.
(cherry picked from commit 6b23e36dbc)
2020-03-06 11:39:37 +01:00
Rémi Verschelde 8e7315d2fe mbedtls: Update to upstream version 2.16.5
Fixes https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2020-02

Drop patch to disable VIA padlock since we no longer use libwebsockets,
so there's no conflict anymore.

(cherry picked from commit e435bed847)
2020-03-06 11:38:39 +01:00
Rémi Verschelde 879fc0b581 mbedtls: Update to upstream version 2.16.4
Fixes CVE-2019-18222.

`include/mbedtls/version.h` was modified to include the forgotten
version bump to 2.16.4, fixed upstream by ARMmbed/mbedtls#2992.

(cherry picked from commit 724487b3c1)
2020-03-06 11:37:04 +01:00
Jóhannes Gunnar Þorsteinsson 6322c783a3 Add apply method to SpinBox 2020-02-28 12:49:01 -05:00
Relintai 58c58ec212 Fix startGame's logic in engine.js.
(cherry picked from commit cb29ce8a3b)
2020-02-14 16:10:49 +01:00
Fabio Alessandrelli 72395ca846 Fix UPNP on windows after #30205.
The problem could be related to different byte ordering when copying
the interface address over the binding address.

(cherry picked from commit e85330231c)
2020-02-14 16:01:54 +01:00
D00T24 273927273d fixed godot not recognising 150x150 icon for uwp export
(cherry picked from commit 88bd3227ac)
2020-02-06 12:47:04 +01:00
Rémi Verschelde 5361dbf4f9
Merge pull request #35396 from akien-mga/3.1
Range: Properly bind value emitted by 'changed' signal
2020-01-21 10:16:25 +01:00
Rémi Verschelde 227a81c119 Range: Properly bind value emitted by 'changed' signal
This was fixed in the `master` branch by removing the value in #29831,
but for `3.1` we preserve compatibility, even if redundant with
'value_changed'.

Fixes #35395.
2020-01-21 09:25:08 +01:00
Rémi Verschelde 513bfe496c SCons: Add 'split_libmodules' option to workaround linker issue
The new 'split_libmodules=yes' option is useful to work around linker
command line size limitations when linking a huge number of objects.
We're currently over 64k chars when linking libmodules.a on Windows
with MinGW, which triggers issues as seen in #30892.

Even on Linux, we can also reach linker command line size limitations
by adding more custom modules.

We force this option to True for MinGW on Windows, which fixes #30892.

Additional changes to lib splitting:

- Fix linking of the split module libs with interdependent symbols,
  hacking our way into LINKCOM and SHLINKCOM to set the `--start-group`
  and `--end-group` flags.
- Fix Python 3 compatibility in `methods.split_lib()`.
- Drop seemingly obsolete condition for 'msys' on 'posix'.
- Drop the unnecessary 'split_drivers' as the drivers lib is no longer
  too big since we moved all thirdparty builds to modules.

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
(cherry picked from commit c320a82213)
2020-01-06 12:52:07 +01:00
qarmin 6de4c53d26 Fix crash when frames are empty
(cherry picked from commit 37c2595526)
2019-12-09 09:03:47 +01:00
Relintai 0587df4aa5 Fixed running the export templates with newer emscripten versions.
(cherry picked from commit 6f1d6cfc78)
2019-12-03 15:02:03 +01:00
Rémi Verschelde 89f26c9479 Emscripten: Re-add BINARYEN_TRAP_MODE='clamp' for fastcomp
The option is needed when using the 'fastcomp' backend (default before
1.39.0), and must not be defined when using 'upstream' (new default).
So we define it conditionally to support both backends.

Follow-up to #30751.

(cherry picked from commit 6d6280dfa3)
2019-12-03 15:01:43 +01:00
Rémi Verschelde ec02a81f47 Bump version to 3.1.2-stable
Tons of bugfixes have been cherry-picked since 3.1.1 in April,
this should make the 3.1 branch a lot more reliable to ship games.

Thanks to all contributors! <3
2019-11-29 16:23:51 +01:00
Rémi Verschelde eabf4bbd67 Emscripten: Do not define BINARYEN_TRAP_MODE='clamp'
It is not supported in Emscripten's `latest-upstream` LLVM backend,
and doesn't seem necessary in the `latest` backend either.
It was initially added in #22857 to solve a compilation error with the latter.

Part of #30270.

(cherry picked from commit 63544e6b02)
2019-11-29 16:10:18 +01:00
Rémi Verschelde 6184ccca46 Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@d329cb6a71.

(cherry picked from commit 502a667070)
2019-11-29 16:05:32 +01:00
bruvzg 56f5502402 [macOS] Fix locale detection.
(cherry picked from commit c8bf0ee062)
2019-11-29 16:05:07 +01:00
stoofin 577b6d1196 Fixed bug caused by a copy/paste error in Face3::get_closest_point_to
s * edge0 = -d / a * edge0 = -edge0⋅v0 / (edge0⋅edge0) * edge0 = vector projection of -v0 onto edge0

By incorrectly using -e/c instead of -d/a, Face3::get_closest_point_to was returning the wrong point in certain cases.  Specifically, I noticed it returning vertex[0] when it should have been returning vertex[1].

(cherry picked from commit 8abd64dcbb)
2019-11-29 16:04:41 +01:00
Rémi Verschelde 8a13eac43d HTML5: Explicitly link idbfs.js for IDBFS support
Upstream Emscripten changed this in 1.39.1+, so IDBFS is no longer
included by default and has to be linked manually.

The explicit linking doesn't seem to be problematic on earlier
versions (tested `1.38.47-upstream`).

Fixes #33724.

(cherry picked from commit e5dfcb5edd)
2019-11-29 16:02:17 +01:00
Ignacio Etcheverry 1d952f8d69 C#: Throw NullReferenceException for null NodePath/RID params
(cherry picked from commit 008769aee9)
2019-11-29 16:02:02 +01:00
Rémi Verschelde bf204bdc7c HTML5: Fix support for Emscripten 1.39.1+
A change in upstream Emscripten 1.39.1+ made our buildsystem error
out where it was previously only issuing a warning:
```
[  5%] Linking Static Library ==> main/libmain.javascript.opt.bc
shared:WARNING: Assuming object file output in the absence of `-c`, based on output filename. Please add with `-c` or `-r` to avoid this warning
Ranlib Library         ==> main/libmain.javascript.opt.bc
/opt/emsdk/upstream/bin/llvm-ranlib: error: unable to load 'main/libmain.javascript.opt.bc': file too small to be an archive
```

As advised on emscripten-core/emscripten#9806, we should be using
`emar` here to create the static library and not `emcc`.
This was apparently done to workaround Emscripten issues in the past,
but evidently this is no longer necessary.

The rest of the `env` redefinitions should probably be re-assessed
against the current state of Emscripten.

Fixes #33374.

(cherry picked from commit e9e2a4b044)
2019-11-29 15:58:41 +01:00
Hugo Locurcio 3b82f52f7d Add a tooltip to explain what marking a preset as "runnable" does
(cherry picked from commit bc8236bd39)
2019-11-29 15:58:28 +01:00
willnationsdev 4aeb7b41cb Added more in-depth examples of NodePaths in API docs.
(cherry picked from commit db0082534c)
2019-11-29 15:58:27 +01:00
Tomasz Chabora f161f7aa0b Make sure tile is selected when selecting TileMap
(cherry picked from commit f7476359e0)
2019-11-29 15:58:27 +01:00
Zak 7c67b1c9a2 Fix split/rsplit docs
(cherry picked from commit 79aca6b0c0)
2019-11-29 15:58:27 +01:00
JFonS 3436955c2e Fix broken gizmo interaction when Node is scaled
(cherry picked from commit 1f623c5a2b)
2019-11-29 15:58:27 +01:00
Rémi Verschelde 4b855aa88e
Merge pull request #33692 from JoshLee0915/3.1MonoHeadlesBuildFix
Added server platform to mono config script
2019-11-19 09:49:13 +01:00
Rémi Verschelde bfd993b0ca doc: Sync classref with current source 2019-11-12 21:49:04 +01:00
Rémi Verschelde 261b9d12b9 Update AUTHORS list
New contributors added to AUTHORS:
@kawa-yoiko, @m4gr3d, @QbieShay, @RevoluPowered, @rxlecky

(cherry picked from commit 62a09a2ee3)
2019-11-12 15:46:03 +01:00
Rémi Verschelde 7f6e2c5037
Merge pull request #33569 from akien-mga/3.1
Assorted cherry-picks from the master branch for Godot 3.1.2 [4th batch]
2019-11-12 15:45:30 +01:00
Rémi Verschelde 473e3665ff Bump version to 3.1.2-rc 2019-11-12 14:29:41 +01:00
Marcel Admiraal 7e56ef1484 Fix mismatch between RigidBody(2D) and Body(2D)SW can_sleep defaults.
- Set Body2DSW can_sleep default to true.

- Set Body2D can_sleep default to true.

(cherry picked from commit 42a9ae7a82)
2019-11-12 14:28:14 +01:00
Yuri Roubinsky c1cabb0bf5 Prevent shader crash if name of variable overrides function name
(cherry picked from commit 76324bec8d)
2019-11-12 14:28:14 +01:00
Ignacio Etcheverry 8b4eea3d6d Mono: Don't use project settings for debugger agent on exported games
(cherry picked from commit 5ff4e0516b)
2019-11-12 14:28:13 +01:00
Rémi Verschelde c3aefbd1d2 Android: Bump gradle version to 5.1.1
Matching changes made in #31521 and #31547 but only in the Jetbrains
IDE config.

(cherry picked from commit 1afd77e375)
2019-11-12 13:09:36 +01:00
fogine 6a4653f41c iOS>=11 platform - when handling gestures on screen edges, godot apps should have priority over OS
Solves an issue where iOS would steal InputEventTouch events when near
screen edges in order to handle system wide gestures.
Fixes #31503

(cherry picked from commit e0df9de0cb)
2019-11-12 13:09:36 +01:00
Hugo Locurcio 41d0e46f2d Always use lists for `LIBS` in SCons
This closes #31288.

(cherry picked from commit 05daf5c78b)
2019-11-12 13:09:36 +01:00
Cameron Reikes dd83296155 Add particles icon to CPUParticles
(cherry picked from commit 345fcb96a2)
2019-11-12 13:09:36 +01:00
iwek7 9bf2e54ca5 Fixes color picker in code editor - now it only changes one color
(cherry picked from commit e7b07e1e58)
2019-11-12 13:09:36 +01:00
Yuri Roubinski b5d8154d17 Added link to docs for shader editor
(cherry picked from commit 770ce20ea3)
2019-11-12 13:09:35 +01:00
santouits 7ebfb73a4a Hopefully fix the random crashes with threads
(cherry picked from commit 13efc1bb06)
2019-11-12 13:09:35 +01:00
clayjohn 0e76f2cc95 fix contact shadows appearing when shading casting is off
(cherry picked from commit b1839e5e85)
2019-11-12 13:09:35 +01:00
Bojidar Marinov 794bfe8aaa Fix invalid write in AudioStreamSample::save_to_wav
Fixes #29955

(cherry picked from commit ea949ab873)
2019-11-12 13:09:35 +01:00
SonerSound 20822ee87d Fix inconsistent lighting in GLES2
Issue was possibily being caused by duplicating a light even when that
light was not in the render_light_instances array.

(cherry picked from commit 545bf86d39)
2019-11-12 13:09:35 +01:00
Shiqing c9422b9c23 Fix #29478 multiple modals possibly freeze
(cherry picked from commit c16e764bb2)
2019-11-12 13:09:35 +01:00
Bojidar Marinov e17a57d88a Fix some issue with TileMap's and other nodes' boundaries
Fixes #30348
Addresses a small part of #30012

(cherry picked from commit ebf2a4d553)
2019-11-12 13:09:35 +01:00
zwostein 0f0016bb75 Explicitly set a channel map when initialising the Pulseaudio stream.
(cherry picked from commit 9fa2e07588)
2019-11-12 13:09:35 +01:00
santouits 1c8984c433 Free server id pools directly.
When closing the game, we flush the command queue but after we are pushing the freeing calls of the id pool to the
command queue and they are never being run. Now we free them directly.

(cherry picked from commit 7aa4622222)
2019-11-12 13:09:35 +01:00
Tomasz Chabora 0fc4c3a308 Allow to remove 2D editor limits
(cherry picked from commit c81525ec05)
2019-11-12 13:09:35 +01:00
Marcus Brummer aa08c7c418 Check if autoload nodes are != NULL before deleting them.
This fixes #27854

(cherry picked from commit 0716c59f14)
2019-11-12 13:09:35 +01:00
Gwyneth Lowe 7a9eb587fd Correct typo that broke custom selected font color
Change several font_selected_color to font_color_selected; the actual name of the override

(cherry picked from commit 7142064110)
2019-11-12 13:09:35 +01:00
Rémi Verschelde e7e7d17f6b Display invalid value keys in AnimationTrackEdit
Godot 2.1 and 3.0 had this feature but it was lost in the rewrite
of the animation editor in 3.1.
Drop unused KeyValid icon, since all valid keys now have a custom
type icon.

(cherry picked from commit b3d772ed83)
2019-11-12 13:09:35 +01:00
Rémi Verschelde 229892c40b GDScript: Improve error on Object to Object invalid argument calls
Fixes #27804.

(cherry picked from commit 6750e1b3cd)
2019-11-12 13:09:35 +01:00
Rémi Verschelde cfd9121fa6 glTF: Fix import of animations with INTERPOLATION_LINEAR
Bug found thanks to GCC 8's -Wduplicated-branches.
Slight refactor for readability.

(cherry picked from commit b486f5dde0)
2019-11-12 13:09:35 +01:00
Paulb23 8148732bd1 Fix TextEdit cursor.column having a negative value
(cherry picked from commit 1d55207fd2)
2019-11-12 13:09:35 +01:00
Hein-Pieter van Braam-Stewart 7592b3b9ee Fix a random SSL crash I saw once.
I don't know why this happened, I was debugging another issue. This
should take care of it though.

(cherry picked from commit 64626f682e)
2019-11-12 13:09:35 +01:00
Leonardo Giovanni Scur 19f132b368 Fix pointer position in hidpi-corrected resolutions on web
(cherry picked from commit 31cc1bdb58)
2019-11-12 13:09:35 +01:00
bruvzg 9e2f76f17d [X11] Add window borderless state detection, fix borderless state restoration after exiting fullscreen.
(cherry picked from commit 2a950f3a7c)
2019-11-12 13:09:35 +01:00
Rémi Verschelde e23bde4358 Always pass script path to external editor
Previously you had to set the Exec Flags manually, reading the documentation
to find out what placeholders to use. As most editors should support having
the file path passed as the last argument, we default to doing this if no
custom {file} flag is defined. We also default the Exec Flags to "{file}" and
the placeholder text gives some documentation.

Fixes #29662.

(cherry picked from commit 4a757a2d96)
2019-11-12 13:09:35 +01:00
Toshiwo 656f23fde9 when doing Vector3 slerp it is not necessary to have it normalized.
(cherry picked from commit 3aff645114)
2019-11-12 13:09:35 +01:00
Toshiwo b56fa43090 Fix Vector3 slerp method normalizing cross product
(cherry picked from commit 416a7d06de)
2019-11-12 13:09:35 +01:00
qarmin 1d2aaa447e Fix RichLabelText::_process_line crash
(cherry picked from commit 685451967c)
2019-11-12 13:09:35 +01:00
SamSindt df2a809aae Reversed operator in SortLifetime fixing #29440
(cherry picked from commit 6a23eff748)
2019-11-12 13:09:35 +01:00
qarmin 03a1570a74 Fix 2D Line crash
(cherry picked from commit 2621131549)
2019-11-12 13:09:35 +01:00
qarmin 1f5f2d3ce8 Fix ARVRAnchor and ARVRController error spam
(cherry picked from commit 3de3f87657)
2019-11-12 13:09:35 +01:00
qarmin 8423d98e1c Fix crash with get_keywords_color
(cherry picked from commit 8d993f6357)
2019-11-12 13:09:35 +01:00
Hugo Locurcio d871ac670d Use uppercase for all hexadecimal constants in the editor help
(cherry picked from commit 6516098d12)
2019-11-12 13:09:35 +01:00
bruvzg dce7311aa5 Fix third and fourth level (AltGr / ⌥ modifier) keys input in LineEdit.
(cherry picked from commit 63d8dc0920)
2019-11-12 13:09:35 +01:00
qarmin cb394082ef Fix memory leak after closing files
(cherry picked from commit 53c0a29fb0)
2019-11-12 13:09:35 +01:00
Michael Alexsander Silva Dias 1804a726b4 Fix error spam when typing in the TileMap editor's search box while having no results
(cherry picked from commit 412a0b73e9)
2019-11-12 13:09:35 +01:00
Hein-Pieter van Braam-Stewart ef6d414e6e Fix moving and renaming files
This commit fixes several issues related to moving scenes and resources
in an open project.

* Don't try to reload scenes while not all scenes are updated yet.
* Don't use the UndoRedo system to update non-user initiated editor
state.
* Resave scenes after moving files and updating resource path(s).

(cherry picked from commit 0ac7715a27)
2019-11-12 13:09:35 +01:00
Michael Alexsander Silva Dias 02ccd4d78c Remember selected subtile when updating the TileMap editor
Fixes #29444.

(cherry picked from commit 0a03ed7544)
2019-11-12 13:09:35 +01:00
Bojidar Marinov 22abeff592 Escape node names when saving to .tscn
Fixes #29401

(cherry picked from commit cc004485bc)
2019-11-12 13:09:35 +01:00
Rémi Verschelde 4d6517fad3 Bind missing FLAG_DISABLE_Z enum value in ParticlesMaterial
Fixes #29419.

(cherry picked from commit a3462c97ad)
2019-11-12 11:51:52 +01:00
Tomasz Chabora e66122e0bf Fixed get_item_at_position being weird
(cherry picked from commit 59f403de0b)
2019-11-12 11:47:55 +01:00
Rémi Verschelde f11588e5a5 Fix wrong property binding for NavigationPolygon::vertices
(cherry picked from commit 586539d867)
2019-11-12 11:45:29 +01:00
Rémi Verschelde 9591e2950a Node::duplicate: Don't set name if original node is nameless
In practice this only happens when duplicating a node which is not in
the scene tree yet, as nameless nodes get assigned a generated name
when added to the scene tree.

Fixes #27319.

(cherry picked from commit 0823ae7ae4)
2019-11-12 11:45:10 +01:00
Rémi Verschelde 88cccfb796 Print engine version to stdout when starting Godot
Also include website URL and make it configurable via version.py
together with the rest of the engine branding.

Add mention to MIT license in --help output.

(cherry picked from commit b10dd110e5)
2019-11-12 11:44:46 +01:00
Nils ANDRÉ-CHANG 6afcc72465 Fix Segmentation fault and reduce memory consumption
(cherry picked from commit a156b7976d)
2019-11-12 11:44:04 +01:00
Geequlim 6c71289432 Fix parse error when extends from subclass of named classes
(cherry picked from commit ebcfe28475)
2019-11-12 11:43:11 +01:00
WiggleWizard 4444bd1fcb Fixed virtual method not showing up in autocomplete and docs
(cherry picked from commit aebca30c43)
2019-11-12 11:42:45 +01:00
Tomasz Chabora 7431d3c3c0 Don't modulate canvas on invisible color change
(cherry picked from commit 5e9400b2e3)
2019-11-12 11:42:25 +01:00
Pedro J. Estébanez aacefcb7dc Fix 2D bones ignored by onion skinning
Fixes #27819.

(cherry picked from commit 88153fbb61)
2019-11-12 11:41:51 +01:00
Pedro J. Estébanez 340f542e49 Remove ghost of canvas zoom controls during onion skinning
(cherry picked from commit 3b17e6de33)
2019-11-12 11:41:06 +01:00
Pedro J. Estébanez f040f7c283 Fix canvas zoom controls lazy position update
After hiding/showing rulers, zoom controls were kept at the wrong position until an update happened because of other reason.

(cherry picked from commit 4dd9efe757)
2019-11-12 11:41:02 +01:00
thomas.herzog 2514594a45 [GDNative] fix godot_variant_evaluate function
Fixes #28984

(cherry picked from commit c1e733466b)
2019-11-12 11:40:17 +01:00
Michael Alexsander Silva Dias b01ef197a6 Fix bottom panel visibility behaviour in the theme editor
Fixes #29034, fixes #29056

(cherry picked from commit b5c8205312)
2019-11-12 11:39:53 +01:00
Rémi Verschelde 8dce0ce022 i18n: Skip unsupported locales for editor translations
Godot currently can't properly render scripts that require Right-To-Left
and font shaping support, so we skip those.
This is a temporary measure until these features are supported.

Fixes #28577.

(cherry picked from commit 92f67ceef3)
2019-11-12 11:39:30 +01:00
Martin Dahlgren bfcb9dfa01 Fix getting max magnitude in AudioEffectSpectrumAnalyzer
(cherry picked from commit 47f628a013)
2019-11-12 11:39:12 +01:00
Swarnim Arun 949e1da462 Fix history state setup in VisualScript
(cherry picked from commit 7155477caa)
2019-11-12 11:38:51 +01:00
Hugo Locurcio 665c00eb58 Allow empty replacement texts in the Find in Files replace dialog
This closes #29026.

(cherry picked from commit a411067829)
2019-11-12 11:38:34 +01:00
Guilherme Felipe 14587802f9 [StateMachine] Fix error message for travel method
(cherry picked from commit 4de6c94eb0)
2019-11-12 11:38:14 +01:00
Lukas Zanner 7022e02d4d Initialize padding on PoolByteArray serialization
(cherry picked from commit c35f4e8808)
2019-11-12 11:37:57 +01:00
Ibrahn Sahir 6d57ebed1a MessageQueue::flush now always destroys parameters of a spent message
Previously, destructors of Variant parameters were not called if the
target of the message was not found.

(cherry picked from commit 5626a1ec20)
2019-11-12 11:37:32 +01:00
RameshRavone ffab947e1c NULL global_tag for non exposed classes
(cherry picked from commit 71808b38bc)
2019-11-12 11:35:01 +01:00
Jason 2da174c9b4 Resolve: #24682 CSGPolygon - weird end cap
(cherry picked from commit 89a9f4621f)
2019-11-12 11:34:20 +01:00
Paulb23 909a1cced8 Fix text_edit drawing incorrect chars when syntax highlighting enabled
(cherry picked from commit a8a0392c12)
2019-11-12 11:26:14 +01:00
Fabio Alessandrelli 390dbbbcbd Fix Object::get_indexed for simple properties.
Object::get_indexed was not correctly reporting invalid keys if the name
was a direct property (not a subproperty), causing for example Tween to
not report correctly a bad interpolate_property key.

(cherry picked from commit d39ffc101b)
2019-11-12 11:25:58 +01:00
Frank Secilia 8ee5dc5850 Fix indexing failure in NativeScriptLanguage::unregister_binding_functions.
binding_functions.size() and an instance's binding_data.size() can get out of sync. They sync up when an instance's bindings are requested. When binding functions are registered after creating an instance's bindings, the instance's bindings are out of sync until requested again. If they're never requested, they're never synced.

unregister_binding_functions indexes into binding_data, but only checks that its safe to index into binding_functions. When they're out of sync, indexing fails.

This revision checks that it's safe to index into binding_data.

(cherry picked from commit a4a0e64245)
2019-11-12 11:25:18 +01:00
Gilles Roudière dcc9c1cc2a Fix NaN with get_action_strength
(cherry picked from commit 3bfa080c9c)
2019-11-12 11:24:39 +01:00
Fabio Alessandrelli 53eb140cf1 Fix GDNative library resource loading.
Store general properties in ConfigFile too when modifying them.
Additionally set config_file property as internal as it's not editable
from inspector. It also does not appear to get saved in a meaningful way
(saved as Object(ConfigFile, ...))

(cherry picked from commit aecbb330f3)
2019-11-12 11:24:12 +01:00
Bojidar Marinov d79be7ec33 Allow or_greater for most properties of NavMesh
Closes #28624

(cherry picked from commit 68bee3d9a2)
2019-11-12 11:23:47 +01:00
JFonS 49613428f1 Fixes to ClippedCamera
This work has been kindly sponsored by IMVU.

(cherry picked from commit 9e97bac0cf)
2019-11-12 11:22:14 +01:00
Bojidar Marinov dc90131d8c Fix AudioEffectRecord messing up the effect stack by not writing to dst_frames
(cherry picked from commit 9285aad8b3)
2019-11-12 11:21:46 +01:00
Fabio Alessandrelli 5c9694bc0d Avoid _can_call_mode resetting error message in MultiplayerAPI
(cherry picked from commit bba77fe387)
2019-11-12 11:20:11 +01:00
Guilherme Felipe 4a933a6409 [EditorSpatialGizmo] Fix error in intersect_ray
(cherry picked from commit 70ead9455f)
2019-11-12 11:19:33 +01:00
Bojidar Marinov 2b9c754d1d Fix default values not being read correctly in VS, take two
Fixes #25889.

(cherry picked from commit b291cfde1b)
2019-11-12 11:17:48 +01:00
Rémi Verschelde 3afd8a374d Locales: Add some missing locale names
(cherry picked from commit 867b96eb71)
2019-11-12 11:17:20 +01:00
homer666 027e2e90fd Refresh import dock on change "animation/storage"
(cherry picked from commit 106d1f3c3c)
2019-11-12 11:15:06 +01:00
homer666 918e120da3 Update edited keyframe's snap mode properly
(cherry picked from commit 62e0262951)
2019-11-12 11:14:08 +01:00
Michele Valente 4f09d433d8 fix builds made with Clang on some Linux distros
This is the same as #23542 (Fix binaries incorrectly detected as shared
libraries on some linux distros) but for Clang. It should be fine with
Clang 4 or higher.

(cherry picked from commit c0fcd55f96)
2019-11-12 11:13:10 +01:00
Ignacio Etcheverry c78c38d817 Mono: Lazily load scripts metadata file
- Only load the scripts metadata file when it's really needed. This way we avoid false errors, when there is no C# project,  about missing scripts metadata file.

(cherry picked from commit 791e1294c3)
2019-11-12 11:12:49 +01:00
James Buck 7577dd804a Cancel tooltip when hiding the node it belongs to
(cherry picked from commit bc7863775c)
2019-11-12 11:12:33 +01:00
Guilherme Felipe 8ef5052967 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.

(cherry picked from commit 1bae73d7d0)
2019-11-12 11:10:53 +01:00
mashumafi 717c492eb6 Add setting to exclude addons from script warnings
(cherry picked from commit d7137a6b72)
2019-11-12 11:10:01 +01:00
lupoDharkael ad1e8069d3 GDScript: add variable shadowing warning
(cherry picked from commit 14078fbb82)
2019-11-12 11:09:28 +01:00
Jared 66c1b8adc4 Light2D height range expanded to -2048 to 2048.
(cherry picked from commit 307bc16523)
2019-11-12 11:07:41 +01:00
Aaron Winter 794341e0b5 added negative X and negative Y offset to TileMap
clang-format

added negative X and negative Y offset to TileMap

(cherry picked from commit 63e0fd7675)
2019-11-12 11:07:19 +01:00
Christoph Schroeder 0f1704c9e8 Fixes Geometry.segment_intersects_circle working only one way.
(cherry picked from commit dcbe55a1fa)
2019-11-12 11:04:27 +01:00
will 7d84035e13 New shortcuts for the editor menu items
(cherry picked from commit 7a88002992)
2019-11-12 11:04:06 +01:00
Vixelz 39e76014d4 Include global class resources in Resource property inspector
Much like how script defined global classes can be created from the
"New Resource..." button in the FileSystem panel, this allows the
creation of script defined resources to be embedded.

(cherry picked from commit 03f7a724ed)
2019-11-12 11:02:43 +01:00
Rémi Verschelde a5f4f15510 AudioStreamOGGVorbis: Expose loop and loop_offset as properties
Fixes #11231.

(cherry picked from commit 51d1be5156)
2019-11-12 11:00:33 +01:00
Rémi Verschelde 24465c5e25 tinyexr: Sync with upstream 656bb61
(cherry picked from commit 6a2c2e5062)
2019-11-12 09:53:52 +01:00
Rémi Verschelde 908c8862ab nanosvg: Sync with upstream c1f6e20
Now formally unmaintained, so probably no further sync to expect
from this repository.

(cherry picked from commit 097b746fdd)
2019-11-12 09:53:04 +01:00
Rémi Verschelde 6b972f178a miniupnpc: Sync with upstream master (0ab1d67)
(cherry picked from commit e2fbfb1ded)
2019-11-12 09:52:09 +01:00
Rémi Verschelde 1b7a2e7284 mbedtls: Update to upstream version 2.16.3
(cherry picked from commit a3d77be53b)
2019-11-12 09:51:43 +01:00
Rémi Verschelde 699b087296 glad: Sync with upstream 0.1.33
(cherry picked from commit 92c3b6c85e)
2019-11-12 09:50:05 +01:00
Rémi Verschelde 716f7c3d32 X11: Fix memory leak in handle_key_event
Extracted from #27189.

(cherry picked from commit d191ffb47d)
2019-11-12 08:41:42 +01:00
PouleyKetchoupp 9360b23544 Fixed crash when pressing down key on empty Tree
Fixes #33554

(cherry picked from commit 47a4ca0022)
2019-11-12 08:41:00 +01:00
Jonathan Mannancheril 8851026e8a Update libogg to upstream c8fca6b
(cherry picked from commits 6eb8c11d32
and e70e894433)
2019-11-12 08:15:54 +01:00
volzhs b94f728699 Update libwebp to 1.0.3
(cherry picked from commit 074d421dca)
2019-11-12 08:14:40 +01:00
Rémi Verschelde 76db2b4dcb Android: Fix another regression with Secure.ANDROID_ID
Regression from #24145, which was missed in #28146.

(cherry picked from commit 071ebb1e48)
2019-11-12 08:13:22 +01:00
Jonathan Mannancheril bc31b11fdd Update zstd to 1.4.4
(cherry picked from commit 55afd6e784)
2019-11-12 08:10:10 +01:00
unknown c563839355 Update zstd to 1.4.3
(cherry picked from commit 61ad365fc9)
2019-11-12 08:09:52 +01:00
Rémi Verschelde b9b2e80add zstd: Update to upstream version 1.4.1
(cherry picked from commit b81fa47f38)
2019-11-12 08:09:07 +01:00
Rémi Verschelde 2e98ecd95f tinyexr: Sync with upstream a685e33
(cherry picked from commit b5b3aa920b)
2019-11-12 08:07:59 +01:00
Rémi Verschelde 8067207257 pcre2: Update to upstream version 10.33
(cherry picked from commit 518e23424e)
2019-11-12 08:07:44 +01:00
Jonathan Mannancheril b021671681 Update stb_vorbis to 1.17
(cherry picked from commit 97af5569d9)
2019-11-12 08:04:06 +01:00
Rémi Verschelde 82773cc7aa stb_vorbis: Update to upstream version 1.16
(cherry picked from commit 3e727bc659)
2019-11-12 08:03:55 +01:00
Rémi Verschelde 0d2cb78f3e glad: Sync with upstream 0.1.31
(cherry picked from commit 2bbcc521b6)
2019-11-12 08:02:08 +01:00
Rémi Verschelde cfa50d67d2 mbedtls: Update to upstream version 2.16.2
(cherry picked from commit 6321cc8da3)
2019-11-12 07:59:44 +01:00
Fabio Alessandrelli eb29bd988c Update miniupnpc library to latest master
(cherry picked from commit 78907d91f1)
2019-11-12 07:56:46 +01:00
PouleyKetchoupp 8901ff5e58 Update transforms after timers update to make sure changes are made before render
Fixes #29952

(cherry picked from commit c6b82f108a)
2019-11-11 13:29:22 +01:00
Rémi Verschelde 0b399e0373
Merge pull request #33450 from akien-mga/3.1
Assorted cherry-picks from the master branch for Godot 3.1.2 [3rd batch]
2019-11-10 10:03:53 +01:00
Rémi Verschelde 5672e5db24 Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@DavidSichma, @ptrojahn

New Platinum sponsor, added to splash screen:
Interblock

New Gold sponsor:
Image Campus

(cherry picked from commit c663d65ffc)
2019-11-08 15:48:38 +01:00
Tomasz Chabora 55ec64a77a Clarify is_action_pressed() for multiple assigned buttons
(cherry picked from commit 7e329a7251)
2019-11-08 15:48:38 +01:00
clayjohn cf9560fdab add project setting for max lights and reflections in gles3
(cherry picked from commit 1a981ef268)
2019-11-08 15:48:37 +01:00
Kaligule 050c4dab00 Add a reference to pow to the description of exp.
This might be especially usefull since godot script doesn't support ** or ^ as operators, so beginners might search for the exponential function, when what they really need is the pow function.

This is exactly what happened to me and since I couldn't find helpfull information in the documentation I had to look it up online, where I found the answer on a helpfull [reddit thread](https://www.reddit.com/r/godot/comments/3mvwz0/how_do_i_do_exponents_in_godot/).

@akien-mga told me how to reference methods here:
godotengine#30909

(cherry picked from commit a2c81a7455)
2019-11-08 15:48:19 +01:00
George Marques 82b15ab469 GDScript: Fix type resolution not being return in some cases
Some situations caused the parser node type to not being update when
trying to resolve the type, returning invalid data and breaking the
parsing when it shouldn't. This patch fix the behavior.

(cherry picked from commit 64d09b7de5)
2019-11-08 15:48:19 +01:00
Guilherme Felipe 71a0722035 Fix set_default_cursor_shape always sending motion event
(cherry picked from commit 508761e0cd)
2019-11-08 15:48:19 +01:00
Michael Alexsander Silva Dias e384d77194 Fix 'GDNativeLibrary' editor being incorrectly opened
(cherry picked from commit 147990cb6d)
2019-11-08 15:48:19 +01:00
nobuyuki_nyuu 00883e8fdc Changes default coarse 2d zoom level from 1.5 to sqrt(2).
(cherry picked from commit 3f516622c3)
2019-11-08 15:48:19 +01:00
Rémi Verschelde 4133ee5e85 Android: Remove unusable android_stl=no option
As of 3.1 and later, we have too many thirdparty C++ dependencies
and some internal uses of `new` and `delete` too for it to make
sense to build without the STL on Android.

The option has been broken since 3.0, and the "System STL" that we
relied on for basic support of `new` and `delete` is likely to be
dropped from the NDK:
https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md#System-STL

(cherry picked from commit 2da1614beb)
2019-11-08 15:48:19 +01:00
Rémi Verschelde f1fc6feca4 SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools build
Those were disable to keep size small, and on Android avoid the dependency on the STL,
but for tools build (editor) this is not really a concern.

Note: as of today it's not possible to build tools=yes for those platforms, but this
change is one of the necessary steps to enable it.

Fixes #25262.

(cherry picked from commit 4b20959d99)
2019-11-08 15:48:19 +01:00
clayjohn 4492f6d193 properly pass SCREEN_PIEXEL_SIZE to canvas light shader
(cherry picked from commit 518f0fb190)
2019-11-08 15:48:19 +01:00
clayjohn bd9cff1b20 allow omnilights and spotlights to use negative in GLES2
(cherry picked from commit 96c3004855)
2019-11-08 15:48:19 +01:00
Hugo Locurcio ac09460cd1 Mention 32-bit integer limit in the PoolIntArray documentation
(cherry picked from commit cb3676726b)
2019-11-08 15:48:19 +01:00
Cameron Reikes 15be90bbf3 Same method when redrawing as when theme changed
(cherry picked from commit c123a8c4f5)
2019-11-08 15:48:19 +01:00
Ignacio Etcheverry b6bcd09d7c C#: Fix Color.ToHtml()
(cherry picked from commit 57fe284fe6)
2019-11-08 15:48:19 +01:00
Emmanuel Barroga 53b44aacad Fix Redundant Navigation Polygons
When adjusting the vertices of a navigation polygon, the tile editor would create a duplicate navigation polygon.  So each time you made an adjustment, another copy of the polygon would be created.

(cherry picked from commit 6c83550dfc)
2019-11-08 15:48:19 +01:00
shaderbeast a07d53b262 Mark class_name line as safe in editor
(cherry picked from commit 1e6a52b215)
2019-11-08 15:48:19 +01:00
TGRCDev ebece65936 Fixed EOF flag not resetting on seek back
(cherry picked from commit c6f7015bca)
2019-11-08 15:48:19 +01:00
PouleyKetchoupp bbec80ca8a Fixed AnimationTreeStateMachine transition priority (last transition was always chosen instead of least cost)
Fixes #31132

(cherry picked from commit aaad50e4d9)
2019-11-08 15:48:19 +01:00
Rémi Verschelde b45ec12c8c Translation: Fix logic bug finding match for regional locales
The  match test was inverted. The rest of the changes
are documentation and cleanup.

Fixes #26346 and fixes #31192.

(cherry picked from commit b33042507b)
2019-11-08 15:48:19 +01:00
Cameron Reikes a5547ac3c7 Button object used after pressed is called
- by queueing for deletion node can call own cleanup methods

(cherry picked from commit c69ff6833c)
2019-11-08 15:48:19 +01:00
Cameron Reikes 781006e25a Expression before 'is' may be null
(cherry picked from commit 2339e85b78)
2019-11-08 15:48:19 +01:00
Cameron Reikes 204f21909b Show that identifier found in function names
(cherry picked from commit 9f7a166c35)
2019-11-08 15:48:19 +01:00
PouleyKetchoupp e83754b6ed Fixed vertex color initialization with default value in gles3
Fixes #30275, #31250

(cherry picked from commit e852b3a271)
2019-11-08 15:48:19 +01:00
RaphaelHunter 22c31016c8 fix gles2 canvas shader uniform error,close #31201
(cherry picked from commit 48f28c68bc)
2019-11-08 15:48:19 +01:00
PouleyKetchoupp 1649848a81 Updated doc for PROPERTY_HINT_RANGE (or_greater/or_lesser instead of allow_greater/allow_lesser)
(cherry picked from commit 09e3905c06)
2019-11-08 15:48:19 +01:00
Carl Drougge cd538d23cc OS_X11::set_window_maximized gives up after 0.5s
Spinning forever is clearly worse, especially since this happens on at
least FVWM even though the window actually is maximized.

(cherry picked from commit deb73001ab)
2019-11-08 15:48:19 +01:00
PouleyKetchoupp cdd63b8d12 Fixed error in ParallaxLayer when set_mirroring is called before entering the tree
Fixes #31300

(cherry picked from commit 927a7916f6)
2019-11-08 15:48:19 +01:00
Bojidar Marinov 8112025573 Re-allow indexing on "self" and object types in GDScript
Fixes #25081

(cherry picked from commit e3d05fa42d)
2019-11-08 15:48:19 +01:00
RaphaelHunter 5e8edf9c5d fix gles3 shader uniform vec3 error, close #30930
(cherry picked from commit b8bb5e90ea)
2019-11-08 15:48:19 +01:00
George Marques c9a5ca7ca5 GDScript: Add _ prefix on class name in type compatibility check
This makes sure that the classes internally represented with an
underscore (_) prefix, such as singletons, are still properly checked
for inheritance in the ClassDB.

(cherry picked from commit 05465b9693)
2019-11-08 15:48:19 +01:00
Marcel Admiraal 37f7dcf3bc Call activate function when setting RigidBodyBullet activation state.
(cherry picked from commit 0539023fd4)
2019-11-08 15:48:19 +01:00
Bojidar Marinov fe90b69e0f Fix "Make Scene Root" deleting previous root whenever focusing another scene
Hopefully fixes #24484 and fixes #27222.

(cherry picked from commit cfc779ccf0)
2019-11-08 15:48:19 +01:00
Michael Alexsander Silva Dias b7e644bd26 Make 'break' and 'continue' be marked as safe
(cherry picked from commit a8826ad3b8)
2019-11-08 15:48:19 +01:00
Xenoamor 90abe89662 Fix GridMap list text not expanding when palette is resized
This is to close #31304

(cherry picked from commit 69438149f5)
2019-11-08 15:48:19 +01:00
Max Hunt 9e96e1f1c0 Improve documentation of EditorPlugin.add_tool_submenu_item method
(cherry picked from commit 45767fe5f6)
2019-11-08 15:48:18 +01:00
Bastiaan Olij ea3a42c500 Fix self reference issue in core structures for GDNative plugins
(cherry picked from commit bf9a97c2cb)
2019-11-08 15:48:18 +01:00
Ignacio Etcheverry ef92c9740f Make git no longer ignore solution files inside the mono module
(cherry picked from commit 33c0d47273)
2019-11-08 15:48:18 +01:00
ternvein 82f65f5b92 FIX: Tabs text translation
(cherry picked from commit 118940e7c5)
2019-11-08 15:48:18 +01:00
Michael Alexsander Silva Dias 5d1697b78f Fix 'TabContainer' not updating its tab titles when locale is changed
(cherry picked from commit a242bf464a)
2019-11-08 15:48:18 +01:00
ternvein 605dbffe93 FIX: WindowDialog title translation
(cherry picked from commit efc8314516)
2019-11-08 15:48:18 +01:00
Michael Alexsander Silva Dias f915d69e05 Update WindowDialog title when translation changes
(cherry picked from commit 06a890f7a3)
2019-11-08 15:48:18 +01:00
Rémi Verschelde b70788b4ad PopupMenu: Fix missing text/xl_text when using add_shortcut
Use macros to ensure that `text`, `xl_text` and `id` are always set
using the same logic.

Fixes #25519.

Also fixes up #26914 when `p_id == -1` handling was only added for a
couple methods instead of all of them.

(cherry picked from commit 58dd5d0c78)
2019-11-08 15:48:18 +01:00
Fabio Alessandrelli 53c2e2da50 WebSocketServer now sanitize destination peers.
When relaying messages in multiplayer mode.
Could cause a crash in case a malicious client sends a bogus packet and
for those cases where a peer has just disconnected and a message arrive
from another peer with the disconnected one as destination.

(cherry picked from commit 17be67b8c7)
2019-11-08 15:48:18 +01:00
Tomasz Chabora 37794ea4c3 Clarify usage of action_press
(cherry picked from commit b950867df8)
2019-11-08 15:48:18 +01:00
Rémi Verschelde dbcf3318e1 DirAccessPack: Fix dir_exists and file_exists for res:// paths
Both methods check against containers using relative paths as index,
so the `res://` part needs to be stripped.

Fixes #26009.

(cherry picked from commit ad8746e0de)
2019-11-08 15:48:18 +01:00
Hugo Locurcio 1ef9a47ede Improve the GeometryInstance class documentation
This adds a mention that LOD properties currently have no effect.

(cherry picked from commit b84b46d5df)
2019-11-08 15:48:18 +01:00
fhuya 0d401e11b1 Shut down Godot processes on app exit.
(cherry picked from commit f35b1f3b91)
2019-11-08 15:48:18 +01:00
Fabio Alessandrelli cd0ba31533 Fix WebSocketServer relaying message 2 times.
The WebSocketMultiplayerPeer was relaying the same message two times,
both in _server_relay and _process_multiplayer (which was only supposed
to store the packet, given the server was one of the destination).

_process_multiplayer now only store the packet, and calls _server_relay
which will relay the message to other clients if needed.

(cherry picked from commit d1539db2c6)
2019-11-08 15:48:18 +01:00
Rémi Verschelde 6d0421d2ae Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@ef8542c9f3.

(cherry picked from commit 9ceab52892)
2019-11-08 15:48:18 +01:00
Yuri Roubinski e224c72dd8 Fix hint range step for integer in shaders
(cherry picked from commit 982becfa39)
2019-11-08 15:48:18 +01:00
fjordyo 5cdcf06ec1 Fix the edges of the mesh vertex
(cherry picked from commit 4c28053ead)
2019-11-08 15:48:18 +01:00
qarmin 7823552d9e Fix memory leak in ResourceFormatSaverBinary::save
(cherry picked from commit b244ab4acc)
2019-11-08 15:48:18 +01:00
clayjohn e821477102 throw error when user tries to use Canvas background without sample buffer
(cherry picked from commit e65d2184b9)
2019-11-08 15:48:18 +01:00
clayjohn 99adaef47c Fix skip_vertex_transform bug in GLES2 CPUParticles
(cherry picked from commit 97f66900bb)
2019-11-08 15:48:18 +01:00
Robin Hübner 80752cca50 fix otherwise unitialized variables, found in #31694
(cherry picked from commit 4817595c0e)
2019-11-08 15:48:18 +01:00
Max ee4d1e49ca Fix crash on exit or resume on iOS 13
Fixes #7966.

(cherry picked from commit 29bde8cd74)
2019-11-08 15:48:18 +01:00
clayjohn b7c3fd0711 Fix shadow mapping with RGBA textures on html
(cherry picked from commit 6ec7686a0c)
2019-11-08 15:48:18 +01:00
Hugo Locurcio 1f772917d2 makerst: Separate signals/enums/properties/methods with a line
(cherry picked from commit c2e5ef4cec)
2019-11-08 15:48:17 +01:00
volzhs e168f04bc3 Fix validating editor bold font
(cherry picked from commit aa5e34d018)
2019-11-08 14:03:58 +01:00
Ignacio Etcheverry aa8386c593 Mono: Force preemptive thread suspend mode as a temporary workaround
(cherry picked from commit 5a6070dde3)
2019-11-08 14:01:49 +01:00
Rémi Verschelde 02c4c7a693 Android one-click deploy: Don't clear by default
This makes iteration faster as you don't need to monitor your phone
to allow the installation each time.

Fixes #32183.

(cherry picked from commit 9d96f04138)
2019-11-08 14:01:08 +01:00
Harley Laue 6befb0836e Allow building cvtt with system squish
It looks like the SCsub for cvtt was copied from squish and it left
the `if env['build_squish']:` line intact. This means that using
`scons builtin_squish=no modules/cvtt` would fail and overal builds
would also fail because they'd fail to find `ConvectionKernels.h`

(cherry picked from commit 0fbd00f656)
2019-11-08 14:00:39 +01:00
Rémi Verschelde 5f314c54ff Prevent crash when we can't write to editor cache or config path
This can happen if users somehow got wrong user permissions assigned to
their Godot cache, config or data paths (e.g. `~/.config/godot`).

The error messages should give them a hint as to what the issue may be.

Fixes #33199.

There may be other situations that still lead to a crash, we need to
review all uses of `FileAccess::open` with `FileAccess::WRITE` mode to
ensure that proper pointer validation is done.

(cherry picked from commit 565f7183aa)
2019-11-08 13:13:55 +01:00
sheepandshepherd e46f2be4d7 Document GDNativeLibrary
(cherry picked from commit 04dbcd7f5a)
2019-11-08 13:09:55 +01:00
Rémi Verschelde 5967c6347d Travis: Make scons cache branch-specific
(cherry picked from commit a99b7a5f88)
2019-11-08 13:08:24 +01:00
Kanabenki 7ef78e87c1 Fix casting to uint64_t when returning unix system time
(cherry picked from commit add91724e6)
2019-11-08 13:06:53 +01:00
Hugo Locurcio 0c0c911ae8 Display version information in the editor at all times
This closes #27811.

(cherry picked from commit dee9e9dc62)
2019-11-08 12:57:50 +01:00
Rémi Verschelde 5cdd17194e
Merge pull request #33373 from ktksgit/fix_crash_in_pluginscript
Fix crash in PluginScript destructor
2019-11-06 15:32:35 +01:00
ktksgit eedf4b27a1 Fix crash in PluginScript destructor 2019-11-05 23:30:42 +01:00
Joshlee0915 d51bce47de Added server platform to mono config script 2019-10-30 21:04:18 -06:00
Rémi Verschelde 34d4c2ed81
Merge pull request #33063 from yeonghoey/mingw-secure-api-31
Specify MINGW_HAS_SECURE_API=1
2019-10-25 21:59:42 +02:00
bruvzg 8033270852 Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
(cherry picked from commit 509afcea92)
2019-10-25 16:28:38 +02:00
Yeongho Kim d2fbe4db07 Specify MINGW_HAS_SECURE_API=1 2019-10-25 21:33:26 +09:00
Rémi Verschelde 4b6e405f1d
Merge pull request #32938 from Calinou/add-missing-autokey-icon-3.1
Add the missing autokeying icon (3.1)
2019-10-21 13:55:17 +02:00
Hugo Locurcio 22147bb9dc
Add the missing autokeying icon
This icon was added in the `master` branch (and then improved) a
while ago.

This adds the latest version of the icon to the `3.1` branch.
2019-10-20 14:31:45 +02:00
Rémi Verschelde 5fddee909c Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@creikey, @IronicallySerious, @LikeLakers2, @minraws, @NilsIrl,
@profan, @raphael10241024

New Platinum sponsor, added to splash screen:
Heroic Labs

Merged some duplicates via .mailmap to allow better tracking of
commit counts with `git shortlog -s -n -e --no-merges`.

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 664d7e7336)
2019-10-07 11:26:52 +02:00
Rémi Verschelde 8f3fea2058
Merge pull request #32397 from akien-mga/3.1
Assorted cherry-picks from the master branch for Godot 3.1.2
2019-09-28 07:37:25 +02:00
clayjohn 5acb21dd7b check if skeleton texture is already allocated before reallocating
(cherry picked from commit 99de3906ba)
2019-09-27 12:54:54 +02:00
clayjohn 61ef8e98ba toggle CPUParticles2D visibility when redrawing
(cherry picked from commit cb4d145c22)
2019-09-27 12:53:53 +02:00
clayjohn 3689ac6c6b fix CPU particles bug with local_coords and transform
(cherry picked from commit 52696e98b4)
2019-09-27 12:49:40 +02:00
Colin Redman abf19bdab2 Fix ParallaxBackground breaking when moving it out the scene tree
(cherry picked from commit 359d7f178c)
2019-09-26 14:49:37 +02:00
Anish c70a3671b0 Fixes VideostreamGDNative crash on audio_channel=0.
Added an if case to check if the mix_callback exists before running any
of the audio code.

Fixes: #28644
(cherry picked from commit f0757f31a4)
2019-09-26 14:48:53 +02:00
Michael Alexsander Silva Dias cd1bb5d3db Make 'TabContainer' update when icon/title is changed
Fixes #28655.

(cherry picked from commit 37f4d51a75)
2019-09-26 14:48:35 +02:00
Bojidar Marinov 33b2d65f98 Fix slight issues with autocompletion and member lists in GDScript
Fixes #27152
Fixes #28591

(cherry picked from commit f9d9530902)
2019-09-26 14:48:16 +02:00
Hugo Locurcio 759b488b22 Add a property hint for DynamicFont size
This caps its size to reasonable values in the Inspector.

This closes #22581.

(cherry picked from commit 818f756d90)
2019-09-26 14:46:43 +02:00
Maxime Leroy 123dc78f2b Fixing Curve2D/3D baked interpolated values
If bake interval is a multiple of the curve length, the curve would return NaN for some offset values (when `frac == 0.0`, it matches the start and end of the curve segment so `fmod == 0.0`, `frac` becomes NaN)

```
# Godot 3.1.1
var c = Curve3D.new()
c.add_point(Vector3())
c.add_point(Vector3(0.5,0,0))
c.add_point(Vector3(1,0,0))
c.bake_interval = 0.5
c.interpolate_baked(0.5) == Vector3(NAN, NAN, NAN)

```

(cherry picked from commit 6bd271139d)
2019-09-26 14:46:25 +02:00
MJacred f1fdaf32f3 Fix application window not listed in taskbar (X11)
* for executable
* for editor and exported executable (on older Cinnamon versions)

(cherry picked from commit 1d86929dcb)
2019-09-26 14:45:39 +02:00
XiaoLongHan d585b1a5b1 fix file system not refresh on exFAT
(cherry picked from commit 9d309096c9)
2019-09-26 14:45:02 +02:00
AnthonyYoManz 41f6a800bd Fix Crash On Close When 3D Is Disabled
(cherry picked from commit fc65cc64b9)
2019-09-26 14:44:20 +02:00
Andrii Doroshenko (Xrayez) 9114357bc5 Fix BMP loader to distinguish between compression types
Some of the values in compression enumeration represent uncompressed formats:

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-b77f-35d0feaf7a57

This allows the loader to proceed with uncompressed formats.
Note that loading compressed BMP's is still not supported.

(cherry picked from commit 422a8ffe02)
2019-09-26 14:42:51 +02:00
Andrii Doroshenko (Xrayez) f8dce7ade9 Fix BMP loader incorrectly interpreting color table size
Color table should exist for images with bit count <= 8. Importing 16-bit
BMP images could also likely have a color table but they're not currently
supported in Godot.

(cherry picked from commit d5c5aabbf2)
2019-09-26 14:42:13 +02:00
Andrii Doroshenko (Xrayez) 5dd3d3dadf Import 4/1 bit bmp images
Add some sanity checks according to bmp specification.

Read color table and index data within the same scope and
then simply extend the color palette.

This particular implementation has one limitation: not all 4/1 bit images
can be imported as it requires bit unpacking (size dimensions must be
a multiple of 8 for 1-bit and 2 (even) for 4-bit images).

(cherry picked from commit 6484da5721)
2019-09-26 14:41:27 +02:00
Shinryuuji c6ee986f53 Add support for 8bpp bmp files
(cherry picked from commit b9578b8f46)
2019-09-26 14:41:04 +02:00
xDGameStudios 6b07e4b535 Fixed optional idx argument in add_item (OptionMeny & PopupMenu)
(cherry picked from commit ffc5f360e8)
2019-09-26 14:32:01 +02:00
Anish Bhobe fdb94e3409 Fixes physic_fps=0 bug.
Added a condition to check if the loop exited without iteration
being run by checking the return value from idle().

Fixes: #26321
(cherry picked from commit 3c27980a17)
2019-09-26 14:31:38 +02:00
Rémi Verschelde 9bd5501a22 Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@merumelu, @sparkart

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 41beecaa08)
2019-09-24 13:20:58 +02:00
Rémi Verschelde 1018079219
Merge pull request #32303 from akien-mga/3.1-bullet-clang8
bullet: Backport upstream patch to fix clang 8 build
2019-09-24 13:17:30 +02:00
Rémi Verschelde 471daf4773 bullet: Backport upstream patch to fix clang 8 build
Fixes #32301.
2019-09-24 11:21:30 +02:00
Rémi Verschelde 300838dad2
Merge pull request #31531 from akien-mga/3.1
Assorted cherry-picks from the master branch for Godot 3.1.2
2019-09-24 10:05:49 +02:00
Fabio Alessandrelli 138aeeabb9 Fix HTML5 export after #30864
(cherry picked from commit e7760deb74)
2019-09-24 09:00:56 +02:00
Vasiliy Makarov d3422f8cf7 Fix pvrtc encoder
Always resize image to square of power2
Enable mipmaps only if original texture has it enabled
Fix #28534, #28541

(cherry picked from commit 4009d26022)
2019-09-24 09:00:46 +02:00
Michael Alexsander Silva Dias e40293942d Regression fixup to the theme editor
(cherry picked from commit b7c2bcff76)
2019-09-24 09:00:46 +02:00
Michael Alexsander Silva Dias 7ff607290a Minor fixups to the theme editor
(cherry picked from commit 1c872c75db)
2019-09-24 09:00:46 +02:00
Ken Paulson f0039bd18b Added TranslationServer::get_loaded_locales to return an array of all locales with a loaded Translation
(cherry picked from commit 6b117c44fb)
2019-09-24 09:00:46 +02:00
Chaosus 9953b2ab43 Disallow loopback connection in visual scripts and visual shaders
(cherry picked from commit 21ca9f6c7c)
2019-09-24 09:00:46 +02:00
Rémi Verschelde 6cd6d3aa16 Also disable C and C++ specific warnings in thirdparty code
Move the `Append` up to make sure that the keys exist and avoid the
need to check `if CPPFLAGS in self`, etc.

(cherry picked from commit 8d867cf7c5)
2019-09-24 09:00:45 +02:00
qarmin 49bbec08e2 Disable Project Export button after deleting preset
(cherry picked from commit 2fc2d82465)
2019-09-24 09:00:45 +02:00
Carsten Klein 693f3c9d62 Call minimum_size_changed() on redo/undo if expand_to_text_length is true
Fixes #28241

(cherry picked from commit da2a0a3814)
2019-09-24 09:00:45 +02:00
Andrii Doroshenko (Xrayez) f6c0078264 Fix TGA indexed images loaded with flipped color table
This fixes incorrect color table lookup where red and blue channels were flipped.

(cherry picked from commit d0f0f1f1cb)
2019-09-24 09:00:45 +02:00
Michael Alexsander Silva Dias 660acc3913 Fix 'LineEdit' offset limit not accounting for the right/clear icon width
Fully fixes #28242.

(cherry picked from commit ac1c523989)
2019-09-24 09:00:45 +02:00
Michael Alexsander Silva Dias 8e7f5c8628 Fix 'LineEdit' contents not ending before the clear button if no right icon was set
Fixes #28242.

(cherry picked from commit d84acb98d0)
2019-09-24 09:00:45 +02:00
Kenneth Lee aa36c0c56c Fixes build for Windows cross-compilation
Fixes #28299

(cherry picked from commit 5c5c3a590a)
2019-09-24 09:00:45 +02:00
KLee1248 2e5fa9f043 Use SHGetKnownFolderPath instead of SHGetFolderPathW.
When getting system directories for Windows, we currently use
SHGetFolderPathW. This is a deprecated function and doesn't support
"Downloads" folders.

As a replacement, this commit uses the newer SHGetKnownFolderPath
function, which is supported since Windows Vista. Godot 3.0 only
supports Windows 7+, so we don't need to use SHGetFolderPathW for
backwards compatibility.

Fixes #26876

(cherry picked from commit 3d908f57d8)
2019-09-24 09:00:45 +02:00
Vasiliy Makarov 3cb47c9b66 Make Xcode recursive search frameworks in project dir
(cherry picked from commit 641922782e)
2019-09-24 09:00:45 +02:00
Matheus Lima Cunha 1e5709265c Move vertex along a single axis while editing and holding shift
(cherry picked from commit 0110a88547)
2019-09-24 09:00:45 +02:00
Hugo Locurcio 614dbe74e2 Scale animation track editor line widths on hiDPI displays
(cherry picked from commit c0959f00a0)
2019-09-24 09:00:45 +02:00
Anders Stenberg e18f18dbec Proper passing of the "transform_key_request"
signal from SpatialEditorViewport to InspectorDock

(cherry picked from commit 645c656571)
2019-09-24 09:00:45 +02:00
Jean Dao b6ab75504b Fix: use function in SceneTree::call_group
When calling call_group from C++, the function name is not passed on to
call_group_flags, resulting in first argument being mistakenly used
instead of function.

(cherry picked from commit 7240701ec9)
2019-09-24 09:00:45 +02:00
ShyRed a849625813 Fix missing re-activation of bullet physics sleep feature
Adds the missing option of re-enabling the sleep feature in bullet physics once a body had the sleep feature disabled.

(cherry picked from commit 0877cf6419)
2019-09-24 09:00:45 +02:00
hbina085 8c2e10c393 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009)
2019-09-24 09:00:45 +02:00
Rémi Verschelde fc18d637a8 Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.

(cherry picked from commit fc370b3feb)
2019-09-24 09:00:45 +02:00
qarmin 3b703d6707 Small fixes, mostly dupicated code
(cherry picked from commit 856a8226a5)
2019-09-24 09:00:45 +02:00
Theis Egeberg a2cf479f07 Removed extra division by format channels causing sounds to get halved.
(cherry picked from commit e630591aea)
2019-09-24 09:00:45 +02:00
Theis Egeberg 330c7a2fb4 Fix end pops when trimming wav files
-Added trim limit constant at top of file, defining at which db trimming should occur (moved from being in the code itself)
-Added fade out frames constant at top of file, defining how many frames should have fade out applied (to avoid pops at the end of trim)
-Rewrote parts of the trimming logic to use an average of volume across all channels instead of any particular channel
-Added fade-out to trimming

(cherry picked from commit 26cc521d55)
2019-09-24 09:00:44 +02:00
Guilherme Felipe 21d3ad2e52 Continuation of #27562
[AnimationTree] Fix scale interpolation

(cherry picked from commit dbda5b6700)
2019-09-24 09:00:44 +02:00
Tomasz Chabora 25074c734d Use filename for scene root of imported models
(cherry picked from commit 82fadde680)
2019-09-24 09:00:44 +02:00
Paul Trojahn f5def1329e Support UTF-8 in TextEdit and LineEdit navigation
This allows jumps over whole non ASCII words with Ctrl+Left/Right in
a LineEdit or TextEdit.
Fixes #25681

(cherry picked from commit 8851e16f75)
2019-09-24 09:00:44 +02:00
Paul Trojahn af3b157517 Support UTF-8 input action names
Fixes #26380

(cherry picked from commit a7430a9d06)
2019-09-24 09:00:44 +02:00
Ibrahn Sahir 78a7f945e4 Removed an unused and leaked CheckButton instance in theme editor plugin
(cherry picked from commit cbf2d3cdc4)
2019-09-24 09:00:44 +02:00
Michael Alexsander Silva Dias 28d48a0886 Enhance theme preview
(cherry picked from commit 5dfbdbcd0b)
2019-09-24 09:00:44 +02:00
Bojidar Marinov ef6807b34c Fix remote scene tree root folding
Fixes #25487

(cherry picked from commit 72472bef05)
2019-09-24 09:00:44 +02:00
Guilherme Felipe 6319d662af [StateMachine] Fix play position
Continuation of 771fbd282a

(cherry picked from commit 0fcbf4da8f)
2019-09-24 09:00:44 +02:00
Guilherme Felipe be47e0546d Show play position of sub state machine
Sub state machine now show the play position of the current state
playing.

(cherry picked from commit 771fbd282a)
2019-09-24 09:00:44 +02:00
UziMonkey cb0e500d27 Add sub-resource name when available to script editor
(cherry picked from commit 7056c825a3)
2019-09-24 09:00:44 +02:00
Mateus Felipe C. C. Pinto 8946ac9616 Make AnimatedSprite.animation complain when invalid animation name
(cherry picked from commit 2933ef42f7)
2019-09-24 09:00:44 +02:00
mellondill 3078f723a8 https://github.com/godotengine/godot/issues/31297 - HTML5: this.rtenv.callMain is not a function when using latest-upstream backend
Added needed changed for normal compiling with emscripten 1.38.41 and later

(cherry picked from commit 3c176827d6)
2019-09-24 09:00:44 +02:00
Emmanuel Barroga 45e4f467e7 Fix ProgressBar Wrong Value with Border
Closes: #30969

The FG rectangle of the progressbar is incorrect when dealing with a non-zero border. This issue stems from wrong order of operations when drawing the rectangle: int p = r * get_size().width - mp;


(cherry picked from commit 7db96e22dd)
2019-09-24 09:00:44 +02:00
Rémi Verschelde b7e2266dc5 jpgd.h: Backport security vulnerabilities fixes from Google Android
Squashed version of https://github.com/richgel999/jpeg-compressor/pull/10
with the line endings fixed (DOS to Unix).

See https://github.com/richgel999/jpeg-compressor/pull/10 and #30952
for details. Relates to CVE-2017-0700.

Fixes #30952.

(cherry picked from commit 5c333270ed)
2019-09-24 09:00:44 +02:00
Fabio Alessandrelli 2a837d525f Add NULL-terminator the string passed to strtol.
This is actually expected by the function although it was apparently
working in GCC without the terminator, it breaks (at least some) clang
versions.

(cherry picked from commit 2f91e250f6)
2019-09-24 09:00:44 +02:00
Rémi Verschelde 8acaac10b6
Merge pull request #30864 from enzogupi/patch-1
HTML5 default loader: small bugfix
2019-09-03 13:32:40 +02:00
Rémi Verschelde 0db32ced78
Merge pull request #31712 from volzhs/fix-vibrate-3.1
Suppress MissingPermission warning for Android vibration
2019-08-27 17:42:24 +02:00
volzhs 3178dee53c Suppress MissingPermission warning for Android vibration
It does check its permission every `vibrate_handheld()` calls.
Vibrate permission is added by checking it on export settings.

And there are some changes for deprecated method.
2019-08-27 22:02:22 +09:00
Enzo Ferrari a5a413c7e9 Fixed javascript code to remove animateStatusIndeterminate callback when the game is loaded. 2019-08-23 21:33:18 +02:00
Rémi Verschelde 2c63c27ef1
Merge pull request #31438 from volzhs/vibrate-mobile-3.1
Support vibration for Android and iOS
2019-08-21 21:10:46 +02:00
volzhs 081751172a Support vibration for Android and iOS 2019-08-22 00:05:11 +09:00
Rémi Verschelde bac75bf0c2
Merge pull request #31493 from aaronfranke/mono-3.1-serial-ign
[3.1] [Mono] Backport serializable attributes and backport gitignore files
2019-08-20 13:04:11 +02:00
Aaron Franke 3a7aa3a0e4
[3.1] [Mono] Make all structs serializable
Manually cherrypicked from https://github.com/godotengine/godot/pull/31191
2019-08-19 19:23:18 -04:00
Aaron Franke 329817edad
[3.1] [Mono] Backport gitignore files
This avoids seeing files generated on master when switching to the 3.1 branch.
2019-08-19 19:19:21 -04:00
Rémi Verschelde 76776d181f Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@Anutrix, @hbina, @santouits

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 6d6b9ccc9a)
2019-08-02 09:44:54 +02:00
Rémi Verschelde d84e9f2948 Update AUTHORS and DONORS list
New contributor added to AUTHORS:
@aqnuep

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit ab1cb10317)
2019-08-02 09:44:50 +02:00
Rémi Verschelde a5082c010a doc: Fix invalid tags or properties introduced in recent cherry-picks 2019-07-29 17:55:20 +02:00
Chris Bradfield 2a9c2d95f5 [DOCS] Correct "fixed process" reference in KinematicBody doc
(cherry picked from commit 7f4059ceb7)
2019-07-29 17:47:46 +02:00
Michael Alexsander Silva Dias eef5dc98fa Update some dead links in the codebase
(cherry picked from commit 12ae7a4c02)
2019-07-29 17:47:46 +02:00
FlamyAT 5a8fad0f4e Documents the need for input_pickable in _input_event
Update CollisionObject2D.xml

Added member tags to missing docs

(cherry picked from commit 9a84cef4fc)
2019-07-29 17:47:46 +02:00
Hugo Locurcio 61eb6b5180 Improve the Variant class documentation
Taken from
https://docs.godotengine.org/en/latest/development/cpp/variant_class.html.

(cherry picked from commit 4840d36654)
2019-07-29 17:47:46 +02:00
unknown dbbbf7a7f4 AStar and AStar2D examples fixed to not use 'as' keyword and also removed error causing code
(cherry picked from commit d7cf3c8e72)
2019-07-29 17:47:46 +02:00
FlamyAT 4e07bab968 Added missing InputEvent documentation
(cherry picked from commit 2046d7b87a)
2019-07-29 17:47:46 +02:00
Meriipu 81ac9c9afb Document Tree column behaviour of min_width in conjunction w expand
(cherry picked from commit 94c5e6a97e)
2019-07-29 17:47:46 +02:00
Nathan Warden 0d4f6463f9 Completed documentation for BakedLightmap node.
(cherry picked from commit 643ea41c68)
2019-07-29 17:47:46 +02:00
Hugo Locurcio 1f8470eaf2 doc: Mention `Input.MOUSE_MODE_CAPTURED` is raw on Windows and Linux
(cherry picked from commit f4e99e2e39)
2019-07-29 17:47:46 +02:00
hbina085 f45b8c36fd Clarify what %APPDATA% expands to in Windows
Linux users should be familiar with "~" so I think it might be unnecessary.
Also changed the file separator in the description to use Windows' instead.

(cherry picked from commit 5f68ae93b5)
2019-07-29 17:47:46 +02:00
lmp f011721a6e Clearify how hex_to_int expects a '0x' prefixed string. Provide a small hex_to_int example
(cherry picked from commit cebb38e0b3)
2019-07-29 17:47:46 +02:00
Remi Rampin 417f223e63 DOC: Fix spelling
See also https://github.com/godotengine/godot-docs/pull/2595

(cherry picked from commit ddfd67401f)
2019-07-29 17:47:46 +02:00
Tomasz Chabora 6891c942a1 Clarify better what Node.raise does
(cherry picked from commit a26f52db33)
2019-07-29 17:47:46 +02:00
Marco Costa e9f4886253 Document constants in Transform/Transform2D
(cherry picked from commit f99e84d180)
2019-07-29 17:47:46 +02:00
Hugo Locurcio d81ca21a6c Fix Nintendo buttons in the @GlobalScope documentation
These were mistakenly referred to as DualShock buttons.

(cherry picked from commit 398219a80e)
2019-07-29 17:47:46 +02:00
Rémi Verschelde 0cccb6b4fa doc: Complete GlobalScope documentation
(cherry picked from commit 5aafc62a9b)
2019-07-29 17:47:46 +02:00
unknown 7dd98f3de7 Added descriptions to OS.get_splash_tick_msec() and OS.get_window_safe_area()
(cherry picked from commit f2fd5dfb91)
2019-07-29 17:47:46 +02:00
tree786 37e9ec842c doc: UPNP: Add example on how to open/close a port
I have added a small code sample to show how to automate the process of port forwarding (and closing after you are done).
Thanks to @mhilbrunner for explaining how to achieve t0his (see #18780)

(cherry picked from commit 2a63853720)
2019-07-29 17:47:46 +02:00
Zak 3e8b2d2063 Document SpinBox node
(cherry picked from commit f9cbd34fe0)
2019-07-29 17:47:46 +02:00
Zak baebe22ab0 Document PopupMenu node.
(cherry picked from commit 316931998c)
2019-07-29 17:47:46 +02:00
Tomasz Chabora e7899b9e35 Clarify docs for _ready and request_ready
(cherry picked from commit b71a339160)
2019-07-29 17:47:46 +02:00
Rémi Verschelde 383c678a1e doc: Replace all [code]CONSTANT[/code] by new [constant CONSTANT] hyperlinks
(cherry picked from commit bc82781f7d)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 7a97fd99c7 Properly expose all Error constants to scripting languages
(cherry picked from commit 1bf448dd87)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 755896b036 doc: Complete and harmonize all _MAX constant descriptions
(cherry picked from commit 86ed7a9884)
2019-07-29 17:32:53 +02:00
tree786 128eaa2718 Added example on how to use RandomNumberGenerator
(cherry picked from commit 68c6790baf)
2019-07-29 16:37:29 +02:00
Rémi Verschelde 055f9f075f doc: Proofread and complete various nodes
All 100% completed: MainLoop, Node, Object, Path, Performance,
Reference, Resource, SceneState, SceneTree, UndoRedo.

Also fixed some en_GB occurrences as the reference spelling is en_US.

(cherry picked from commit 867dda1124)
2019-07-29 16:35:23 +02:00
Rémi Verschelde ef5b885492 doc: Document NodePath.
(cherry picked from commit 6e9272eea8,
without the Node logic changes)
2019-07-29 16:26:42 +02:00
Rémi Verschelde 558e268edd doc: Document EncodedObjectAsID, expose its property
(cherry picked from commit a9cff880d6)
2019-07-29 16:20:25 +02:00
Marc Gilleron 021347e178 Document VisualServer.instances_cull_ray
(cherry picked from commit cb5233ee12)
2019-07-29 16:19:36 +02:00
Rémi Verschelde b8d29b5c66 doctool: Fix writing theme_item descriptions
We already had support for parsing and saving theme_item descriptions
in DocData, and displaying it in the editor, but doctool would drop the
changes as it was not writing them back to the XML.

Part of #29868.

(cherry picked from commit 615ffb3507)
2019-07-29 16:18:48 +02:00
Chaosus 67efb30f2a Extends wrapi/wrapf docs
(cherry picked from commit 4c137bebe8)
2019-07-29 16:17:43 +02:00
austinried 2f30fb9fec Remove references to mouse stuff from OS
There is nothing in `OS` about mouse grabbing or mouse cursors, that's in `Input`, so I'm cleaning up those references.

(cherry picked from commit 9eeead4be3)
2019-07-29 16:17:13 +02:00
Randall Fulton f8ee310b69 Call out scaling in Spatial.translate docstring
This fixes issue #26938.

(cherry picked from commit bdf51e8e49)
2019-07-29 16:16:58 +02:00
Zak 6f637b2bf3 Document MarginContainer Node
(cherry picked from commit 9f582a7c3e)
2019-07-29 16:16:39 +02:00
Randall Fulton 1137ccb050 Add docstring for Object.set_deferred
(cherry picked from commit 6843ad87a4)
2019-07-29 16:16:03 +02:00
Hugo Locurcio a08141120e Improve the `Engine.get_version_info()` documentation
This documents some keys that were missing and improves formatting.

(cherry picked from commit 03335e5250)
2019-07-29 16:15:37 +02:00
Zak 02a8c1d9fe Document ReferenceRect Node
Added missing documentation for ReferenceRect Node

(cherry picked from commit 5d0040e340)
2019-07-29 16:15:09 +02:00
unknown 29fbb408ec Added description to is_pixel_opaque() in Sprite.xml
(cherry picked from commit 44a20a0f61)
2019-07-29 16:06:02 +02:00
Rémi Verschelde 0893bb9a02 doc: Improve docs for Resource* classes
Also move module-specific classes to their own module's `doc_classes`
folder.

(cherry picked from commit 0764451dc5)
2019-07-29 16:05:01 +02:00
Zak b279f225c0 Document TextEdit node
(cherry picked from commit 1f81981b3d)
2019-07-29 16:01:14 +02:00
Nathan Lovato 040e1dd411 Add documentation for Bone2D
(cherry picked from commit c12fc1ade1)
2019-07-29 16:00:15 +02:00
Zak 7cd696f1b5 Document ItemList control
(cherry picked from commit 49df253627)
2019-07-29 15:59:52 +02:00
Ertain 0e21648419 Corrected spelling error
(cherry picked from commit 7a397d6976)
2019-07-29 15:59:34 +02:00
tree786 ffab827683 Update VehicleWheel.xml
It seems (please correct me if you understand it otherwise) that the description for the `get_skidinfo()` function is the inverse of what actually happens. I have run some simple tests, and it looks like setting low `Friction Slip` (e.g. try `1` or `2`) causes more skidding and returns smaller values for `get_skidinfo()`, while when the `Friction Slip` is increased, the car skids less and values printed to the console increase (get closer to `1.0`). So it seems that a value of `0.0` means skidding, while a value of `1.0` means no skidding (the description says the exact opposite to this, from what I understood).

(cherry picked from commit e9b8ff273d)
2019-07-29 15:58:53 +02:00
Nathan Lovato a9d7f2ed9b Add documentation for AnimationNode* resources
I haven't put [code] bbcode around the amount of the AnimationNodeAdd* classes
because it's not exposed to GDScript.
Same for the +add, -add, etc. labels: they're just labels you can find in the
AnimationTree bottom panel.

(cherry picked from commit d0eb99f970)
2019-07-29 15:58:36 +02:00
Maxime Leroy a6316d8a56 Adding details about `Image.lock()` function
(cherry picked from commit f1e2324605)
2019-07-29 15:57:41 +02:00
Maxime Leroy 8947e9f438 Fixing returned alpha component for inverted method
See `core/color.cpp:217`, alpha channel is not changed.

(cherry picked from commit 024d595850)
2019-07-29 15:57:21 +02:00
Ken Paulson d05f673669 Changes to OS.has_feature() docs:
- Added link to the Feature Tags documentation
 - Added note that tag names are case-sensitive

(cherry picked from commit 349e924cad)
2019-07-29 15:56:42 +02:00
Aspin 26e25a8c1b More accurate description of valid Parents
I hope this is the right place to edit now.

(cherry picked from commit a9ddf2a449)
2019-07-29 15:55:34 +02:00
Chaosus cd662249f5 Fix smooth_step to smoothstep docs
(cherry picked from commit d725e4e6c0)
2019-07-29 15:50:58 +02:00
Hugo Locurcio c8944e380a Document built-in LineEdit keybindings
(cherry picked from commit 9b86233e32)
2019-07-29 15:50:07 +02:00
StraToN 6175fe2511 Adds a meta on top of every generated class to hide 'Edit on Github' link
Linked docs issue https://github.com/godotengine/godot-docs/pull/2656

(cherry picked from commit d83b8881ae)
2019-07-29 15:26:33 +02:00
Nathan Lovato 8d69f1651c Improve the documentation of the Object class
I edited the main description to remove parentheses and split long sentences.

Closes #29382
Closes #29384

(cherry picked from commit 21a0dad58a)
2019-07-29 15:19:47 +02:00
Andrii Doroshenko (Xrayez) d83e80e039 Make KinematicBody docs consistent regarding `test_only` argument
This simply makes the `move_and_collide` method descriptions in
both 2D and 3D to be in sync.

Co-authored-by: 2DemiGods <2DemiGods@users.noreply.github.com>
(cherry picked from commit 8ba50823c4)
2019-07-29 15:19:21 +02:00
Chris Bradfield 8f8bae9ba5 [DOCS] Update CPUParticles[2D] classref
(cherry picked from commit 9f7713d98b)
2019-07-29 15:19:06 +02:00
clayjohn 2e58e3dbe8 filled out docs for various mesh types
(cherry picked from commit ef45f5ce75)
2019-07-29 15:17:17 +02:00
Zak efee888a6e Improved documentation of rsplit Method for String class.
Improved documentation of rsplit Method for String class.

Removed "divisor" (i will also change variants_call.cpp) and added "delimiter" in its place. Also moved the example at the bottom of the description.

(cherry picked from commit 1a397f46e6)
2019-07-29 15:16:59 +02:00
Maxime Leroy 5dd0ed81a1 Adding missing description for method and fixing typo
(cherry picked from commit 77b6f3e812)
2019-07-29 15:16:38 +02:00
Rémi Verschelde 24f17f2208 doc: Fix DocData.merge_from copying old setters and getters
This is not necessary and means that some setters and getters
can end up wrong if they are changed in the bindings but DocData
does not update them when running --doctool.

Fixes #29425.

Co-authored-by: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
(cherry picked from commit e1e3fcc908)
2019-07-29 15:16:17 +02:00
Nathan Lovato d54733eba3 Improve @GDScript.assert documentation
Mention that assert only runs in debug builds, closes #29154

(cherry picked from commit 6f1f887078)
2019-07-29 15:15:22 +02:00
Cheeseness 2bfd81d49d Correct typos in RigidBody axis lock documentation
(cherry picked from commit b06dc6ba8c)
2019-07-29 15:15:03 +02:00
follower 1e5c7d0a23 Improve AudioStreamSample documentation.
"Squash" of #27928.

Wording based on suggestions by @LikeLakers2.

(cherry picked from commit a3aa98cb88)
2019-07-29 15:14:49 +02:00
Hugo Locurcio 78a24be155 Improve the PrimitiveMesh-derived class documentations
(cherry picked from commit 30474b8215)
2019-07-29 15:14:33 +02:00
Tomasz Chabora 320b361e16 Add example usage for get_rect()
(cherry picked from commit fbf4135fc1)
2019-07-29 15:13:52 +02:00
Michael Alexsander Silva Dias e2e5e4c44e Add "GUI skinning" tutorial link to the 'Theme' doc
(cherry picked from commit b3c2305160)
2019-07-29 15:13:30 +02:00
Sean Heffernan d846a0aaa3 Change "Return" to "Returns" where necessary in XML documentation
In many of the XML files it had been noted that when the documentation
refers to a return value, both "Return" and "Returns" are used. This
has now been fixed to only say "Returns".

Fixes #28867

(cherry picked from commit 426bcc9941)
2019-07-29 15:12:52 +02:00
Chris Bradfield ce786bd100 [DOCS] Add descriptions to AnimationNodeStateMachine[Playback]
(cherry picked from commit 47b8615a2e)
2019-07-29 15:07:29 +02:00
Rémi Verschelde eae0ef9a80 doc: Document default value for PhysicsBody collision layers
Supersedes #28971.

Co-authored-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit f3b8fe47b0)
2019-07-29 15:06:01 +02:00
Ryan Roden-Corrent 99f15173c1 Clarify auto_advance.
Make the docs more clear about how you can use auto_advance. Calling it
a "variable" is vague, so I updated the docs to clearly state that it
becomes a boolean parameter on the AnimationTree.
Fixes godotengine/godot-docs#2439.

(cherry picked from commit 20168b5fbf)
2019-07-29 15:05:44 +02:00
volzhs 086895604a Add description for EditorPlugin.update_overlays
(cherry picked from commit 5fe2bf125a)
2019-07-29 15:05:20 +02:00
Michael Alexsander Silva Dias 044f0abbd9 Add "String Formatting" tutorial link to the 'String' doc
(cherry picked from commit 3197898c88)
2019-07-29 15:05:04 +02:00
Hugo Locurcio 8b8a9049b7 Improve the CanvasItem documentation
This makes it clear that line width and antialiasing in
`draw_multiline()` aren't implemented yet (see #16448).

(cherry picked from commit 1cfa74bf92)
2019-07-29 15:04:21 +02:00
Guilherme Felipe 2dd7121841 Docs: Add tutorials for KinematicBody2D
(cherry picked from commit 36e9af4812)
2019-07-29 15:03:15 +02:00
Ken Paulson 00c00ab083 Improved the AnimatedSprite docs; added description to speed_scale.
(cherry picked from commit ece6d37eef)
2019-07-29 15:02:27 +02:00
clayjohn a7c76e8bb1 changed references to array types in arraymesh doc
(cherry picked from commit e8858a9a44)
2019-07-29 15:01:56 +02:00
Rémi Verschelde ba8cf0431d makerst: Fix format of [url] links in reST
Moved some logic to make_url in an attempt to reuse it in the parser,
but it proved too complex so I ended up not using it. I kept it as a
separate method nevertheless.

(cherry picked from commit c7246d8e1e)
2019-07-29 15:00:48 +02:00
Stanislav 6521d64c46 Add support for [url=] tag to makerst.py
Fixes #28904

(cherry picked from commit 102f73b88a)
2019-07-29 14:57:10 +02:00
Hugo Locurcio 728d1eee4f Improve the ProjectSettings documentation
(cherry picked from commit 436d000066)
2019-07-29 14:55:20 +02:00
Tomasz Chabora dea5dafea5 Consistently wrap booleans in [code]
(cherry picked from commit b0846f60c9)
2019-07-29 14:54:32 +02:00
follower fa2f739ee0 Add example of loading a font from .ttf file
As this is a multi-step process it would be nice to have this documented.

(cherry picked from commit c89cc44a5e)
2019-07-29 14:52:11 +02:00
kbake e14226ebd4 fixes 27543, adds a copy button for the editor log
(cherry picked from commit aa4e27084f)
2019-07-24 14:11:33 +02:00
qarmin e766b16e95 Fix invalid crash in mesh_add_surface
(cherry picked from commit 99ba021404)
2019-07-17 09:51:28 +02:00
clayjohn 480d87e7c8 do not compute fog when using unshaded in GLES2
(cherry picked from commit 3365595254)
2019-07-17 09:50:54 +02:00
clayjohn 39f3a575d6 fix no depth test and render_priority sorting
(cherry picked from commit 2abe7deae8)
2019-07-17 09:50:37 +02:00
Marcus Brummer 055004c589 Prevent GLES2 bool uniforms from having a precision type set.
When setting the default precision type for uniforms (before compiling
the shader) prevent boolean uniforms from having one set. Booleans can't
have a precision type and on some Android devices this caused a
compilation failure.

Fixes #30317

(cherry picked from commit 10f1e0f63a)
2019-07-17 09:50:16 +02:00
Marcus Brummer c441a2921d Use highp precision for gles2 shader uniforms if not explicitly set.
The use of different default precision values (highp in vertex; mediump
in fragment) for uniform variables caused the shader program to not link properly on some android
devices/emulators.

(cherry picked from commit 502dbc7c4a)
2019-07-17 09:50:00 +02:00
Daniel Rakos a670c66457 Fix texture resource reload bug
If a non-imported texture resource file (e.g. DDS) gets updated the editor
doesn't reload it. The cause of the problem is two-fold:

First, the code of ImageTexture assumes that textures are always imported
from an image, but that's not the case for e.g. DDS. This change thus adds
code to issue a resource reload in case an image reload is not possible
(which is the case for non-imported texture resources).

Second, the code is filled with bogus calls to Image::get_image_data_size()
to determine the mipmap offset when that should be done using
Image::get_image_mipmap_offset(). Previous code literally passed the integer
mip level value to Image::get_image_data_size() where that actually expects
a boolean. Thus this part of the change might actually solve some other
issues as well.

To be pedantic, the texture_get_data() funciton of the rasterizer drivers is
still quite a mess, as it only ever returns the whole mipchain when
GLES_OVER_GL is set (practically only on desktop builds) but this change does
not attempt to resolve that.

(cherry picked from commit e34eb5c26c)
2019-07-17 09:49:34 +02:00
clayjohn c3fd38027e Fixed GLES2 transparency order
(cherry picked from commit 7ae3809f4b)
2019-07-17 09:49:12 +02:00
Guilherme Souza f8f66e5b7a Adds flag AMBIENT_LIGHT_DISABLED to GLES2
Signed-off-by: Guilherme Souza <gdsdsilva@inf.ufpel.edu.br>
(cherry picked from commit 61a844aa61)
2019-07-17 09:48:53 +02:00
clayjohn ebaa06b2be fixes bug when setting projection matrix
(cherry picked from commit e37d723695)
2019-07-17 09:47:32 +02:00
Daniel Rakos 618290ba46 Mute errors on surface->index_array_len == 0 in the GLES3 renderer
This error is generated whenever rendering collision debug meshes.
There's no reason why this should be treated as an error as index-less
meshes are supported and used across the engine.

(cherry picked from commit 1dd98baaa6)
2019-07-17 09:47:15 +02:00
lawnjelly 3433017354 Fixes crash with rigged meshes on some OpenGLES2 devices
Non-tools OpenGLES2 devices that use the USE_SKELETON_SOFTWARE path (i.e. do not support float texture) depend on surface->data being set containing the bone IDs and weights (rasterizer_scene_gles2.cpp, line 1456, RasterizerSceneGLES2::_setup_geometry). However currently if TOOLS_ENABLED is not defined, surface->data is not stored in main memory in rasterizer_storage_gles2.cpp. This causes a crash in rasterizer_scene_gles2.cpp when a rigged object comes into view.

This fix addresses the specific case of skinned objects when USE_SKELETON_SOFTWARE is active, and stores a copy of the bone data, as is done when TOOLS_ENABLED is defined. This fixes the crash by allowing the same mechanism as on desktop, without adding the memory overhead of storing all vertex data where not required.

Fixes #28298

(cherry picked from commit e36e9fdb1c)
2019-07-17 09:43:16 +02:00
Guilherme Souza bb9a8a8132 Fix SHADOWS_DISABLED flag in GLES2
Signed-off-by: Guilherme Souza <gdsdsilva@inf.ufpel.edu.br>
(cherry picked from commit b363125568)
2019-07-11 11:25:31 +02:00
Rémi Verschelde df6a6a2004 doc: Sync classref with current source 2019-07-05 11:34:47 +02:00
Fabio Alessandrelli a24e681e1c Fix ENet incorrectly binding to wildcard.
Values were not properly initialized, and wildcard would evaluate to
true in most cases.

(cherry picked from commit abe2c22966)
2019-07-03 16:32:41 +02:00
Ibrahn Sahir 465056b6eb Check project settings live before lookup in crash handler
In x11, windows and osx crash handlers, check project settings exists
before looking up the crash handler message setting.
Avoids crashing the crash handler when handling a crash outside project
settings lifetime. Instead omitting the configurable message and
continuing with trace dump.

(cherry picked from commit 63068e2ccd)
2019-07-03 16:31:01 +02:00
James Buck 2854864130 Fix drawing of checkable editor properties
- Make text cutoff respect checkbox icon's width
  - Get checkbox icon from EditorIcons instead of CheckBox

(cherry picked from commit c230c6db98)
2019-07-03 16:30:26 +02:00
Hein-Pieter van Braam-Stewart d4704234b3 Don't try to statically allocate 2x 8193 pointers
Maximum stack size is only 8KiB, this will try to allocate 8193 *
sizeof(void*) * 2 = 131088 bytes on the stack. This causes a crash in
some cases.

(cherry picked from commit c52f890626)
2019-07-03 16:29:10 +02:00
KLee1248 e3b1f3c1ad Re-maps KEY_BRACELEFT/RIGHT for OSX users
Should fix #28098.

(cherry picked from commit 8cbfc0365b)
2019-07-03 16:21:30 +02:00
Bojidar Marinov 2bbf5a31ec Ensure --export implies --editor
Fixes #30149

(cherry picked from commit 9ebc146383)
2019-07-03 14:21:33 +02:00
Juan Linietsky c7293e9b30 Properly deal with clicking on audio stream change or stop (AudioStreamPlayer only)
(cherry picked from commit 040b59c010)
2019-07-03 13:19:40 +02:00
Juan Linietsky 89402e38c7 Revert "Fix AudioStreams::stop possibly causing a small noise"
(cherry picked from commit 60eec47077)
2019-07-03 13:19:40 +02:00
bruvzg c6e49cc0d9 [macOS] Allow using user provided `.icns` files for exported app icons.
(cherry picked from commit 22ee26849e)
2019-07-03 13:19:40 +02:00
hbina085 8cee39fe21 updated description of Array.shuffle to properly describe that it uses the same common seed at every runtime, thus being reproducible in general
(cherry picked from commit d02ecd5a18)
2019-07-03 13:19:40 +02:00
lopho d963a32213 Document dictionary erase return value
(cherry picked from commit 5ce9bfcb4f)
2019-07-03 13:19:40 +02:00
Thomas Karcher 31ba78e4bd Update of RigidBody2D class description
Added a hint in the RigidBody2D class description regarding the transformation issue mentioned in https://github.com/godotengine/godot/issues/5734

(cherry picked from commit 1170b78e28)
2019-07-03 13:19:40 +02:00
lopho 4c6327e426 Document CollisionObject2D pickable requires collision_layer
Documents CollisionObject2D mouse_entered, mouse_exited and input_event requiring at least one collision_layer to be set.

(cherry picked from commit da73bcca6f)
2019-07-03 13:19:40 +02:00
Jiří Procházka 3086084ace Small documentation improvements
(cherry picked from commit 04b49264f2)
2019-07-03 13:19:40 +02:00
Rémi Verschelde c31dba28e1 AppVeyor: Skip saving cache on non-master branches
Otherwise we run into situations where commits to stable branches
induce very long build times, as they have to basically build from
scratch but also invalidate the cache for future commits on the
master branch.

This commit also makes the cache folder branch-specific, but since
it's still limited to 1 GB of total cache size, we don't enable it
for non-master, as we would still run into issues with non-master
build invalidating the master cache.

(cherry picked from commit b021bdbf1f)
2019-07-03 07:45:24 +02:00
Rémi Verschelde 06123fac30 SCons: Default to builtin libpng/freetype on Linux
The rationale for keeping those shared by default is that they're typical
dependencies found on any Linux system, and it saves compilation time and
binary size to link their dynamically.

But since official builds default to all-builtin, and Debian/Ubuntu still
don't have libpng16 (which we now require) readily available on all their
supported releases, it's simpler to bundle all the things.

This does not change the fact that those dependencies *can* be unbundled
on Linux, it's only the default option changing.

(cherry picked from commit 1769cbc0e2)
2019-07-02 14:59:49 +02:00
hilfazer c7551515e3 autocomplete for enum values
(cherry picked from commit ca1932636f)
2019-06-27 09:59:58 +02:00
Rémi Verschelde e50eb830af i18n: Sync translations with Weblate 2019-06-16 21:45:24 +02:00
Rémi Verschelde 031fc3ed83
Merge pull request #29624 from aaronfranke/3.1-mono-atan2
[3.1] [Mono] Change Atan2 arguments to (y, x)
2019-06-12 21:02:14 +02:00
Aaron Franke a51257e2b7
[Mono] Change Atan2 arguments to Y X 2019-06-09 04:15:32 -04:00
Rémi Verschelde 7358e115c7 Update sponsors
Image Campus is no longer a Gold sponsor at this time.

(cherry picked from commit 328805ae31)
2019-06-04 12:58:03 +02:00
Rémi Verschelde 5f683f7c17 SCons: Clean xatlas SCsub from thekla/poshlib defines
Those are not used in xatlas.

(cherry picked from commit eb155bc91a)
2019-06-04 11:11:21 +02:00
Fabio Alessandrelli 0e6a49a5bc Freetype clone env for no-SMID single file
Fix freetype build issue for javascript platform.
When disabling optimizations (SMID) in specific freetype, source files,
we need to make sure to copy all other CPPFLAGS, not just override them.

(cherry picked from commit 4f9408a0f8)
2019-06-04 11:08:40 +02:00
Fabio Alessandrelli 20a37529f5 Revert "Update libwebsockets to 3.1 (plus UWP patch)"
This reverts commit 90210c4862.

(cherry picked from commit be414e4476)
2019-06-04 11:05:33 +02:00
Rémi Verschelde 98cf8a4476 libpng: Update to upstream 1.6.37
Fixes CVE-2019-7317.

(cherry picked from commit 225b61ab2a)
2019-06-04 11:03:10 +02:00
Rémi Verschelde c0e5875907 Update DONORS list
(cherry picked from commit 33bcd97700)
2019-06-04 11:00:49 +02:00
Rémi Verschelde bc5fc03c95 Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@Kanabenki, @KoBeWi

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 958c915f60)
2019-06-04 11:00:33 +02:00
Rémi Verschelde 8cfd371822
Merge pull request #29373 from akien-mga/3.1
doc: Make all tutorial links track "3.1" in 3.1 branch
2019-06-01 12:37:19 +02:00
Rémi Verschelde f156b2e1cd doc: Make all tutorial links track "3.1" in 3.1 branch
See discussion in #29104.
2019-06-01 11:39:37 +02:00
Rémi Verschelde bf7585530b i18n: Sync translation template with current source 2019-05-21 13:06:17 +02:00
Rémi Verschelde 239a11fe19 i18n: Sync translations with Weblate 2019-05-21 13:02:38 +02:00
Rémi Verschelde 7b38442173
Merge pull request #28782 from RyanStein/regex_sub_test_docs
Add RegEx substitution testcase and fix relevant docs
2019-05-11 08:49:41 +02:00
Ryan Stein a31bbb4bd9 Add RegEx substitution testcase and fix relevant docs 2019-05-09 11:11:53 -04:00
Fabio Alessandrelli bc577dc0c7 Bind AudioEffectSpectrumAnalyzer::FFT_Size enums
(cherry picked from commit d0f2b5c8ab)
2019-05-02 14:40:38 +02:00
Bastiaan Olij b2b112d703 Sort data exported to the api.json file for GDNative
(cherry picked from commit 0d2f3f4f50)
2019-05-02 14:40:03 +02:00
Hein-Pieter van Braam-Stewart e802da4e81 Bump to 3.1.2-devel
And onwards my friends!
2019-04-27 21:36:40 +02:00
Hein-Pieter van Braam-Stewart 66baa3b633 Also bump Info.plist for MacOS 2019-04-26 16:43:03 +02:00
Hein-Pieter van Braam-Stewart e4816a8b1c Bump to 3.1.1-stable
Thanks everyone! You're all stars <3
2019-04-26 16:39:11 +02:00
homer666 5b6ad923f0 AnimationPlayer FPS mode fixes
(cherry picked from commit e3b7f9e1ca)
2019-04-26 16:34:18 +02:00
Ignacio Etcheverry 1c77481d3e Fix invalid mono log file name on Windows
(cherry picked from commit d93c354807)
2019-04-26 16:31:01 +02:00
Rémi Verschelde a24899ee25 Revert "Update freetype to 2.10.0"
This reverts commit 9e2cf9ef0b.

It caused this regression: 28335.
Fixes #28335.
2019-04-25 14:18:42 +02:00
Rémi Verschelde f7d5bee636 Revert "C#: Add DynamicGodotObject class"
This reverts commit 4c10a322d1.
2019-04-25 14:08:14 +02:00
Rémi Verschelde 23cf9f3b6f i18n: Sync translation template with current source 2019-04-25 14:03:22 +02:00
Rémi Verschelde 348270df38 i18n: Sync translations with Weblate 2019-04-25 14:01:33 +02:00
Rémi Verschelde a485d862f1 doc: Sync classref with current source 2019-04-25 14:00:31 +02:00
Juan Linietsky fcbe50befa Added bindings for methods related to obtaining base an instance from VisualInstance
(cherry picked from commit 33a0011ab2)
2019-04-24 07:01:39 +02:00
Juan Linietsky 08113feb5f Expose visible instance count to multimesh
(cherry picked from commits f46899e922)
and 479649b5fb)
2019-04-24 07:01:04 +02:00
Rémi Verschelde 4764e17970 Revert "Added the ability to change the default cursor property for the RichTextLabel component."
This reverts commit 4fda05e15f.
2019-04-23 16:01:16 +02:00
Ignacio Etcheverry 39f1a110a1 Fix wrong method binds and registered class
(cherry picked from commit 2f3328a039)
2019-04-22 21:57:06 +02:00
Rémi Verschelde cab4921477 Revert "GDScript: Don't allow built-in scripts to use class_name"
This reverts commit 42514bfd80.

There is still an unsolved regression from this commit (#28002)
which needs to be addressed before cherry-picking this one.
2019-04-21 14:06:06 +02:00
Hein-Pieter van Braam-Stewart 4aa7760c74 Revert "Ensure non-emitting particles not processed on entering tree"
This reverts commit 24b7f08892.

This causes a particles regression in tps-demo
2019-04-21 00:59:13 +02:00
Hein-Pieter van Braam-Stewart 4fefc0896d Delete <demos> tag from HeightMapShape xml 2019-04-21 00:11:01 +02:00
Juan Linietsky d8cae6e7f6 Implement autokeying in Animation editor.
(cherry picked from commit 296c74072c)
2019-04-21 00:02:02 +02:00
Juan Linietsky a7f0bfb7db Oops I missed a line, continuation to 0d41f8f.
(cherry picked from commit 8f762aefcd)
2019-04-21 00:01:44 +02:00
Juan Linietsky 5cc03473e0 Also show length in FPS when using FPS mode for AnimationPlayer editor
(cherry picked from commit caaa492133)
2019-04-21 00:01:32 +02:00
Juan Linietsky 6fac922bff Add support for FPS snap in Animation Editor.
(cherry picked from commit 4203266923)
2019-04-20 23:57:59 +02:00
Juan Linietsky 0064d26517 Some improvements to is_equal_approx, restored Quat operator.
(cherry picked from commit dee98d3b6d)
2019-04-20 23:52:19 +02:00
Juan Linietsky c76c33fb50 Added generator audio stream, and spectrum analyzer audio effect
Made AudioFrame and Vector2 equivalent for casting.
Added ability to obtain the playback object from stream players.
Added ability to obtain effect instance from audio server.

(cherry picked from commit e33764744c)
2019-04-20 23:50:19 +02:00
Juan Linietsky 5e02d6d98a Avoid crash on changing snap mode when no animation exists, closes #28031
(cherry picked from commit 0d41f8fb00)
2019-04-20 23:49:20 +02:00
Chaosus 71753edeae Added normally distributed generation function to RNG
(cherry picked from commit 5f137925dc)
2019-04-20 23:39:04 +02:00
Martin Wallin ff3987598e Ignore default ccls cache folder and compile commands jso
(cherry picked from commit 8be9fd83ad)
2019-04-20 23:38:00 +02:00
Bastiaan Olij 49df4b7a7a Added height map shape that implement heightmap collision shape
(cherry picked from commit 8627f1515b)
2019-04-20 23:33:50 +02:00
Chaosus 6ab01490f5 Added smoothstep built-in function
(cherry picked from commit 514a3fb96a)
2019-04-20 23:30:56 +02:00
Chaosus 340bf6e80c Added direction_to method to vectors
(cherry picked from commit 55f3bd97a2)
2019-04-20 23:24:35 +02:00
Chaosus 9535a6079e Added functions to AStar for disable/enable points
(cherry picked from commit cc71fb2308)
2019-04-20 23:21:06 +02:00
ShyRed bb8f015595 Add converters / generators to Sprite
Adds the following menu options to the Sprite editor: "Convert to Mesh2D", "Convert to Polygon2D", "Create CollisionPolygon2D Sibling" and "Create LightOccluder2D Sibling"

(cherry picked from commit c218c631f6)
2019-04-20 23:19:55 +02:00
Michael Alexsander Silva Dias 94f6c3a810 Make AnimatedSprite able to play backwards
(cherry picked from commit 4a2c433028)
2019-04-20 23:17:21 +02:00
muiroc 42fa261563 Enable object decoding when serializing binary project settings
(cherry picked from commit 1f54b11da6)
2019-04-20 23:15:08 +02:00
Fabio Alessandrelli e0fe795433 Add object encoding param to serialization methods
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.

Break ABI compatibaility (API compatibility for GDNative).

(cherry picked from commit 393e62b98a)
2019-04-20 23:15:02 +02:00
Fabio Alessandrelli a1ad05df86 Multiplayer API now respects allow_object_decoding
Add doc about allow_object_decoding in PacketPeer

(cherry picked from commit 53ab3a1ba9)
2019-04-20 23:14:54 +02:00
Fabio Alessandrelli ffc47d6fbe Use same boolean for objects encode and decode.
In a very unintuitive move encode needed false to encode an object,
decode needed true to decode it.
They now need the same value: `true`.

(cherry picked from commit e61a074a8e)
2019-04-20 23:14:47 +02:00
Ignacio Etcheverry 9b65bd18bc Fix memory leak introduced in bb6814a
(cherry picked from commit 0338e55a6e)
2019-04-20 23:10:55 +02:00
Ignacio Etcheverry 4c10a322d1 C#: Add DynamicGodotObject class
Expands to Object.call, Object.set and Object.get for accessing members. This means it can also access members from scripts written in other languages, like GDScript.

(cherry picked from commit bb6814aef0)
2019-04-20 23:10:43 +02:00
Mariam Naiga 7851d828a2 Fix cursor color in Label/RTL in editor
Fixes #26246.

(cherry picked from commit d179cbc3c2)
2019-04-20 23:09:47 +02:00
Ignacio Etcheverry 17cb8878c7 Workaround for syntax highlighting issue in GitHub
(cherry picked from commit 7a4cf6339d)
2019-04-20 23:01:08 +02:00
ForLoveOfCats 24ac1439e8 Mono: Convert all items to string before printing
(cherry picked from commit 25f563c4c8)
2019-04-20 23:00:21 +02:00
Rémi Verschelde 1353c98279 FS dock: Allow deselecting items by clicking empty space
Fixes #27546.

(cherry picked from commit 3da2894d82)
2019-04-20 22:59:25 +02:00
Nuno Cardoso fce901ce40 Fixes #17233 allowing C# to override _GetPropertyList
(cherry picked from commit d011c8e109)
2019-04-20 22:56:42 +02:00
Tomasz Chabora a758b329d0 Save opened scenes when necessary
(cherry picked from commit 331f922359)
2019-04-20 22:50:16 +02:00
Ignacio Etcheverry c7e5b371be Mono: Logging improvements
- The default log level in debug builds is now 'info' instead of 'debug'.
- Add option to specify a different log level with the 'GODOT_MONO_LOG_LEVEL' environment variable.
- The name of log files is now a readable date and time.
- Always print the log file path (previously it was printed only it in verbose mode).

(cherry picked from commit 20e5e2fec7)
2019-04-20 22:49:26 +02:00
Bastiaan Olij edba82b940 Add camera permissions to android
(cherry picked from commit fab84c7dff)
2019-04-20 22:48:34 +02:00
volzhs 9e2cf9ef0b Update freetype to 2.10.0
(cherry picked from commit a6300b454d)
2019-04-20 22:42:45 +02:00
lupoDharkael 904bfa6a72 Validate scripts when they are loaded in the text editor
(cherry picked from commit f137166251)
2019-04-20 22:38:47 +02:00
Chaosus aa78461ebd Added possibilty to delete multiple nodes in visual shaders via Delete key
(cherry picked from commit 24faddc211)
2019-04-20 22:37:56 +02:00
Tomasz Chabora ab8ccee1da Focus SceneTree dock after creating new node
(cherry picked from commit 9432e06e05)
2019-04-20 22:37:13 +02:00
George Marques 42514bfd80 GDScript: Don't allow built-in scripts to use class_name
(cherry picked from commit e56f5d5c91)
2019-04-20 22:36:34 +02:00
Bojidar Marinov 667dc0b336 Check for subclasses when checking for name clashes
Fixes #27460

(cherry picked from commit ece09f9872)
2019-04-20 22:35:30 +02:00
Guilherme Felipe 40c2a5ff57 [AnimationNodeBlendTreeEditor] Usability improvements
- Add possibility to exclude multiple (selected) nodes.
- Add context menu (Right click) to add nodes.

(cherry picked from commit ccbf57611b)
2019-04-20 22:31:45 +02:00
Chaosus d0bebee560 Fix File opened with READ_WRITE on Windows
To allows use read and write anytime and in any order

(cherry picked from commit 8d12dfa24d)
2019-04-20 22:25:02 +02:00
bruvzg d9aa43e793 [macOS] Allow non-resizeable windows to enter fullscreen mode.
(cherry picked from commit 7c7182483f)
2019-04-20 22:23:25 +02:00
piyushdagar a329f6fa0b Fixes Adding animation to AnimatedSprite doesn't update inspector immediately
(cherry picked from commit d86d7981cc)
2019-04-20 22:15:01 +02:00
Chaosus 4f3fc559bc Added method to clear all points in Line2D
(cherry picked from commit 61b22beeae)
2019-04-20 22:14:16 +02:00
Chaosus 759c1fb0b8 Added signal for Tween emitted at completion
(cherry picked from commit a19e99aacb)
2019-04-20 22:13:33 +02:00
LATRio ae6d45b0f2 Fix TextureRegion margin bug introduced in #27122
(cherry picked from commit f38173fb19)
2019-04-20 22:09:57 +02:00
LATRio 2213a21ab3 Fixing zooming in TextureRegion
Fixes #20710

(cherry picked from commit 22030d4cc4)
2019-04-20 22:09:30 +02:00
Martin Wallin b887d3f8e8 Display vertex number when hovering point in collision polygon
(cherry picked from commit ed06ed38fb)
2019-04-20 22:07:01 +02:00
marxin c33a924c28 Fix new GCC 9 warnings: -Wdeprecated-copy.
(cherry picked from commit 6be77da7eb)
2019-04-20 22:04:25 +02:00
groud 4be1343f3c Enhance tree scrolling when dragging
(cherry picked from commit 14a901e88f)
2019-04-20 22:00:35 +02:00
Rémi Verschelde 34c2679506 Fix disable_3d=yes -Wunused-variable errors
(cherry picked from commit f25b057846)
2019-04-20 20:30:57 +02:00
Hein-Pieter van Braam-Stewart 650c8512cd Object::script may not be a valid Ref<Script>
It appears that Object::script may be a valid ScriptInstance but not be
castable to Ref<Script>. There were only 5 places in the code that made
this assumption. This commit fixes that.

(cherry picked from commit 20b0046945)
2019-04-20 20:30:30 +02:00
Ignacio Etcheverry 852997e446 Mono: Use exit(status) instead of abort() in exception hook
(cherry picked from commit 8759c0e31a)
2019-04-20 20:30:06 +02:00
Rémi Verschelde 01b39be9e6 Compression: Set Zstd max window size via public parameter
`ZSTD_DCtx_setMaxWindowSize` is still part of the experimental API
(thus unexposed in the shared library). Upstream examples seem to
use `ZSTD_d_windowLogSize` instead, so it's probably what we should
use too.

Fixes #17374.
Distro packagers can now unbundle Zstd.

(cherry picked from commit 20265879e2)
2019-04-20 20:29:45 +02:00
Rémi Verschelde 4298db56cf zstd: Update to upstream 1.4.0
One step towards fixing #17374 as most experimental APIs we use are now
part of the stable 1.4.0.

(cherry picked from commit 88cb9bd27f)
2019-04-20 20:29:34 +02:00
volzhs 3c635b4bdf Fix get_unique_id() on Android
(cherry picked from commit 5a4b2087a0)
2019-04-20 20:29:03 +02:00
James Buck 7b8e7d6514 Fix setting of PopupMenu item IDs in editor
(cherry picked from commit ae646261e3)
2019-04-20 20:28:23 +02:00
CatThingy 4da40c39f1 Removed unnecessary error from _area_inout
The error was previously removed from _body_inout
for the same reason. Fixes #28022.

(cherry picked from commit 8166f8d3c8)
2019-04-20 20:25:40 +02:00
Michael Alexsander Silva Dias 7ddd4f7232 Fix position of tile names in TileSet editor when zooming in/out
Fixes #27713.

(cherry picked from commit d2a7624687)
2019-04-20 20:25:09 +02:00
clayjohn 965b13d62a fixed bug in mip map sigma
(cherry picked from commit 670c1b10b2)
2019-04-20 20:24:44 +02:00
volzhs 20ffda695a Set initial value for autorestart_random_delay of AnimationNodeOneShot
(cherry picked from commit eea3bddd1d)
2019-04-20 20:24:27 +02:00
PouleyKetchoupp 367b371fdd Fixes caches_cleared signal discrepancies in AnimationTree (fixes #25460)
(cherry picked from commit 66e07a2ec6)
2019-04-20 20:23:10 +02:00
PouleyKetchoupp d0c5dc77f3 EditorFolding ignores hidden properties for folded resources (fixes #26663)
(cherry picked from commit 790a78273f)
2019-04-20 20:22:47 +02:00
Andrea Catania 3d74b1e2ef Added No bone set state in the IK
The problem is that initially the root bone was not set, and you didn't know that because the "no set" state was missing. Now I've added it. https://github.com/godotengine/godot-docs/issues/2333

(cherry picked from commit f65fde73da)
2019-04-20 20:22:01 +02:00
Rémi Verschelde 320105ff05 Fix TTR string for class reference tooltip
Fixes #27852.

(cherry picked from commit 38104bb89d)
2019-04-20 20:21:30 +02:00
Bastiaan Olij 2020f43261 Added eye_height, changed description and fixed size of viewport issue
(cherry picked from commit e0b703e3fe)
2019-04-20 20:21:02 +02:00
Rémi Verschelde 95766f5a6a Fix condition in editor icons filtering logic
Fixes #27595.

(cherry picked from commit 5062b4a26b)
2019-04-20 20:20:48 +02:00
Fabio Alessandrelli 7434760380 Fix jump over uninitialized value in OS Unix/X11
(cherry picked from commit 0bcf0314f7)
2019-04-20 20:18:01 +02:00
PouleyKetchoupp a028160522 Fixed uninitialized xfade in AnimationNodeTransition
(cherry picked from commit dafd7768ab)
2019-04-20 20:17:35 +02:00
JFonS 792beb4b83 Fix hint_range for GLES2 shader uniforms
(cherry picked from commit 059078f075)
2019-04-20 20:17:13 +02:00
Daniel Kulas c6fa282fbb Fix "Show in File Manager" option
(cherry picked from commit 22b861ad97)
2019-04-20 20:16:35 +02:00
Hendrikto 456eb53439 Remove unused imports
(cherry picked from commit 49a81308c0)
2019-04-20 20:15:44 +02:00
Rémi Verschelde 782a6dcdde SCons: add `methods.using_clang` to check used compiler
Also rename `use_gcc` to `using_gcc` to make it clear that it returns
a config but does not alter it.

(cherry picked from commit e4a96164b6)
2019-04-20 20:14:43 +02:00
Hugo Locurcio a1388dff7e Find the previous match in script editor when pressing Shift + Enter
This allows cycling through matches more efficiently.

(cherry picked from commit 8a1c5a8390)
2019-04-20 20:13:26 +02:00
Ignacio Etcheverry 3445984901 Replace a few #if/#elif with #ifdef and "#elif defined"
(cherry picked from commit ad2127a3e8)
2019-04-20 20:13:07 +02:00
Hugo Locurcio bd2e707e2f Add support for type hints in non-default script editor templates
This also refactors template processing to avoid repetition.

This closes #27074.

(cherry picked from commit 00799fc8c2)
2019-04-20 20:12:53 +02:00
Michael Alexsander Silva Dias 72b4844d42 Fix crash when using the Tileset Editor when the given shape has no points
(cherry picked from commit 9501900e1b)
2019-04-20 20:10:54 +02:00
Robear Selwans 96222dedb5 Fixed an issue where changing the default_cursor on the RichTextLabel's meta_hover_ended caused the entire project to crash
(cherry picked from commit 84dfb3ff2d)
2019-04-20 20:09:57 +02:00
Guilherme Felipe aedea36d0c Fix wrong blend of animation tree
Interpolation cannot use zero values, must use the values from the
animation to be blended.

(cherry picked from commit 45d97b9860)
2019-04-20 20:09:34 +02:00
Anish Bhobe 16097dd174 Added GLES2 RenderStorage Info calculations.
Proper counting code has been added to update info struct.

Extra: Added the render_info_capture calculations.
Fixes: #27273
(cherry picked from commit 4839b17f93)
2019-04-20 20:08:54 +02:00
Hugo Locurcio afe6d654d5 Use the "warning" color for the "restart required" label
This makes the color match the warning icon placed besides the label.

(cherry picked from commit cca1fab1c4)
2019-04-20 20:08:37 +02:00
Vivatchai Kaveeta 59b2f02ac7 Fix import grayscale EXR
Fix #27299

(cherry picked from commit f0562a5ef6)
2019-04-20 20:08:09 +02:00
qarmin 8f537cfa19 Fix toggle visibility in SceneTreeDialog
(cherry picked from commit 2bc6ad670b)
2019-04-20 20:06:50 +02:00
Daniel Rakos b439515d73 Fix skeleton reparenting to also work when the skeleton node is not a bone
Existing code only did the reparenting when the parent node was a bone. This
change fixes that, plus the reparenting code itself, which used the index of
the skin instead of the skin index itself to address the skeleton array.

(cherry picked from commit 1cf7ca87ce)
2019-04-20 20:06:03 +02:00
Timo Schwarzer e31d6367ea Allow whitespaces in warning-ignore comments
(cherry picked from commit 7a0dfc04aa)
2019-04-20 20:05:25 +02:00
Will Nations 0e7de28b8d Add EditorInspector getter. Update Sub-Inspectors.
(cherry picked from commit c1b247e4d5)
2019-04-20 20:04:43 +02:00
qarmin 0f51f138b5 Fix perspective button hide when it should be actually disabled
(cherry picked from commit 2e5b6b5bde)
2019-04-20 20:04:21 +02:00
toasteater 511fb03e20 Respect keep_3d_linear when transparent_bg is on.
When transparent_bg is on, or the render target is too small,
Godot would skip postprocessing and disregard keep_3d_linear.

This fixes #26817.

(cherry picked from commit 7cbfce7a8c)
2019-04-20 20:03:16 +02:00
Andrii Doroshenko (Xrayez) 4574894e43 Reorder reverse caps characters table for string lower case conversion
The binary search algorithm used to lookup character codes in the table
relies that the data must be ordered. This fixes `to_lower()` string
method to convert upper case to lower case properly, so that the
algorithm doesn't terminate prematurely.

Co-authored-by: AndreevAndrei (avandrei) <avandrei@MacBookAAV.local>
(cherry picked from commit 34e6737413)
2019-04-20 20:02:45 +02:00
James Buck f673bc1e3d Fix editor tooltip formatting
Removed unnecessary word wrap which caused broken tags and general
ugliness. Fixes #24926

(cherry picked from commit 8b1b2f6a4c)
2019-04-20 19:53:44 +02:00
Tomasz Chabora 7a94bac34e Document SceneTree.get_frame() and persistent in add_to_group
(cherry picked from commit 1e9128238e)
2019-04-19 13:12:30 +02:00
Rémi Verschelde 781b8a6c0f xatlas: Redo our custom changes, but properly documented
(cherry picked from commit 44f9a966e0)
2019-04-19 13:12:06 +02:00
Rémi Verschelde a29700e034 xatlas: Revert to unmodified upstream code, add to COPYRIGHT
Imported by @reduz from b8ec29b6b6
Custom changes will be remade properly in the next commit.

(cherry picked from commit 1e39fee140)
2019-04-19 13:11:58 +02:00
Rémi Verschelde def0820385 Drop unused thekla_atlas dependency
Since f12cb82 @reduz dropped the use of the thirdparty thekla_atlas
library, which is replaced by xatlas.

Fixes #28180.
Fixes #28182.

(cherry picked from commit 6640f397f1)
2019-04-19 13:11:13 +02:00
Rémi Verschelde 53d73f59eb doc: Drop unused <demos> tag
(cherry picked from commit 6af69f851a)
2019-04-19 13:10:25 +02:00
Soham Kar aa0d4ffe51 Fixed copy&paste error #28117
Changed "left to right" in VSplitContainer to "top to bottom".

(cherry picked from commit aa8b2f4448)
2019-04-19 13:05:50 +02:00
Rémi Verschelde af12b2d18b doc: Add note about VisibilityNotifier.is_on_screen after instantiation
Fixes #9430.

(cherry picked from commit 3fc1f7dfbe)
2019-04-19 13:05:36 +02:00
Siddharth d99a0a5fba fixes #25707 documentation of v_scroll_speed
Fixes #25707

Update TextEdit.xml

(cherry picked from commit 3f2aac5e0a)
2019-04-19 13:05:20 +02:00
Michael Alexsander Silva Dias f12848f9e1 Document String's 'is_valid_filename()'
(cherry picked from commit 70499faff8)
2019-04-19 13:05:06 +02:00
Tomasz Chabora 28f547a021 Added some documentation for Slider
(cherry picked from commit de4877e1fc)
2019-04-19 13:04:51 +02:00
Ryan Roden-Corrent fd4a65df7b Fill out some of the AnimationNode docs.
The API docs for various animation nodes are pretty empty, yet the
tutorial at
https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html
contains some details.

These details should be included in the API docs so looking up a
particular class actually provides some information rather than
requiring the user to hunt for a different tutorial.

This also links the AnimationTree tutorial and demo in the docs.
I've found the TPS demo to be the best resource so far for learning
how to use the AnimationTree. This should be easy to find if someone
looks up the AnimationTree API docs.

Finally, this fixes a param typo in AnimationNodeStateMachine.

(cherry picked from commit 584288a32c)
2019-04-19 13:04:22 +02:00
toasteater 8d87f624eb Improve RandomNumberGenerator docs.
Clarified behavior of a few methods. Added implementation notes so
that developers not familiar with RNGs are alerted to common pitfalls.

(cherry picked from commit ae1393acae)
2019-04-19 13:03:28 +02:00
Rémi Verschelde a033640276
Merge pull request #27304 from hasahmed/patch-1
Added minimal documentation for _get_configuration_warning method
2019-04-12 12:47:54 +02:00
Hasan Yusuf Ahmed 0eeb1a7d0d Added minimal documentation for _get_configuration_warning method 2019-04-12 02:56:26 -04:00
Rémi Verschelde b5d9099626 Revert "Properly setup seed in RNG"
This reverts commit 1dd72dca45.
As pointed out in #27171, it would break compatibility with 3.1.0.
2019-04-09 09:36:31 +02:00
Rémi Verschelde 6137387ede i18n: Sync translations with Weblate
(cherry picked from commit 3c4938d59a)
2019-04-08 12:38:15 +02:00
Rémi Verschelde 4243f8b32a Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@pouleyKetchoupp, @qarmin

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit 4fad7608c4)
2019-04-07 21:48:00 +02:00
Rémi Verschelde 2fbc4219db
Merge pull request #27754 from godotengine/fix_empty_types_in_json
Fix where json exported empty types
2019-04-07 11:54:23 +02:00
Bastiaan Olij 6226be9595 Fix where json exported empty types 2019-04-07 17:33:35 +10:00
Ignacio Etcheverry b836420fd8 Mono: Buildsystem support for finding MSBuild from VS2019
(cherry picked from commit e82b2def8e)
2019-04-06 21:20:19 +02:00
ForLoveOfCats 37e62939e0 Mono: Make missing default constructor error more foolproof
(cherry picked from commit 444242a080)
2019-04-06 21:19:57 +02:00
ForLoveOfCats 276cd771f9 Mono: Makes GD.Convert take Variant.Type instead of int
(cherry picked from commit 46e79e6fad)
2019-04-06 21:19:36 +02:00
Marc Gilleron c94e80a0a3 Fix wrong heights data used to compute min and max heights
(cherry picked from commit cdcdba704b)
2019-04-06 21:19:24 +02:00
Andrii Doroshenko (Xrayez) 948562261d Fix BitMap calculating incorrect true bit count
(cherry picked from commit b16946dea6)
2019-04-06 21:19:08 +02:00
Hugo Locurcio 67dc8cf252 Use the editor theme's accent color for 2D/3D selections and rotations
(cherry picked from commit d59b210aec)
2019-04-06 21:18:20 +02:00
Hugo Locurcio 93875a79bb Use the accent color to highlight selected text
This makes selections easier to see, while making them fit better
within the editor theme.

This closes #22552.

(cherry picked from commit 9ba6738719)
2019-04-06 21:18:06 +02:00
ShyRed d538fb8d6c Remove hardcoded joint bias
Use user provided bias instead of hardcoded bias.

(cherry picked from commit 96093778ed)
2019-04-06 21:17:37 +02:00
qarmin 4ba90b9dda Show bones after creating
(cherry picked from commit 1b6e0d04f0)
2019-04-06 21:17:04 +02:00
qarmin b5bd8e5f1b Fix deleting properties after deleting files
(cherry picked from commit 4cee053f7c)
2019-04-06 21:16:21 +02:00
shartte a4610ca61e Clarify encoding used for text by the File class
(cherry picked from commit d1c095b30a)
2019-04-06 21:14:47 +02:00
PouleyKetchoupp e8e57c49de Fixed Transform FLIP_Y and FLIP_Z set as identity transform
(cherry picked from commit 8828385792)
2019-04-06 21:14:04 +02:00
Rémi Verschelde 40ec89d24d GLES3: Fix regression in particles buffer initialization
Bug introduced in #26343 where `(float *)` was mistakenly converted
to `(uint8_t *)`, so we were getting `2` instead of `8`.

Fixes #27705.

(cherry picked from commit b182e038e7)
2019-04-06 21:13:07 +02:00
Rémi Verschelde fd3845cdad Revert "Properly explain RPC/RSET mode failure."
This reverts commit 24b049ec9e.
It introduced regressions, see #27655.
2019-04-05 18:18:37 +02:00
Rémi Verschelde 2ad86122ac SCons: Fix OPUS_ARM_OPT flag applied for all android/iphone arches
The first 'if' always evaluated to true, as it evaluated values which are the default
ones for Android and iOS respectively, so even if one of them was overridden, the other
one would be true.

Fixes #27658.

(cherry picked from commit c2fb1c9f01)
2019-04-04 12:41:25 +02:00
Fabio Alessandrelli 24b049ec9e Properly explain RPC/RSET mode failure.
_can_call_mode used to call is_network_master/get_network_master
internally.
This would reset any potential last error set via ERR_EXPLAIN,
preventing it from being displayed correctly.
_can_call_mode now expects the node master ID to be passed instead.

(cherry picked from commit 95ad747dea)
2019-04-04 12:40:59 +02:00
Rémi Verschelde c4ff65207d dist: Rename Linux mime type to follow system convention
Mime type definitions are usually named like the mime type they define,
i.e. x-godot-project in our case.
It was introduced with reverse DNS naming as that's what FlatHub favors,
so it will need to be renamed there.

(cherry picked from commit 7eabf4c8a3)
2019-04-03 17:02:46 +02:00
Rémi Verschelde b502152195 SCons: Fix python3 compat for builtin_bullet=no
(cherry picked from commit 44f1b390a3)
2019-04-03 17:01:25 +02:00
marxin 4889c65922 Fix -Wnon-virtual-dtor warnings.
Example of the warning:
./core/script_language.h:198:7: warning: 'class ScriptCodeCompletionCache' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]

(cherry picked from commit f9f2413e69)
2019-04-03 17:01:04 +02:00
Paulb23 4eefd2d581 Fixed not deselecting when clearing lineedit.
(cherry picked from commit bfba1e36bc)
2019-04-03 17:00:45 +02:00
clayjohn 2b3f2ee372 keep DEPTH from causing compile error in GLES2
(cherry picked from commit 5056b4a02c)
2019-04-03 17:00:21 +02:00
Leonard 929e3595c8 Apply proper offset to CSGMesh material and smooth group
(cherry picked from commit 209c2d2c80)
2019-04-03 16:59:48 +02:00
Daniel Rakos dc928e6174 Fixed handling of depth texture so it's resolved and bound when needed
- Cleaned up and improved the code determining when we need to use a depth
  prepass (previously it wasn't executed in certain cases even if it was
  needed)
- Added code to prepare and bind the depth texture even when no depth prepass
  or MRTs (more precisely effect buffers) are used

Fixes #25870, #25535, and #25387.

(cherry picked from commit 849596c40c)
2019-04-03 16:56:11 +02:00
Allan Davis 38e5f94e19 Enable Mojave "dark mode" on the editor title bar
Enables "dark mode" in the editor and project selector title bars in macOS Mojave when selected in macOS System Preferences

(cherry picked from commit bba5716899)
2019-04-03 16:55:42 +02:00
ShyRed dc259b95d8 Add Emission Mask to CPUParticle2D
Add ability to load emission masks to CPUParticle2D.

(cherry picked from commit dcd268e183)
2019-04-03 16:54:33 +02:00
Kanabenki d59b97cca7 Keep binds for connected signals when changing node type
(cherry picked from commit a1e7febbb3)
2019-04-03 16:54:11 +02:00
Marcelo Fernandez 37c97d09e6 Fix MIDI Note Off missing on some devices
(cherry picked from commit ea0c398a19)
2019-04-03 16:53:47 +02:00
Chaosus 1dd72dca45 Properly setup seed in RNG
(cherry picked from commit 6280be46a6)
2019-04-03 16:53:30 +02:00
qarmin 29a6e7d306 Do not lose focus when moving through scene tree
(cherry picked from commit 138698e51f)
2019-04-03 16:52:27 +02:00
marxin e3ae29e666 Enable warnings=extra on clang and GCC testers.
And remove 2 warnings from warnings=extra.

(cherry picked from commit e7f22ebdcd)
2019-04-03 16:52:01 +02:00
Daniel Spaniol 044ec35f62 Require `return` in all match branches
Before the parser only checked if the catch-all branch has a return in
order to determine if the entire match block has a return.

This code block was assumed to always return.

    match value:
        "test":
            print("test")
        _:
            return

Now as soon as one of the branches has no return, the entire match block
is marked to not have a return.

(cherry picked from commit 79176decd5)
2019-04-03 16:51:43 +02:00
Will Nations 8b1b8181b3 Fix inherited icons for script classes
(cherry picked from commit 2d106eb715)
2019-04-03 16:50:50 +02:00
Juan Linietsky 5ec63c62a1 Add documentation about nested YSort nodes.
(cherry picked from commit ed3586afa1)
2019-04-03 16:49:34 +02:00
Michael Alexsander Silva Dias 3ccb859711 Remove unused 'fav_rm' ToolButton in EditorFileDialog
(cherry picked from commit 579fffd97e)
2019-04-03 16:49:15 +02:00
Rémi Verschelde 7f691e8bb9
Merge pull request #27419 from GameCoderStudios/keep-custom-tracks-properties
Fix: Keep-custom-tracks option now keeps animation loop property and value track update mode.
2019-04-01 17:16:05 +02:00
Anish f4578e1008 Prevents crash on loading unrecognized resources.
Editor crashes on trying to load resources with no loaders.
Simple check on the resource loader prevents using a null
resource loader.

Fixes: #27385
(cherry picked from commit 8ee31ace34)
2019-04-01 11:25:43 +02:00
Magnus Specht 1d05568aed Fixed unfinished max_lines handling for crash avoidance.
(cherry picked from commit 601acdf0e1)
2019-04-01 11:25:22 +02:00
Ignacio Etcheverry e3e33daeb9 C#: Bindings generator now translates BBCode docs to XML comments
(cherry picked from commit 1ad16b3d4a)
2019-04-01 11:24:49 +02:00
thomas.herzog 3e0fc6906e [GDNative] fix NativeScript leak in editor
(cherry picked from commit 5fff7f741a)
2019-04-01 11:23:31 +02:00
thomas.herzog cf8bd34941 [GDNative] remove spam at editor unfocus when using NativeScript
(cherry picked from commit 0e5b2b16ed)
2019-04-01 11:23:26 +02:00
Sebastian Hartte 08f3562fd1 Add support for new MSBuild directory naming introduced in VS 2019.
(cherry picked from commit 7440295ad1)
2019-04-01 11:22:47 +02:00
Sebastian Hartte c7c8c0700f Fix parsing of generic type declarations in C# source files.
(cherry picked from commit 34366bc27f)
2019-04-01 11:21:07 +02:00
Daeil Kim 364aea1eff Ensure non-emitting particles not processed on entering tree
Also removed non-active CPUParticles(3d) from render list
Fixes #27066

(cherry picked from commit 24b7f08892)
2019-04-01 11:20:35 +02:00
Kanabenki 72433a35b1 Add missing check for 2d physics bounce and friction setters
The override check was already present for 3d physics but missing for 2d

(cherry picked from commit 3f64215a43)
2019-04-01 11:19:32 +02:00
piyushdagar 683c95ebdb Fixed CollisionObject signals do not trigger on Area
(cherry picked from commit d7387e8a68)
2019-04-01 11:19:13 +02:00
karroffel 03d00ca36b fix GDNative binding generation for object types
(cherry picked from commit 197d642014)
2019-04-01 11:18:51 +02:00
Vivatchai Kaveeta dffc754a0a Fix order of transformation in GLTF import
From the gltf 2 spec, the order is R  * S. Previously we did S * R, which broke some mesh with non-uniform scale.

Fix #23356, Fix #14725

(cherry picked from commit 32dd9c67c6)
2019-04-01 11:18:23 +02:00
Paulb23 9ca440b763 Fix script editor attempting to set current line to -1 on script open
(cherry picked from commit 6f6d4a6c2e)
2019-04-01 11:17:58 +02:00
Guilherme Felipe 2f8362a2ab StateMachine: Fix sync mode
(cherry picked from commit d35eae166c)
2019-04-01 11:17:33 +02:00
Rémi Verschelde 2e9cf9829c Fix misplaced hint for interface/theme/accent_color
Supersedes #26992.

(cherry picked from commit b17c8c0396)
2019-04-01 11:17:08 +02:00
Michael Alexsander Silva Dias 1f9809032d Make bottom panel only try to hide editors when they're visible
(cherry picked from commit ebabb0ea65)
2019-04-01 11:15:57 +02:00
Fabio Alessandrelli b2d13ba7b7 Enabled logging of failed image download.
(cherry picked from commit 37c0ac1d6d)
2019-04-01 11:15:30 +02:00
janglee123 9bd25ce7d2 fixed toggelling snap mode while transforming
(cherry picked from commit 05446e8b53)
2019-04-01 11:15:06 +02:00
K. S. Ernest (iFire) Lee 804b68c981 Fix scaling issue for texture button focus texture.
(cherry picked from commit 1971c09e5e)
2019-04-01 11:14:34 +02:00
Michael Alexsander Silva Dias 373e6aa17a Make size cache dirty when removing tiles in 'TileMap'
(cherry picked from commit be5f35dfa0)
2019-04-01 11:14:08 +02:00
Windy Darian 695f1a9185 Fix bone aabb calculation, which caused a skeletal mesh culling issue
There was a bug that could result in most bone aabb boxes ending up with
tiny size upon import and mess up with culling of skeletal meshes. This
fixes it.

(cherry picked from commit ff318d91ee)
2019-04-01 11:13:48 +02:00
qarmin 5650c1ecde Fix inspector update after changing anchor via buttons
(cherry picked from commit 8b391b9ab0)
2019-04-01 11:13:20 +02:00
bruvzg 754e1b073a [macOS] Fix hiDPI scaling support in `OS.get_real_window_size` and `OS.set_window.size` functions.
(cherry picked from commit 1b6330b125)
2019-04-01 11:11:50 +02:00
qarmin ae3047d758 Show in tabs non default class icons
(cherry picked from commit 825a870f06)
2019-04-01 11:11:22 +02:00
Pedro Ciambra f7f80b009b Implement source lookup for class_name defined classes
Previous to this, classes defined with class_name had no
behavior when ctrl-clicked in the editor.

Fixes #26882

(cherry picked from commit e8fe174616)
2019-04-01 11:10:32 +02:00
Robear Selwans 4fda05e15f Added the ability to change the default cursor property for the RichTextLabel component.
(cherry picked from commit b852a7a854)
2019-04-01 11:10:04 +02:00
Michael Alexsander Silva Dias 3d0dc81e9e Fix clearing scripts while multiple nodes are selected
(cherry picked from commit d3042d162d)
2019-04-01 11:09:32 +02:00
Paul Trojahn 0c3c4d61f7 Remove extraneous line breaks from text resources
Fixes #23539

(cherry picked from commit 9bbda4db2f)
2019-04-01 11:08:47 +02:00
Bojidar Marinov 08b685ab61 Add search box and size slider to GridMap (similar to TileMap's)
Closes #21536

(cherry picked from commit a9ac4c012c)
2019-04-01 11:07:50 +02:00
Bojidar Marinov 848bd54dae Fix renaming actions in the Project settings
Fixes #27113, a regression from 6daed7d122

(cherry picked from commit 699a3957ce)
2019-04-01 11:05:49 +02:00
Rémi Verschelde d362e3eb11 i18n: Sync translations with Weblate
Also sync translation template.

(cherry picked from commit 472c8a7ba1)
2019-03-28 10:40:13 +01:00
Juan Linietsky d26c3fca0c Add a "Request Docs" button to code editor.
(cherry picked from commit 6574c557c9)
2019-03-28 10:40:03 +01:00
Angeloss 589c5698a0 Fix: Keep custom tracks option now keeps animation loop property and value track update mode. 2019-03-27 11:32:41 -06:00
Jared d02ee1ff0e Corrects small typo in atan2() documentation.
(cherry picked from commit 9838c4df7c)
2019-03-27 17:31:29 +01:00
Chris Bradfield 4740489a97 [DOC] Physics[2D]DirectBodyState updates
(cherry picked from commit bb2e6e3ed2)
2019-03-27 17:31:29 +01:00
Tomasz Chabora e9796044ed Better documentation for some move_and_slide parameters
(cherry picked from commit 0e93714ff7)
2019-03-27 17:31:29 +01:00
homer666 f7ff3ec749 [DOCS] Add tutorial link to Particles2D
(cherry picked from commit bc8aa32593)
2019-03-27 17:31:29 +01:00
Sam Green dbf2f0c31e Add logging around opengl es context creation. Ensure we can access project settings prior to creating our gl es context, so we can properly determine which driver to use.
(cherry picked from commit 440706814a)
2019-03-16 10:42:50 -07:00
Bojidar Marinov 0d8492cf9e Fix duplicated lines in GDScript bytecode
Fixes #26789

(cherry picked from commit b64f9f03f8)
2019-03-16 10:42:28 -07:00
Chris Bradfield a51b2b8a82 [DOCS] minor classref updates
(cherry picked from commit 454b701e76)
2019-03-16 10:42:06 -07:00
Sebastian Hartte d060cd4fef Don't crash when the saved editor state contains fewer viewports than currently supported.
(cherry picked from commit 7bab7fd777)
2019-03-16 10:41:45 -07:00
Andrettin 4023d52399 Made the tooltip position offset configurable
(cherry picked from commit 30c07c1ae1)
2019-03-16 10:41:08 -07:00
clayjohn 77c26d3260 linked tutorials in the classref
(cherry picked from commit 67446ff733)
2019-03-13 20:09:17 +01:00
Ignacio Etcheverry 57f19fd8ee C#: Update exports only in the editor
(cherry picked from commit 5e354162f1)
2019-03-13 20:07:29 +01:00
Rémi Verschelde 51e04c588b Bump version to 3.1.1-devel 2019-03-13 18:44:46 +01:00
1760 changed files with 97520 additions and 78139 deletions

View File

@ -12,6 +12,9 @@ environment:
TARGET: release_debug
ARCH: amd64
init:
- ps: if ($env:APPVEYOR_REPO_BRANCH -ne "master") { $env:APPVEYOR_CACHE_SKIP_SAVE = "true" }
cache:
- "%SCONS_CACHE_ROOT%"
@ -26,7 +29,7 @@ before_build:
- python --version
- scons --version
- cl.exe
- SET "SCONS_CACHE=%SCONS_CACHE_ROOT%\master"
- set "SCONS_CACHE=%SCONS_CACHE_ROOT%\%APPVEYOR_REPO_BRANCH%"
build_script:
- scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% debug_symbols=no verbose=yes progress=no gdnative_wrapper=yes
- scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% debug_symbols=no verbose=yes progress=no gdnative_wrapper=yes

7
.gitignore vendored
View File

@ -316,3 +316,10 @@ platform/windows/godot_res.res
# Scons progress indicator
.scons_node_count
# ccls cache (https://github.com/MaskRay/ccls)
.ccls-cache/
# compile commands (https://clang.llvm.org/docs/JSONCompilationDatabase.html)
compile_commands.json

View File

@ -6,64 +6,115 @@ Andreas Haas <liu.gam3@gmail.com>
Andreas Haas <liu.gam3@gmail.com> <hinsbart@gmail.com>
Andreas Haas <liu.gam3@gmail.com> <hinsbart@users.noreply.github.com>
Andreas Haas <liu.gam3@gmail.com> <entenflugstuhl@gmail.com>
Anish Bhobe <anishbhobe@hotmail.com>
Anutrix <numaanzaheerahmed@yahoo.com>
Aren Villanueva <arenvillanueva@yomogi-soft.com> <aren@displaysweet.com>
Ariel Manzur <ariel@godotengine.org>
Ariel Manzur <ariel@godotengine.org> <punto@godotengine.org>
Ariel Manzur <ariel@godotengine.org> <ariel@okamstudio.com>
Ariel Manzur <ariel@godotengine.org> <punto@Ariels-Mac-mini.local>
Ariel Manzur <ariel@godotengine.org> <punto@Ariels-Mac-mini-2.local>
Bastiaan Olij <mux213@gmail.com>
Benjamin <mafortion.benjamin@gmail.com>
Bernhard Liebl <Bernhard.Liebl@gmx.org> <poke1024@gmx.de>
Bernhard Liebl <Bernhard.Liebl@gmx.org> <poke1024@gmx.org>
Bruno Lourenço <madequa@users.noreply.github.com> <bmlourenco@gmail.com>
Chaosus <chaosus89@gmail.com>
Chris Bradfield <chris@kidscancode.org> <cb@scribe.net>
Clay John <claynjohn@gmail.com>
Clay John <claynjohn@gmail.com> <clayjohn@shaw.ca>
Dana Olson <dana@shineuponthee.com> <adolson@gmail.com>
dankan1890 <mewuidev2@gmail.com>
Daniel J. Ramirez <djrmuv@gmail.com>
Emmanuel Barroga <emmanuelbarroga@gmail.com>
Erik Selecký <35656626+rxlecky@users.noreply.github.com>
Erik Selecký <35656626+rxlecky@users.noreply.github.com> <35656626+SeleckyErik@users.noreply.github.com>
Fabian <supagu@gmail.com>
Ferenc Arn <tagcup@yahoo.com>
Ferenc Arn <tagcup@yahoo.com> <tagcup@users.noreply.github.com>
Fredia Huya-Kouadio <fhuyakou@gmail.com>
Fredia Huya-Kouadio <fhuyakou@gmail.com> <fhuya@google.com>
Geequlim <geequlim@gmail.com>
Gilles Roudiere <gilles.roudiere@gmail.com>
Gilles Roudiere <gilles.roudiere@gmail.com> <gilles.roudiere@laas.fr>
Gordon MacPherson <gordon@gordonite.tech>
Guilherme Felipe <guilhermefelipecgs@gmail.com>
Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
Hein-Pieter van Braam-Stewart <hp@tmm.cx>
Hubert Jarosz <marqin.pl@gmail.com>
Hubert Jarosz <marqin.pl@gmail.com> <marqin.pl+git@gmail.com>
Hugo Locurcio <hugo.locurcio@hugo.pro> <hugo.l@openmailbox.org>
Hugo Locurcio <hugo.locurcio@hugo.pro> <Calinou@users.noreply.github.com>
Hugo Locurcio <hugo.locurcio@hugo.pro> Calinou <calinou@opmbx.org>
Ian Bishop <ianb96@gmail.com>
Ignacio Etcheverry <ignalfonsore@gmail.com>
Ignacio Etcheverry <ignalfonsore@gmail.com> <neikeq@users.noreply.github.com>
Ilaria Cislaghi <cislaghi.ilaria@gmail.com>
Ilaria Cislaghi <cislaghi.ilaria@gmail.com> <ilaria.cislaghi@simedis.com>
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>
Jérôme Gully <jerome.gully0@gmail.com>
JFonS <joan.fonssanchez@gmail.com>
Juan Linietsky <reduzio@gmail.com>
Juan Linietsky <reduzio@gmail.com> <juan@godotengine.org>
Juan Linietsky <reduzio@gmail.com> <juan@okamstudio.com>
Juan Linietsky <reduzio@gmail.com> <reduz@Juans-MBP.fibertel.com.ar>
Juan Linietsky <reduzio@gmail.com> <red@kyoko>
Julian Murgia <the.straton@gmail.com>
Kanabenki <lucien.menassol@gmail.com> <18357657+Kanabenki@users.noreply.github.com>
Kelly Thomas <kelly.thomas@hotmail.com.au>
K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
Leon Krause <lk@leonkrause.com> <eska@eska.me>
Leon Krause <lk@leonkrause.com> <eska014@users.noreply.github.com>
Manuel Strey <manuel.strey@gmx.de>
Marcelo Fernandez <marcelofg55@gmail.com>
Marcin Zawiejski <dragmz@gmail.com>
Mariano Javier Suligoy <marianognu.easyrpg@gmail.com>
Mario Schlack <m4r10.5ch14ck@gmail.com>
marxin <mliska@suse.cz>
marynate <mary.w.nate@gmail.com> <marynate@github.com>
Max Hilbrunner <m.hilbrunner@gmail.com>
Max Hilbrunner <m.hilbrunner@gmail.com> <mhilbrunner@users.noreply.github.com>
Michael Alexsander <michaelalexsander@protonmail.com>
Nathan Lovato <nathan@gdquest.com>
Nathan Warden <nathan@nathanwarden.com> <nathanwardenlee@icloud.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>
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>
Pawel Kowal <pkowal1982@gmail.com> <pawel.kowal@javart.eu>
Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Pieter-Jan Briers <pieterjan.briers+git@gmail.com> <pieterjan.briers@gmail.com>
Poommetee Ketson <poommetee@protonmail.com>
Przemysław Gołąb (n-pigeon) <golab.przemyslaw@gmail.com>
Rafał Mikrut <mikrutrafal54@gmail.com>
Ralf Hölzemer <r.hoelzemer@posteo.de> <rollenrolm@posteo.de>
Ralf Hölzemer <r.hoelzemer@posteo.de> <rollenrolm@users.noreply.github.com>
Ramesh Ravone <ramesh.maran443@gmail.com>
RaphaelHunter <raphael10241024@gmail.com>
RaphaelHunter <raphael10241024@gmail.com> <Raphael10241024@gmail.com>
RaphaelHunter <raphael10241024@gmail.com> <raphael20141024@gmail.com>
Rémi Verschelde <rverschelde@gmail.com> <remi@verschelde.fr>
Rhody Lugo <rhodylugo@gmail.com> <rhodylugo@me.com>
Robin Hübner <profan@prfn.se> <robinhubner@gmail.com>
romulox_x <romulox_x@yahoo.com>
Ruslan Mustakov <r.mustakov@gmail.com> <ruslan.mustakov@xored.com>
Saracen <SaracenOne@gmail.com>
sheepandshepherd <sheepandshepherd@hotmail.com> <sheepandshepherd@users.noreply.github.com>
Swarnim Arun <swarnimarun11@gmail.com>
Theo Hallenius <redsymbzone@hotmail.com>
Thomas Herzog <therzog@mail.de>
Thomas Herzog <therzog@mail.de> <thomas.herzog@mail.com>
Thomas Herzog <therzog@mail.de> <thomas.herzog@simedis.com>
Twarit <wtwarit@gmail.com>
V.VamsiKrishna <vk@bsb.in> <vamsikrishna.v@gmail.com>
Wilhem Barbier <nounoursheureux@openmailbox.org> <wilhem.b@free.fr>
Wilhem Barbier <nounoursheureux@openmailbox.org> <schtroumps31@gmail.com>
Will Nations <willnationsdev@gmail.com>
yg2f <yoann@terminajones.com>
Zak Stam <zakscomputers@hotmail.com>
Zher Huei Lee <lee.zh.92@gmail.com>

View File

@ -6,7 +6,7 @@ sudo: false
env:
global:
- SCONS_CACHE=$HOME/.scons_cache
- SCONS_CACHE=$HOME/.scons_cache/$TRAVIS_BRANCH
- SCONS_CACHE_LIMIT=1024
- OPTIONS="debug_symbols=no verbose=yes progress=no"
- secure: "uch9QszCgsl1qVbuzY41P7S2hWL2IiNFV4SbAYRCdi0oJ9MIu+pVyrQdpf3+jG4rH6j4Rffl+sN17Zz4dIDDioFL1JwqyCqyCyswR8uACC0Rr8gr4Mi3+HIRbv+2s2P4cIQq41JM8FJe84k9jLEMGCGh69w+ibCWoWs74CokYVA="
@ -27,7 +27,7 @@ matrix:
packages:
- clang-format-6.0
- env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-8 MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no werror=yes"
- env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-8 MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra werror=yes"
os: linux
compiler: gcc-8
addons:
@ -49,7 +49,7 @@ matrix:
build_command: "scons p=x11 -j2 $OPTIONS"
branch_pattern: coverity_scan
- env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="werror=yes"
- env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
os: linux
compiler: clang
addons:
@ -57,7 +57,7 @@ matrix:
packages:
- *linux_deps
- env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="werror=yes"
- env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
os: linux
compiler: clang
@ -69,7 +69,7 @@ matrix:
os: osx
compiler: clang
- env: PLATFORM=server TOOLS=yes TARGET=release_debug CACHE_NAME=${PLATFORM}-tools-gcc-8 MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" EXTRA_ARGS="werror=yes"
- env: PLATFORM=server TOOLS=yes TARGET=release_debug CACHE_NAME=${PLATFORM}-tools-gcc-8 MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" EXTRA_ARGS="warnings=extra werror=yes"
os: linux
compiler: gcc-8
addons:

View File

@ -29,6 +29,7 @@ name is available.
Aaron Franke (aaronfranke)
Alexander Holland (AlexHolly)
Alexey Khoroshavin (allkhor)
Alket Rexhepi (alketii)
Andrea Catania (AndreaCatania)
Andreas Haas (Hinsbart)
@ -36,37 +37,52 @@ name is available.
Andy Moss (MillionOstrich)
Anish Bhobe (KidRigger)
Anton Yabchinskiy (a12n)
Anutrix
Aren Villanueva (kurikaesu)
Ariel Manzur (punto-)
Bastiaan Olij (BastiaanOlij)
Ben Brookshire (sheepandshepherd)
Benjamin (Nallebeorn)
Benjamin Larsson (Nallebeorn)
Bernard Liebl (poke1024)
Błażej Szczygieł (zaps166)
Bojidar Marinov (bojidar-bg)
Bruno Lourenço (MadEqua)
bruvzg
Cameron Reikes (creikey)
Camille Mohr-Daurat (pouleyKetchoupp)
Carl Olsson (not-surt)
Carter Anderson (cart)
Chris Bradfield (cbscribe)
Clay John (clayjohn)
Dana Olson (adolson)
Daniel J. Ramirez (djrm)
Daniel Rakos (aqnuep)
dankan1890
David Sichma (DavidSichma)
Dharkael (lupoDharkael)
Dmitry Koteroff (Krakean)
DualMatrix
Emmanuel Barroga (codecustard)
Emmanuel Leblond (touilleMan)
Eoin O'Neill (Eoin-ONeill-Yokai)
Eric Lasota (elasota)
Eric Rybicki (ericrybick)
Erik Selecký (rxlecky)
est31
Fabian Mathews (supagu)
Fabio Alessandrelli (Faless)
Ferenc Arn (tagcup)
Franklin Sobrinho (TheHX)
Fredia Huya-Kouadio (m4gr3d)
Geequlim
George Marques (vnen)
Gerrit Großkopf (Grosskopf)
Gilles Roudiere (groud)
Gordon MacPherson (RevoluPowered)
Guilherme Felipe de C. G. da Silva (guilhermefelipecgs)
Hein-Pieter van Braam (hpvb)
Hanif Bin Ariffin (hbina)
Haoyu Qiu (timothyqiu)
Hein-Pieter van Braam-Stewart (hpvb)
Hiroshi Ogawa (hi-ogawa)
homer666
Hubert Jarosz (Marqin)
@ -74,6 +90,7 @@ name is available.
Ian Bishop (ianb96)
Ibrahn Sahir (ibrahn)
Ignacio Etcheverry (neikeq)
Ilaria Cislaghi (QbieShay)
Indah Sylvia (ISylvox)
J08nY
Jakub Grzesik (kubecz3k)
@ -88,7 +105,9 @@ name is available.
Kostadin Damyanov (Max-Might)
K. S. Ernest (iFire) Lee (fire)
Leon Krause (eska014)
Lucien Menassol (Kanabenki)
m4nu3lf
Marcel Admiraal (madmiraal)
Marcelo Fernandez (marcelofg55)
Marc Gilleron (Zylann)
Marcin Zawiejski (dragmz)
@ -101,36 +120,49 @@ name is available.
Masoud BH (masoudbh3)
Matthias Hölzl (hoelzl)
Max Hilbrunner (mhilbrunner)
Michael Alexsander Silva Dias (YeldhamDev)
merumelu
Michael Alexsander (YeldhamDev)
MichiRecRoom (LikeLakers2)
mrezai
muiroc
Nathan Warden (NathanWarden)
Nils André-Chang (NilsIrl)
Nuno Donato (nunodonato)
Ovnuniarchos
Pascal Richter (ShyRed)
Patrick (firefly2442)
Paul Batty (Paulb23)
Paul Joannon (paulloz)
Paul Trojahn (ptrojahn)
Pawel Kowal (pkowal1982)
Pedro J. Estébanez (RandomShaper)
Pieter-Jan Briers (PJB3005)
Poommetee Ketson (Noshyaar)
Przemysław Gołąb (n-pigeon)
Rafał Mikrut (qarmin)
Ralf Hölzemer (rollenrolm)
Ramesh Ravone (RameshRavone)
raphael10241024
Ray Koopa (RayKoopa)
Rémi Verschelde (akien-mga)
Rhody Lugo (rraallvv)
Roberto F. Arroyo (robfram)
Robin Hübner (profan)
romulox-x
Ruslan Mustakov (endragor)
Saniko (sanikoyes)
santouits
SaracenOne
sersoong
Shiqing (kawa-yoiko)
Simon Wenner (swenner)
Swarnim Arun (minraws)
Theo Hallenius (TheoXD)
Thomas Herzog (karroffel)
Timo (toger5)
Timo Schwarzer (timoschwarzer)
Timo (toger5)
Tomasz Chabora (KoBeWi)
Twarit Waikar (IronicallySerious)
Vinzenz Feenstra (vinzenz)
박한얼 (volzhs)
V. Vamsi Krishna (vkbsb)
@ -139,7 +171,7 @@ name is available.
Wilson E. Alvarez (Rubonnek)
Xavier Cho (mysticfall)
yg2f (SuperUserNameMan)
Yuri Roubinski (Chaosus)
Yuri Roubinsky (Chaosus)
Zak Stam (zaksnet)
Zher Huei Lee (leezh)
ZuBsPaCe
Дмитрий Сальников (DmitriySalnikov)

View File

@ -53,7 +53,7 @@ Files: ./icon.png
./logo.svg
Comment: Godot Engine logo
Copyright: 2017, Andrea Calabró
License: CC-BY-3.0
License: CC-BY-4.0
Files: ./platform/android/java/aidl/com/android/vending/billing/IInAppBillingService.aidl
./platform/android/java/res/layout/status_bar_ongoing_event_progress_bar.xml
@ -165,7 +165,7 @@ License: FTL
Files: ./thirdparty/glad/
Comment: glad
Copyright: 2013-2018, David Herberth
Copyright: 2013-2019, David Herberth
License: Expat
Files: ./thirdparty/jpeg_compressor/
@ -180,8 +180,8 @@ License: BSD-3-clause
Files: ./thirdparty/libpng/
Comment: libpng
Copyright: 1995-2018, The PNG Reference Library Authors.
2018, Cosmin Truta.
Copyright: 1995-2019, The PNG Reference Library Authors.
2018-2019, Cosmin Truta.
2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
1996-1997, Andreas Dilger.
1995-1996, Guy Eric Schalnat, Group 42, Inc.
@ -265,12 +265,6 @@ Comment: Clipper
Copyright: 2010-2017, Angus Johnson
License: BSL-1.0
Files: ./thirdparty/misc/curl_hostcheck.c
./thirdparty/misc/curl_hostcheck.h
Comment: curl
Copyright: 1998-2012, Daniel Stenberg et al.
License: curl
Files: ./thirdparty/misc/easing_equations.cpp
Comment: Robert Penner's Easing Functions
Copyright: 2001, Robert Penner
@ -321,7 +315,7 @@ License: BSD-3-clause
Files: ./thirdparty/misc/stb_truetype.h
./thirdparty/misc/stb_vorbis.c
Comment: stb libraries
Copyright: 2007-2017, Sean Barrett
Copyright: 2007-2019, Sean Barrett
License: public-domain
Files: ./thirdparty/misc/triangulator.cpp
@ -350,8 +344,8 @@ License: BSD-3-clause
Files: ./thirdparty/pcre2/
Comment: PCRE2
Copyright: 1997-2018, University of Cambridge,
2009-2018, Zoltan Herczeg
Copyright: 1997-2019, University of Cambridge,
2009-2019, Zoltan Herczeg
License: BSD-3-clause
Files: ./thirdparty/pvrtccompressor/
@ -369,17 +363,19 @@ Comment: libSquish
Copyright: 2006, Simon Brown
License: Expat
Files: ./thirdparty/thekla_atlas/
Comment: Thekla Atlas
Copyright: 2013, Thekla, Inc
License: Expat
Files: ./thirdparty/tinyexr/
Comment: TinyEXR
Copyright: 2014-2018, Syoyo Fujita
Copyright: 2014-2019, Syoyo Fujita
2002, Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
License: BSD-3-clause
Files: ./thirdparty/xatlas/
Comment: xatlas
Copyright: 2018, Jonathan Young
2013, Thekla, Inc
2006, NVIDIA Corporation, Ignacio Castano
License: Expat
Files: ./thirdparty/zlib/
Comment: zlib
Copyright: 1995-2017, Jean-loup Gailly and Mark Adler
@ -522,359 +518,317 @@ License: BSL-1.0
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
License: CC-BY-3.0
Creative Commons Attribution 3.0 Unported
License: CC-BY-4.0
Creative Commons Attribution 4.0 International Public License
.
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE
INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
ITS USE.
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
.
License
Section 1 -- Definitions.
.
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
CONDITIONS.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
.
1. Definitions
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
.
a. "Adaptation" means a work based upon the Work, or upon the Work and
other pre-existing works, such as a translation, adaptation, derivative
work, arrangement of music or other alterations of a literary or
artistic work, or phonogram or performance and includes cinematographic
adaptations or any other form in which the Work may be recast,
transformed, or adapted including in any form recognizably derived from
the original, except that a work that constitutes a Collection will not
be considered an Adaptation for the purpose of this License. For the
avoidance of doubt, where the Work is a musical work, performance or
phonogram, the synchronization of the Work in timed-relation with a
moving image ("synching") will be considered an Adaptation for the
purpose of this License.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
.
b. "Collection" means a collection of literary or artistic works, such
as encyclopedias and anthologies, or performances, phonograms or
broadcasts, or other works or subject matter other than works listed in
Section 1(f) below, which, by reason of the selection and arrangement of
their contents, constitute intellectual creations, in which the Work is
included in its entirety in unmodified form along with one or more other
contributions, each constituting separate and independent works in
themselves, which together are assembled into a collective whole. A work
that constitutes a Collection will not be considered an Adaptation (as
defined above) for the purposes of this License.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
.
c. "Distribute" means to make available to the public the original and
copies of the Work or Adaptation, as appropriate, through sale or other
transfer of ownership.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
.
d. "Licensor" means the individual, individuals, entity or entities that
offer(s) the Work under the terms of this License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
.
e. "Original Author" means, in the case of a literary or artistic work,
the individual, individuals, entity or entities who created the Work or
if no individual or entity can be identified, the publisher; and in
addition (i) in the case of a performance the actors, singers,
musicians, dancers, and other persons who act, sing, deliver, declaim,
play in, interpret or otherwise perform literary or artistic works or
expressions of folklore; (ii) in the case of a phonogram the producer
being the person or legal entity who first fixes the sounds of a
performance or other sounds; and, (iii) in the case of broadcasts, the
organization that transmits the broadcast.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
.
f. "Work" means the literary and/or artistic work offered under the
terms of this License including without limitation any production in the
literary, scientific and artistic domain, whatever may be the mode or
form of its expression including digital form, such as a book, pamphlet
and other writing; a lecture, address, sermon or other work of the same
nature; a dramatic or dramatico-musical work; a choreographic work or
entertainment in dumb show; a musical composition with or without words;
a cinematographic work to which are assimilated works expressed by a
process analogous to cinematography; a work of drawing, painting,
architecture, sculpture, engraving or lithography; a photographic work
to which are assimilated works expressed by a process analogous to
photography; a work of applied art; an illustration, map, plan, sketch
or three-dimensional work relative to geography, topography,
architecture or science; a performance; a broadcast; a phonogram; a
compilation of data to the extent it is protected as a copyrightable
work; or a work performed by a variety or circus performer to the extent
it is not otherwise considered a literary or artistic work.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
.
g. "You" means an individual or entity exercising rights under this
License who has not previously violated the terms of this License with
respect to the Work, or who has received express permission from the
Licensor to exercise rights under this License despite a previous
violation.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
.
h. "Publicly Perform" means to perform public recitations of the Work
and to communicate to the public those public recitations, by any means
or process, including by wire or wireless means or public digital
performances; to make available to the public Works in such a way that
members of the public may access these Works from a place and at a place
individually chosen by them; to perform the Work to the public by any
means or process and the communication to the public of the performances
of the Work, including by public digital performance; to broadcast and
rebroadcast the Work by any means including signs, sounds or images.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
.
i. "Reproduce" means to make copies of the Work by any means including
without limitation by sound or visual recordings and the right of
fixation and reproducing fixations of the Work, including storage of a
protected performance or phonogram in digital form or other electronic
medium.
Section 2 -- Scope.
.
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
limit, or restrict any uses free from copyright or rights arising from
limitations or exceptions that are provided for in connection with the
copyright protection under copyright law or other applicable laws.
a. License grant.
.
3. License Grant. Subject to the terms and conditions of this License,
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
perpetual (for the duration of the applicable copyright) license to
exercise the rights in the Work as stated below:
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
.
a. to Reproduce the Work, to incorporate the Work into one or more
Collections, and to Reproduce the Work as incorporated in the
Collections;
a. reproduce and Share the Licensed Material, in whole or
in part; and
.
b. to create and Reproduce Adaptations provided that any such
Adaptation, including any translation in any medium, takes reasonable
steps to clearly label, demarcate or otherwise identify that changes
were made to the original Work. For example, a translation could be
marked "The original work was translated from English to Spanish," or a
modification could indicate "The original work has been modified.";
b. produce, reproduce, and Share Adapted Material.
.
c. to Distribute and Publicly Perform the Work including as incorporated
in Collections; and,
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
.
d. to Distribute and Publicly Perform Adaptations.
3. Term. The term of this Public License is specified in Section
6(a).
.
e. For the avoidance of doubt:
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
.
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
which the right to collect royalties through any statutory or compulsory
licensing scheme cannot be waived, the Licensor reserves the exclusive
right to collect such royalties for any exercise by You of the rights
granted under this License;
5. Downstream recipients.
.
ii. Waivable Compulsory License Schemes. In those jurisdictions in which
the right to collect royalties through any statutory or compulsory
licensing scheme can be waived, the Licensor waives the exclusive right
to collect such royalties for any exercise by You of the rights granted
under this License; and,
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
.
iii. Voluntary License Schemes. The Licensor waives the right to collect
royalties, whether individually or, in the event that the Licensor is a
member of a collecting society that administers voluntary licensing
schemes, via that society, from any exercise by You of the rights
granted under this License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
.
The above rights may be exercised in all media and formats whether now
known or hereafter devised. The above rights include the right to make
such modifications as are technically necessary to exercise the rights
in other media and formats. Subject to Section 8(f), all rights not
expressly granted by Licensor are hereby reserved.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
.
4. Restrictions. The license granted in Section 3 above is expressly
made subject to and limited by the following restrictions:
b. Other rights.
.
a. You may Distribute or Publicly Perform the Work only under the terms
of this License. You must include a copy of, or the Uniform Resource
Identifier (URI) for, this License with every copy of the Work You
Distribute or Publicly Perform. You may not offer or impose any terms on
the Work that restrict the terms of this License or the ability of the
recipient of the Work to exercise the rights granted to that recipient
under the terms of the License. You may not sublicense the Work. You
must keep intact all notices that refer to this License and to the
disclaimer of warranties with every copy of the Work You Distribute or
Publicly Perform. When You Distribute or Publicly Perform the Work, You
may not impose any effective technological measures on the Work that
restrict the ability of a recipient of the Work from You to exercise the
rights granted to that recipient under the terms of the License. This
Section 4(a) applies to the Work as incorporated in a Collection, but
this does not require the Collection apart from the Work itself to be
made subject to the terms of this License. If You create a Collection,
upon notice from any Licensor You must, to the extent practicable,
remove from the Collection any credit as required by Section 4(b), as
requested. If You create an Adaptation, upon notice from any Licensor
You must, to the extent practicable, remove from the Adaptation any
credit as required by Section 4(b), as requested.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
.
b. If You Distribute, or Publicly Perform the Work or any Adaptations or
Collections, You must, unless a request has been made pursuant to
Section 4(a), keep intact all copyright notices for the Work and
provide, reasonable to the medium or means You are utilizing: (i) the
name of the Original Author (or pseudonym, if applicable) if supplied,
and/or if the Original Author and/or Licensor designate another party or
parties (e.g., a sponsor institute, publishing entity, journal) for
attribution ("Attribution Parties") in Licensor's copyright notice,
terms of service or by other reasonable means, the name of such party or
parties; (ii) the title of the Work if supplied; (iii) to the extent
reasonably practicable, the URI, if any, that Licensor specifies to be
associated with the Work, unless such URI does not refer to the
copyright notice or licensing information for the Work; and (iv) ,
consistent with Section 3(b), in the case of an Adaptation, a credit
identifying the use of the Work in the Adaptation (e.g., "French
translation of the Work by Original Author," or "Screenplay based on
original Work by Original Author"). The credit required by this Section
4 (b) may be implemented in any reasonable manner; provided, however,
that in the case of a Adaptation or Collection, at a minimum such credit
will appear, if a credit for all contributing authors of the Adaptation
or Collection appears, then as part of these credits and in a manner at
least as prominent as the credits for the other contributing authors.
For the avoidance of doubt, You may only use the credit required by this
Section for the purpose of attribution in the manner set out above and,
by exercising Your rights under this License, You may not implicitly or
explicitly assert or imply any connection with, sponsorship or
endorsement by the Original Author, Licensor and/or Attribution Parties,
as appropriate, of You or Your use of the Work, without the separate,
express prior written permission of the Original Author, Licensor and/or
Attribution Parties.
2. Patent and trademark rights are not licensed under this
Public License.
.
c. Except as otherwise agreed in writing by the Licensor or as may be
otherwise permitted by applicable law, if You Reproduce, Distribute or
Publicly Perform the Work either by itself or as part of any Adaptations
or Collections, You must not distort, mutilate, modify or take other
derogatory action in relation to the Work which would be prejudicial to
the Original Author's honor or reputation. Licensor agrees that in those
jurisdictions (e.g. Japan), in which any exercise of the right granted
in Section 3(b) of this License (the right to make Adaptations) would be
deemed to be a distortion, mutilation, modification or other derogatory
action prejudicial to the Original Author's honor and reputation, the
Licensor will waive or not assert, as appropriate, this Section, to the
fullest extent permitted by the applicable national law, to enable You
to reasonably exercise Your right under Section 3(b) of this License
(right to make Adaptations) but not otherwise.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
.
5. Representations, Warranties and Disclaimer
Section 3 -- License Conditions.
.
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
a. Attribution.
.
7. Termination
1. If You Share the Licensed Material (including in modified
form), You must:
.
a. This License and the rights granted hereunder will terminate
automatically upon any breach by You of the terms of this License.
Individuals or entities who have received Adaptations or Collections
from You under this License, however, will not have their licenses
terminated provided such individuals or entities remain in full
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
survive any termination of this License.
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
.
b. Subject to the above terms and conditions, the license granted here
is perpetual (for the duration of the applicable copyright in the Work).
Notwithstanding the above, Licensor reserves the right to release the
Work under different license terms or to stop distributing the Work at
any time; provided, however that any such election will not serve to
withdraw this License (or any other license that has been, or is
required to be, granted under the terms of this License), and this
License will continue in full force and effect unless terminated as
stated above.
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
.
8. Miscellaneous
ii. a copyright notice;
.
a. Each time You Distribute or Publicly Perform the Work or a
Collection, the Licensor offers to the recipient a license to the Work
on the same terms and conditions as the license granted to You under
this License.
iii. a notice that refers to this Public License;
.
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
offers to the recipient a license to the original Work on the same terms
and conditions as the license granted to You under this License.
iv. a notice that refers to the disclaimer of
warranties;
.
c. If any provision of this License is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of
the remainder of the terms of this License, and without further action
by the parties to this agreement, such provision shall be reformed to
the minimum extent necessary to make such provision valid and
enforceable.
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
.
d. No term or provision of this License shall be deemed waived and no
breach consented to unless such waiver or consent shall be in writing
and signed by the party to be charged with such waiver or consent. This
License constitutes the entire agreement between the parties with
respect to the Work licensed here. There are no understandings,
agreements or representations with respect to the Work not specified
here. Licensor shall not be bound by any additional provisions that may
appear in any communication from You.
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
.
e. This License may not be modified without the mutual written agreement
of the Licensor and You.
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
.
f. The rights granted under, and the subject matter referenced, in this
License were drafted utilizing the terminology of the Berne Convention
for the Protection of Literary and Artistic Works (as amended on
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and
the Universal Copyright Convention (as revised on July 24, 1971). These
rights and subject matter take effect in the relevant jurisdiction in
which the License terms are sought to be enforced according to the
corresponding provisions of the implementation of those treaty
provisions in the applicable national law. If the standard suite of
rights granted under applicable copyright law includes additional rights
not granted under this License, such additional rights are deemed to be
included in the License; this License is not intended to restrict the
license of any rights under applicable law.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
.
Creative Commons Notice
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
.
Creative Commons is not a party to this License, and makes no warranty
whatsoever in connection with the Work. Creative Commons will not be
liable to You or any party on any legal theory for any damages
whatsoever, including without limitation any general, special,
incidental or consequential damages arising in connection to this
license. Notwithstanding the foregoing two (2) sentences, if Creative
Commons has expressly identified itself as the Licensor hereunder, it
shall have all rights and obligations of Licensor.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
.
Except for the limited purpose of indicating to the public that the Work
is licensed under the CCPL, Creative Commons does not authorize the use
by either party of the trademark "Creative Commons" or any related
trademark or logo of Creative Commons without the prior written consent
of Creative Commons. Any permitted use will be in compliance with
Creative Commons' then-current trademark usage guidelines, as may be
published on its website or otherwise made available upon request from
time to time. For the avoidance of doubt, this trademark restriction
does not form part of this License.
Section 4 -- Sui Generis Database Rights.
.
Creative Commons may be contacted at http://creativecommons.org/.
License: curl
All rights reserved.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
.
Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
.
Section 6 -- Term and Termination.
.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
.
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
.
2. upon express reinstatement by the Licensor.
.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
.
Section 7 -- Other Terms and Conditions.
.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
.
Section 8 -- Interpretation.
.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
License: Expat
Permission is hereby granted, free of charge, to any person obtaining

468
DONORS.md
View File

@ -12,356 +12,516 @@ generous deed immortalized in the next stable release of Godot Engine.
## Platinum sponsors
Enjin Coin <https://enjincoin.io>
Heroic Labs <https://heroiclabs.com>
Interblock <http://interblockgaming.com>
## Gold sponsors
Gamblify <https://www.gamblify.com>
Image Campus <https://www.imagecampus.edu.ar>
Yakaz.com <https://yakaz.com>
Moonwards <https://www.moonwards.com>
## Mini sponsors
AD Ford
Alan Beauchamp
Anandarup Mallik
Anand Mallik
Andres Hernandez
Andrew Dunai
Arda Erol
Brandon Lamb
Christian Uldall Pedersen
Christoph Woinke
Christian Baune
Christopher Montesano
Darkhan Baimyrza
Darrin Massena
Dov Zimring
Edward Flick
Gamechuck
GameDev.net
GameDev.tv
Grady
Hein-Pieter van Braam
Jamal Alyafei
Javary Games
Jay Sistar
Jacob McKenney
Javary Co.
Jeffery Chiu
Justin Arnold
Justo Delgado Baudí
Kyle Szklenski
Leonard Meagher
Ludosity AB
Matthieu Huvé
Maxim Karsten
Mike King
Nathan Warden
Neal Gompa (Conan Kudo)
Patrick Aarstad
"Rainway "
Ruslan Mustakov
Péter Magyar
Slobodan Milnovic
StarFlare Software
Stephan Lanfermann
Stoney Meyerhoeffer
thechris
Steve
Tristan Pemble
VilliHaukka
Zashi
## Gold donors
Asdf
Brandon Waite
cheese65536
Andrei
Dave
David Gehrig
David Snopek
Ed Morley
Florian Krick
Florian Rämisch
Jakub Grzesik
K9Kraken
Manuele Finocchiaro
Nathanael Beisiegel
Officine Pixel S.n.c.
Retro Village
Ronan Zeegers
Sofox
Taylor Ritenour
Zaven Muradyan
Allen Schade
Andreas Schüle
Asher Glick
Austen McRae
Bernhard Werner
beVR
Carlo Cabanilla
Daniel James
Daniel Lynn
David Giardi
Edward E
Default Name
eggs
Felix Bohmann
Florian Breisch
Gary Oberbrunner
Gero
Gamejunkey
Javier Roman
Jay Horton
Jon Smith
Jon Woodward
Jorge Bernal
Joshua Lesperance
Justo Delgado Baudí
Krzysztof Dluzniewski
Moonwards
Mored1984
Not Invader Zim
paul gruenbacher
Paul LaMotte
Karl Werf
Keinan Powers
Klavdij Voncina
Lex Steers
Luke
Maciej Pendolski
Matthew Hillier
Mohamed Ikbel Boulabiar
Mored4u
Rob Messick
Ryan Badour
Sandro Jenny
Scott Wadden
Sergey
Svenne Krap
thechris
Tom Langwaldt
tukon
William Wold
Wyatt Goodin
Xananax
BanjoNode2D
Beliar
Alex Khayrullin
Chris Goddard
Chris Serino
Christian Padilla
Conrad Curry
Craig Smith
Daniel Egger
Dean Harmon
Darrian Little
Horváth Péter
Ivan Trombley
Jakub Dering
Joan Fons
Joshua Flores
Krzysztof Jankowski
Lord Bloodhound
Lucas Ferreira Franca
Nathan Lundquist
Pascal Grüter
Petr Malac
Rami
Reneator
Rob
Robert Willes
Robin Arys
Ronnie Ashlock
ScottMakesGames
SKison
Thomas Bjarnelöf
Unseen Domains
Valryia
Vincent Henderson
Wojciech Chojnacki
Xavier PATRICELLI
Alessandra Pereyra
Adam Nakonieczny
Adam Neumann
Alexander J Maynard
Alexey Dyadchenko
Andrew Bowen
Benjamin W Flint
Chau Siu Hung
Chris Goddard
Alex Z
Andreas Funke
André Frélicot
aoshiwik
Ben Powell
Carlos de Sousa Marques
Charlie Whitfield
Chase Taranto
Chris Petrich
Christian Leth Jeppesen
Christoph Schröder
Cody Parker
ComicSads
Coldragon
Craig Ostrin
D
Deadly Lampshade
E.G.
Eric
Daniel Eichler
David White
Denis Janßen
Easypete
Eric Monson
Ethan Bennis
ethan ball
Eugenio Hugo Salgüero Jáñez
Fain
flesk
Gary Hulst
gavlig
GGGames.org
Giles Montgomery
Giovanni Solimeno
Green Fox
Guilherme Felipe de C. G. da Silva
Halom Vered
Heath Hayes
Hysteria
Jalal Chaabane
Jeppe Zapp
Idzard Kwadijk
Isaac Clausman
Jared White
Jeff Nyte
Jeremy Sims
Jerry Ling
Joe Flood
John G Gentzel
Jon Hermansen
Jose Malheiro
Juan T Chen
Joshua Lesperance
Juan Velandia
Juraj Móza
Kasper Jeppesen
Klavdij Voncina
Leandro Voltolino
Lukáš Rendvanský
Marius Kamm
kinfox
Marcelo Dornbusch Lopes
Markus Fehr
Markus Wiesner
Martin Eigel
Marvin
Matt Eunson
Max R.R. Collada
Max Bulai
MuffinManKen
Nick Nikitin
Oliver Dick
oziatek
Patrick Ting
Paul Hocker
Paul Von Zimmerman
Pete Goodwin
pl
Ranoller
ray-tracer
Ruben Soares Luis
Robert Larnach
Rocknight Studios
Romildo Franco
Samuel Judd
Sofox
Scott Pilet
Sean Morgan
SleepCircle
spilldata
Steve Hyatt
Stoned Xander
TheLevelOfDetail .
Thomas Krampl
Thomas Kurz
Tobias Bocanegra
WytRabbit
Xavier Fumado Beltran
Tricky Fat Cat
Urho
William Foster
Zhou Tuizhi
Zie Weaver
蕭惟允
## Silver donors
1D_Inc
Abraham Haskins
Adam
Adam Brunnmeier
Adam Carr
Adam Nakonieczny
Adam Long
Adam McCurdy
Adam N Webber
Adam Smeltzer
Adam Szymański
Adisibio
Adrian Demetrescu
Agustinus Arya
Aidan O'Flannagain
Aki Mimoto
Alan Mervitz
Alan Stice
Albin Jonasson Svärdsby
Alder Stefano
Alessandro Senese
Alexander Gillberg
Alexander Koppe
Alice Robinson
Alexander Erlemann
alex clavelle
Allan Davis
Allen Schade
Andreas Evers
Andreas Krampitz
Anthony Bongiovanni
Arbor Interactive
André Simões
Andrew Thomas
Anthony Staunton
AP Condomines
Arda Erol
Armin Preiml
Arseniy M
Arthur S. Muszynski
Asger
Aubrey Falconer
Avencherus
Bailey
B A
Balázs Batári
Bastian Böhm
Benedikt
Ben G
Ben Phelan
Ben Vercammen
Bernd Jänichen
Black Block
Blair Allen
Brandon
Brandon Schaffer
Bryan Stevenson
Carl Winder
Bobby CC Wong
brian
bugcaptor
Burney Waring
Cameron Meyer
Carl van der Geest
Carwyn Edwards
Cassidy James
Chris Brown
Chris Chapin
Christian Baune
Christian Winter
Christoffer Sundbom
Chris Wilson
Collin Shooltz
Connor Hill
Christoph Brodmann
Christopher Schmitt
Christoph Woinke
Clay Heaton
Curt King
Dancin Liao
Daniel Johnson
DanielMaximiano
Daniel Reed
David Cravens
Daniel Kimblad
Daniel Pontillo
David May
David Woodard
DiCola Jamn
Dominic Cooney
Dominik Wetzel
Donn Eddy
Donovan Hutcheon
Dragontrapper
Dr Ewan Murray
Duobix
Duodecimal
Dylan Todd
Eduardo Teixeira
Edward Herbert
Edward Moulsdale
Edward Swartz
Egon Elbre
Elias Nykrem
Elmeri '- Duy Kevin Nguyen
Emanuel Kotzayan
Eric Martini
Eric McCarthy
Ephemeral
Eric Ellingson
Eric Rogers
Eric Williams
Fabian Becker
fengjiongmax
Foomf
G3Dev sàrl
Gerrit Großkopf
Grant Clarke
Erkki Seppälä
Evan Rose
Fancy Ants Studios
Fekinox
Felix Kollmann
Flaredown
Forty Doubleu
FuDiggity
Gadzhi Kharkharov
gamedev by Celio
Gary Thomas
George Marques
GiulianoB
Gordian Arragon
Greg Olson
GREGORY C FEIN
Greg P
Greyson Richey
Grid
Guldoman
Haley Aycock
Hal A
Heribert Hirth
Hiroshi Naruo
Hudson Thorpe-Doubble
Hunter Jones
ialex32x
Igor Buzatovic
Hylpher
Ichiro Dohi
Iiari
iKlem
IndustrialRobot
Jaiden Gerig
Jaime Ruiz-Borau Vizárraga
Jako Danar
James A F Manley
Janders
Jannik Gröger
JARKKO PARVIAINEN
Jarrod Davis
Jeff Hungerford
Jennifer Graves
Jeremy Kahn
Jesse Dubay
Joel Fivat
Joel Höglund
Joel Setterberg
Johannes Wuensch
John Gabriel
Jomei Jackson
Jonas Rudlang
Jonas Yamazaki
Jonathan G
Jonathan Nieto
Jonathon
Jon Bonazza
Jon Sully
Josh 'Cheeseness' Bush
Jorge Caballero
Jose Aleman
Jose C. Rubio
Joseph Catrambone
Juanfran
Juan Negrier
Judd
Julian Murgia
Kajornthep Piyanun
KC Chan
Kevin Boyer
JungleRobba
Justin Spedding
KaDokta
Kauzig
Keedong Park
Keith Bradner
Kevin McPhillips
kickmaniac
Kiyohiro Kawamura (kyorohiro)
Kjetil Haugland
Klagsam
KR McGinley
KsyTek Games
Kuan Cheang
kycho
Kyle Appelgate
Laurent Tréguier
Leonardo Dimano
Levi Lindsey
Linus Lind Lundgren
Luis Moraes
Macil
magodev
Lionel Gaillard
Luigi Renna
LunaticInAHat
Lurkars
Major Haul
Malcolm
Malik Ahmed
Malik Nejer
Markus Michael Egger
Matthias Grandis
Matt Welke
Martin Holas
Martin Liška
Marvin
Mathieu Rimelen
Matt Edwards
Matthew Little
Matti Pohjanvirta
Maxime Blade
Maxwell
medecau
Mertcan Mermerkaya
Megasploot
Melissa Mears
mewin
mhilbrunner
Michael Dürwald
Michael Gringauz
Michael Haney
Michael Labbe
Mikael Olsson
Mikayla Hutchinson
Mikayla
Mike Birkhead
Mike Cunningham
Mitchell J. Wagner
MoM
Moritz Laass
Moritz Weissenberger
Nathan Fish
Natrim
nee
Neil Blakey-Milner
Neil Wang
Nerdforge
Nick Pavlica
Niclas Eriksen
Nicholas
Nicholas Girga
Nick Macholl
Nicolás Montaña
Nicolas SAN AGUSTIN
Nima Farid
NZ
Oleg Reva
Olivier
Omar Delarosa
Oscar Norlander
Pan Ip
Patrick Nafarrete
Paul Gieske
Paul Mason
Paweł Kowal
Phillip Ryals
Pierre-Igor Berthet
Pietro Vertechi
Piotr Kaczmarski
Prokhorenko Leonid
Psyagnostic
Rafael
Pedro Assuncao
Penguin
Petrus Prinsloo
Philip Cohoe
Point08
Rad Cat
Rafa Laguna
rainerLinux
Raphael Leroux
Remi Rampin
Rémi Verschelde
Ricardo Alcantara
Richman Stewart
Richard Diss
Richard Ivánek
Robert Farr (Larington)
Roger Burgess
Robert Hernandez
Roberto Sánchez
Roger Smith
Roland Rząsa
Roman Tinkov
Ryan Cheung
Ronald Ho Hip (CrimsonZA)
Ronan
Ryan Groom
Ryan Hentz
Sam.C
Sam Edson
Samuele Zolfanelli
Sasori Olkof
Scott D. Yelich
Scott Longley
Sebastian Michailidis
Sergio Mello-Grand
sgnsajgon
Shane
Shane Sicienski
Shane Spoor
Siim Raidma
Simon Wenner
Sootstone
Theo Cranmore
Thibault Barbaroux
Thomas Bell
Thomas Holmes
SK
smbe19
smo1704
Svenne Krap
Terry
tezuvholovdr
thomas
Thomas Bechtold
Thomas Detoy
Thomas Kelly
Thomas Kurz
tiansheng li
Tim
Tim Drumheller
Tom Larrow
Timothy B. MacDonald
Tobbun
Torgeir Lilleskog
Torsten Crass
Travis O'Brien
Trent Skinner
Troy Bonneau
Tryggve Sollid
Turgut Temucin
Tyler Compton
Tyler Stafos
UltyX
Vaiktorg
Vaughan Ling
Victor
Viktor Ferenczi
Vigilant Watch
Vincent Cloutier
waka nya
Wayne Haak
werner mendizabal
William Gervasio
Wiley Thompson
Will
William Hogben
Wout Standaert
Wyatt Goodin
Yegor
Yuri Sizov
## Bronze donors

View File

@ -1,3 +1,5 @@
Godot Logo (C) Andrea Calabró
Distributed under the terms of the Creative Commons Attribution License
version 3.0 (CC-BY 3.0) <https://creativecommons.org/licenses/by/3.0/legalcode>.
Godot Engine Logo
Copyright (c) 2017 Andrea Calabró
This work is licensed under a Creative Commons Attribution 4.0 International
License (CC-BY-4.0 International) <https://creativecommons.org/licenses/by/4.0/>.

View File

@ -5,7 +5,6 @@ EnsureSConsVersion(0, 98, 1)
# System
import glob
import os
import string
import sys
# Local
@ -83,8 +82,6 @@ env_base.android_permission_chunk = ""
env_base.android_appattributes_chunk = ""
env_base.disabled_modules = []
env_base.use_ptrcall = False
env_base.split_drivers = False
env_base.split_modules = False
env_base.module_version_string = ""
env_base.msvc = False
@ -158,6 +155,7 @@ opts.Add(BoolVariable('dev', "If yes, alias for verbose=yes warnings=all", False
opts.Add('extra_suffix', "Custom extra suffix added to the base filename of all generated binary files", '')
opts.Add(BoolVariable('vsproj', "Generate a Visual Studio solution", False))
opts.Add(EnumVariable('macports_clang', "Build using Clang from MacPorts", 'no', ('no', '5.0', 'devel')))
opts.Add(BoolVariable('split_libmodules', "Split intermediate libmodules.a in smaller chunks to prevent exceeding linker command line size (forced to True when using MinGW)", False))
opts.Add(BoolVariable('disable_3d', "Disable 3D nodes for a smaller executable", False))
opts.Add(BoolVariable('disable_advanced_gui', "Disable advanced GUI nodes and behaviors", False))
opts.Add(BoolVariable('no_editor_splash', "Don't use the custom splash screen for the editor", False))
@ -181,7 +179,6 @@ opts.Add(BoolVariable('builtin_opus', "Use the built-in Opus library", True))
opts.Add(BoolVariable('builtin_pcre2', "Use the built-in PCRE2 library)", True))
opts.Add(BoolVariable('builtin_recast', "Use the built-in Recast library", True))
opts.Add(BoolVariable('builtin_squish', "Use the built-in squish library", True))
opts.Add(BoolVariable('builtin_thekla_atlas', "Use the built-in thekla_altas library", True))
opts.Add(BoolVariable('builtin_xatlas', "Use the built-in xatlas library", True))
opts.Add(BoolVariable('builtin_zlib', "Use the built-in zlib library", True))
opts.Add(BoolVariable('builtin_zstd', "Use the built-in Zstd library", True))
@ -342,12 +339,18 @@ if selected_platform in platform_list:
shadow_local_warning = []
all_plus_warnings = ['-Wwrite-strings']
if methods.use_gcc(env):
if methods.using_gcc(env):
version = methods.get_compiler_version(env)
if version != None and version[0] >= '7':
shadow_local_warning = ['-Wshadow-local']
if (env["warnings"] == 'extra'):
env.Append(CCFLAGS=['-Wall', '-Wextra'] + all_plus_warnings + shadow_local_warning)
# FIXME: enable -Wclobbered once #26351 is fixed
# 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', '-Wno-unused-parameter'] + all_plus_warnings + shadow_local_warning)
if methods.using_gcc(env):
env['CCFLAGS'] += ['-Wno-clobbered']
elif (env["warnings"] == 'all'):
env.Append(CCFLAGS=['-Wall'] + shadow_local_warning)
elif (env["warnings"] == 'moderate'):

View File

@ -121,6 +121,8 @@ if env['builtin_zstd']:
"compress/zstd_ldm.c",
"compress/zstd_opt.c",
"compress/zstdmt_compress.c",
"compress/zstd_compress_literals.c",
"compress/zstd_compress_sequences.c",
"decompress/huf_decompress.c",
"decompress/zstd_ddict.c",
"decompress/zstd_decompress_block.c",

View File

@ -792,7 +792,7 @@ Dictionary _OS::get_datetime_from_unix_time(int64_t unix_time_val) const {
size_t imonth = 0;
while (dayno >= MONTH_DAYS_TABLE[LEAPYEAR(year)][imonth]) {
while ((unsigned long)dayno >= MONTH_DAYS_TABLE[LEAPYEAR(year)][imonth]) {
dayno -= MONTH_DAYS_TABLE[LEAPYEAR(year)][imonth];
imonth++;
}
@ -1908,18 +1908,18 @@ bool _File::file_exists(const String &p_name) const {
return FileAccess::exists(p_name);
}
void _File::store_var(const Variant &p_var) {
void _File::store_var(const Variant &p_var, bool p_full_objects) {
ERR_FAIL_COND(!f);
int len;
Error err = encode_variant(p_var, NULL, len);
Error err = encode_variant(p_var, NULL, len, p_full_objects);
ERR_FAIL_COND(err != OK);
PoolVector<uint8_t> buff;
buff.resize(len);
PoolVector<uint8_t>::Write w = buff.write();
err = encode_variant(p_var, &w[0], len);
err = encode_variant(p_var, &w[0], len, p_full_objects);
ERR_FAIL_COND(err != OK);
w = PoolVector<uint8_t>::Write();
@ -1927,7 +1927,7 @@ void _File::store_var(const Variant &p_var) {
store_buffer(buff);
}
Variant _File::get_var() const {
Variant _File::get_var(bool p_allow_objects) const {
ERR_FAIL_COND_V(!f, Variant());
uint32_t len = get_32();
@ -1937,7 +1937,7 @@ Variant _File::get_var() const {
PoolVector<uint8_t>::Read r = buff.read();
Variant v;
Error err = decode_variant(v, &r[0], len);
Error err = decode_variant(v, &r[0], len, NULL, p_allow_objects);
ERR_FAIL_COND_V(err != OK, Variant());
return v;
@ -1980,7 +1980,7 @@ void _File::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_endian_swap"), &_File::get_endian_swap);
ClassDB::bind_method(D_METHOD("set_endian_swap", "enable"), &_File::set_endian_swap);
ClassDB::bind_method(D_METHOD("get_error"), &_File::get_error);
ClassDB::bind_method(D_METHOD("get_var"), &_File::get_var);
ClassDB::bind_method(D_METHOD("get_var", "allow_objects"), &_File::get_var, DEFVAL(false));
ClassDB::bind_method(D_METHOD("store_8", "value"), &_File::store_8);
ClassDB::bind_method(D_METHOD("store_16", "value"), &_File::store_16);
@ -1993,7 +1993,7 @@ void _File::_bind_methods() {
ClassDB::bind_method(D_METHOD("store_line", "line"), &_File::store_line);
ClassDB::bind_method(D_METHOD("store_csv_line", "values", "delim"), &_File::store_csv_line, DEFVAL(","));
ClassDB::bind_method(D_METHOD("store_string", "string"), &_File::store_string);
ClassDB::bind_method(D_METHOD("store_var", "value"), &_File::store_var);
ClassDB::bind_method(D_METHOD("store_var", "value", "full_objects"), &_File::store_var, DEFVAL(false));
ClassDB::bind_method(D_METHOD("store_pascal_string", "string"), &_File::store_pascal_string);
ClassDB::bind_method(D_METHOD("get_pascal_string"), &_File::get_pascal_string);
@ -2223,17 +2223,17 @@ _Marshalls *_Marshalls::get_singleton() {
return singleton;
}
String _Marshalls::variant_to_base64(const Variant &p_var) {
String _Marshalls::variant_to_base64(const Variant &p_var, bool p_full_objects) {
int len;
Error err = encode_variant(p_var, NULL, len);
Error err = encode_variant(p_var, NULL, len, p_full_objects);
ERR_FAIL_COND_V(err != OK, "");
PoolVector<uint8_t> buff;
buff.resize(len);
PoolVector<uint8_t>::Write w = buff.write();
err = encode_variant(p_var, &w[0], len);
err = encode_variant(p_var, &w[0], len, p_full_objects);
ERR_FAIL_COND_V(err != OK, "");
int b64len = len / 3 * 4 + 4 + 1;
@ -2249,7 +2249,7 @@ String _Marshalls::variant_to_base64(const Variant &p_var) {
return ret;
};
Variant _Marshalls::base64_to_variant(const String &p_str) {
Variant _Marshalls::base64_to_variant(const String &p_str, bool p_allow_objects) {
int strlen = p_str.length();
CharString cstr = p_str.ascii();
@ -2261,7 +2261,7 @@ Variant _Marshalls::base64_to_variant(const String &p_str) {
int len = base64_decode((char *)(&w[0]), (char *)cstr.get_data(), strlen);
Variant v;
Error err = decode_variant(v, &w[0], len);
Error err = decode_variant(v, &w[0], len, NULL, p_allow_objects);
ERR_FAIL_COND_V(err != OK, Variant());
return v;
@ -2340,8 +2340,8 @@ String _Marshalls::base64_to_utf8(const String &p_str) {
void _Marshalls::_bind_methods() {
ClassDB::bind_method(D_METHOD("variant_to_base64", "variant"), &_Marshalls::variant_to_base64);
ClassDB::bind_method(D_METHOD("base64_to_variant", "base64_str"), &_Marshalls::base64_to_variant);
ClassDB::bind_method(D_METHOD("variant_to_base64", "variant", "full_objects"), &_Marshalls::variant_to_base64, DEFVAL(false));
ClassDB::bind_method(D_METHOD("base64_to_variant", "base64_str", "allow_objects"), &_Marshalls::base64_to_variant, DEFVAL(false));
ClassDB::bind_method(D_METHOD("raw_to_base64", "array"), &_Marshalls::raw_to_base64);
ClassDB::bind_method(D_METHOD("base64_to_raw", "base64_str"), &_Marshalls::base64_to_raw);

View File

@ -463,7 +463,7 @@ public:
double get_double() const;
real_t get_real() const;
Variant get_var() const;
Variant get_var(bool p_allow_objects = false) const;
PoolVector<uint8_t> get_buffer(int p_length) const; ///< get an array of bytes
String get_line() const;
@ -500,7 +500,7 @@ public:
void store_buffer(const PoolVector<uint8_t> &p_buffer); ///< store an array of bytes
void store_var(const Variant &p_var);
void store_var(const Variant &p_var, bool p_full_objects = false);
bool file_exists(const String &p_name) const; ///< return true if a file exists
@ -569,8 +569,8 @@ protected:
public:
static _Marshalls *get_singleton();
String variant_to_base64(const Variant &p_var);
Variant base64_to_variant(const String &p_str);
String variant_to_base64(const Variant &p_var, bool p_full_objects = false);
Variant base64_to_variant(const String &p_str, bool p_allow_objects = false);
String raw_to_base64(const PoolVector<uint8_t> &p_arr);
PoolVector<uint8_t> base64_to_raw(const String &p_str);

View File

@ -249,6 +249,11 @@ void ClassDB::set_current_api(APIType p_api) {
current_api = p_api;
}
ClassDB::APIType ClassDB::get_current_api() {
return current_api;
}
HashMap<StringName, ClassDB::ClassInfo> ClassDB::classes;
HashMap<StringName, StringName> ClassDB::resource_base_extensions;
HashMap<StringName, StringName> ClassDB::compat_classes;

View File

@ -371,6 +371,7 @@ public:
static void init();
static void set_current_api(APIType p_api);
static APIType get_current_api();
static void cleanup();
};

View File

@ -39,7 +39,7 @@
*/
enum Error {
OK,
OK, // (0)
FAILED, ///< Generic fail error
ERR_UNAVAILABLE, ///< What is requested is unsupported/unavailable
ERR_UNCONFIGURED, ///< The object being used hasn't been properly set up yet
@ -69,12 +69,12 @@ enum Error {
ERR_CONNECTION_ERROR,
ERR_CANT_ACQUIRE_RESOURCE,
ERR_CANT_FORK,
ERR_INVALID_DATA, ///< Data passed is invalid (30)
ERR_INVALID_DATA, ///< Data passed is invalid (30)
ERR_INVALID_PARAMETER, ///< Parameter passed is invalid
ERR_ALREADY_EXISTS, ///< When adding, item already exists
ERR_DOES_NOT_EXIST, ///< When retrieving/erasing, it item does not exist
ERR_DOES_NOT_EXIST, ///< When retrieving/erasing, if item does not exist
ERR_DATABASE_CANT_READ, ///< database is full
ERR_DATABASE_CANT_WRITE, ///< database is full (35)
ERR_DATABASE_CANT_WRITE, ///< database is full (35)
ERR_COMPILATION_FAILED,
ERR_METHOD_NOT_FOUND,
ERR_LINK_FAILED,

View File

@ -470,47 +470,55 @@ void register_global_constants() {
// error list
BIND_GLOBAL_ENUM_CONSTANT(OK);
BIND_GLOBAL_ENUM_CONSTANT(FAILED); ///< Generic fail error
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAVAILABLE); ///< What is requested is unsupported/unavailable
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNCONFIGURED); ///< The object being used hasn't been properly set up yet
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAUTHORIZED); ///< Missing credentials for requested resource
BIND_GLOBAL_ENUM_CONSTANT(ERR_PARAMETER_RANGE_ERROR); ///< Parameter given out of range
BIND_GLOBAL_ENUM_CONSTANT(ERR_OUT_OF_MEMORY); ///< Out of memory
BIND_GLOBAL_ENUM_CONSTANT(OK); // (0)
BIND_GLOBAL_ENUM_CONSTANT(FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAVAILABLE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNCONFIGURED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAUTHORIZED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_PARAMETER_RANGE_ERROR); // (5)
BIND_GLOBAL_ENUM_CONSTANT(ERR_OUT_OF_MEMORY);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NOT_FOUND);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_BAD_DRIVE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_BAD_PATH);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NO_PERMISSION);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NO_PERMISSION); // (10)
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_ALREADY_IN_USE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_OPEN);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_WRITE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_READ);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_UNRECOGNIZED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_UNRECOGNIZED); // (15)
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CORRUPT);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_MISSING_DEPENDENCIES);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_EOF);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_OPEN); ///< Can't open a resource/socket/file
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_CREATE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_PARSE_ERROR);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_OPEN);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_CREATE); // (20)
BIND_GLOBAL_ENUM_CONSTANT(ERR_QUERY_FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_IN_USE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_LOCKED); ///< resource is locked
BIND_GLOBAL_ENUM_CONSTANT(ERR_LOCKED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_TIMEOUT);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_CONNECT); // (25)
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_RESOLVE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CONNECTION_ERROR);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_ACQUIRE_RESOURCE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_DATA); ///< Data passed is invalid
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_PARAMETER); ///< Parameter passed is invalid
BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_EXISTS); ///< When adding ), item already exists
BIND_GLOBAL_ENUM_CONSTANT(ERR_DOES_NOT_EXIST); ///< When retrieving/erasing ), it item does not exist
BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_READ); ///< database is full
BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_WRITE); ///< database is full
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_FORK);
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_DATA); // (30)
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_PARAMETER);
BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_EXISTS);
BIND_GLOBAL_ENUM_CONSTANT(ERR_DOES_NOT_EXIST);
BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_READ);
BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_WRITE); // (35)
BIND_GLOBAL_ENUM_CONSTANT(ERR_COMPILATION_FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_METHOD_NOT_FOUND);
BIND_GLOBAL_ENUM_CONSTANT(ERR_LINK_FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_SCRIPT_FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CYCLIC_LINK);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CYCLIC_LINK); // (40)
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_DECLARATION);
BIND_GLOBAL_ENUM_CONSTANT(ERR_DUPLICATE_SYMBOL);
BIND_GLOBAL_ENUM_CONSTANT(ERR_PARSE_ERROR);
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUSY);
BIND_GLOBAL_ENUM_CONSTANT(ERR_HELP); ///< user requested help!!
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUG); ///< a bug in the software certainly happened ), due to a double check failing or unexpected behavior.
BIND_GLOBAL_ENUM_CONSTANT(ERR_SKIP); // (45)
BIND_GLOBAL_ENUM_CONSTANT(ERR_HELP);
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUG);
BIND_GLOBAL_ENUM_CONSTANT(ERR_PRINTER_ON_FIRE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_NONE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RANGE);

View File

@ -175,7 +175,9 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p
} break;
case MODE_ZSTD: {
ZSTD_DCtx *dctx = ZSTD_createDCtx();
if (zstd_long_distance_matching) ZSTD_DCtx_setMaxWindowSize(dctx, (size_t)1 << zstd_window_log_size);
if (zstd_long_distance_matching) {
ZSTD_DCtx_setParameter(dctx, ZSTD_d_windowLogMax, zstd_window_log_size);
}
int ret = ZSTD_decompressDCtx(dctx, p_dst, p_dst_max_size, p_src, p_src_size);
ZSTD_freeDCtx(dctx);
return ret;
@ -189,4 +191,4 @@ int Compression::zlib_level = Z_DEFAULT_COMPRESSION;
int Compression::gzip_level = Z_DEFAULT_COMPRESSION;
int Compression::zstd_level = 3;
bool Compression::zstd_long_distance_matching = false;
int Compression::zstd_window_log_size = 27;
int Compression::zstd_window_log_size = 27; // ZSTD_WINDOWLOG_LIMIT_DEFAULT

View File

@ -208,7 +208,8 @@ void FileAccessCompressed::seek(size_t p_position) {
if (p_position == read_total) {
at_end = true;
} else {
at_end = false;
read_eof = false;
int block_idx = p_position / block_size;
if (block_idx != read_block) {

View File

@ -90,7 +90,7 @@ void PackedData::add_path(const String &pkg_path, const String &path, uint64_t o
}
}
String filename = path.get_file();
// Don't add as a file if the path points to a directoryy
// Don't add as a file if the path points to a directory
if (!filename.empty()) {
cd->files.insert(filename);
}
@ -272,7 +272,7 @@ int FileAccessPack::get_buffer(uint8_t *p_dst, int p_length) const {
if (eof)
return 0;
int64_t to_read = p_length;
uint64_t to_read = p_length;
if (to_read + pos > pf.size) {
eof = true;
to_read = int64_t(pf.size) - int64_t(pos);
@ -463,11 +463,15 @@ String DirAccessPack::get_current_dir() {
bool DirAccessPack::file_exists(String p_file) {
p_file = fix_path(p_file);
return current->files.has(p_file);
}
bool DirAccessPack::dir_exists(String p_dir) {
p_dir = fix_path(p_dir);
return current->subdirs.has(p_dir);
}

View File

@ -346,6 +346,12 @@ Error HTTPClient::poll() {
} else {
// We are already handshaking, which means we can use your already active SSL connection
ssl = static_cast<Ref<StreamPeerSSL> >(connection);
if (ssl.is_null()) {
close();
status = STATUS_SSL_HANDSHAKE_ERROR;
return ERR_CANT_CONNECT;
}
ssl->poll(); // Try to finish the handshake
}

View File

@ -37,13 +37,11 @@
#include <limits.h>
#include <stdio.h>
#define _S(a) ((int32_t)a)
#define ERR_FAIL_ADD_OF(a, b, err) ERR_FAIL_COND_V(_S(b) < 0 || _S(a) < 0 || _S(a) > INT_MAX - _S(b), err)
#define ERR_FAIL_MUL_OF(a, b, err) ERR_FAIL_COND_V(_S(a) < 0 || _S(b) <= 0 || _S(a) > INT_MAX / _S(b), err)
void EncodedObjectAsID::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_object_id", "id"), &EncodedObjectAsID::set_object_id);
ClassDB::bind_method(D_METHOD("get_object_id"), &EncodedObjectAsID::get_object_id);
ADD_PROPERTY(PropertyInfo(Variant::INT, "object_id"), "set_object_id", "get_object_id");
}
void EncodedObjectAsID::set_object_id(ObjectID p_id) {
@ -59,6 +57,10 @@ EncodedObjectAsID::EncodedObjectAsID() :
id(0) {
}
#define _S(a) ((int32_t)a)
#define ERR_FAIL_ADD_OF(a, b, err) ERR_FAIL_COND_V(_S(b) < 0 || _S(a) < 0 || _S(a) > INT_MAX - _S(b), err)
#define ERR_FAIL_MUL_OF(a, b, err) ERR_FAIL_COND_V(_S(a) < 0 || _S(b) <= 0 || _S(a) > INT_MAX / _S(b), err)
#define ENCODE_MASK 0xFF
#define ENCODE_FLAG_64 1 << 16
#define ENCODE_FLAG_OBJECT_AS_ID 1 << 16
@ -794,7 +796,7 @@ static void _encode_string(const String &p_string, uint8_t *&buf, int &r_len) {
}
}
Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_object_as_id) {
Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_full_objects) {
uint8_t *buf = r_buffer;
@ -819,7 +821,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
}
} break;
case Variant::OBJECT: {
if (p_object_as_id) {
if (!p_full_objects) {
flags |= ENCODE_FLAG_OBJECT_AS_ID;
}
} break;
@ -1086,22 +1088,8 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
} break;
case Variant::OBJECT: {
if (p_object_as_id) {
if (p_full_objects) {
if (buf) {
Object *obj = p_variant;
ObjectID id = 0;
if (obj && ObjectDB::instance_validate(obj)) {
id = obj->get_instance_id();
}
encode_uint64(id, buf);
}
r_len += 8;
} else {
Object *obj = p_variant;
if (!obj) {
if (buf) {
@ -1139,7 +1127,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
_encode_string(E->get().name, buf, r_len);
int len;
Error err = encode_variant(obj->get(E->get().name), buf, len, p_object_as_id);
Error err = encode_variant(obj->get(E->get().name), buf, len, p_full_objects);
if (err)
return err;
ERR_FAIL_COND_V(len % 4, ERR_BUG);
@ -1148,6 +1136,19 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
buf += len;
}
}
} else {
if (buf) {
Object *obj = p_variant;
ObjectID id = 0;
if (obj && ObjectDB::instance_validate(obj)) {
id = obj->get_instance_id();
}
encode_uint64(id, buf);
}
r_len += 8;
}
} break;
@ -1180,14 +1181,14 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len++; //pad
*/
int len;
encode_variant(E->get(), buf, len, p_object_as_id);
encode_variant(E->get(), buf, len, p_full_objects);
ERR_FAIL_COND_V(len % 4, ERR_BUG);
r_len += len;
if (buf)
buf += len;
Variant *v = d.getptr(E->get());
ERR_FAIL_COND_V(!v, ERR_BUG);
encode_variant(*v, buf, len, p_object_as_id);
encode_variant(*v, buf, len, p_full_objects);
ERR_FAIL_COND_V(len % 4, ERR_BUG);
r_len += len;
if (buf)
@ -1209,7 +1210,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
for (int i = 0; i < v.size(); i++) {
int len;
encode_variant(v.get(i), buf, len, p_object_as_id);
encode_variant(v.get(i), buf, len, p_full_objects);
ERR_FAIL_COND_V(len % 4, ERR_BUG);
r_len += len;
if (buf)
@ -1229,11 +1230,15 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
buf += 4;
PoolVector<uint8_t>::Read r = data.read();
copymem(buf, &r[0], datalen * datasize);
buf += datalen * datasize;
}
r_len += 4 + datalen * datasize;
while (r_len % 4)
while (r_len % 4) {
r_len++;
if (buf)
*(buf++) = 0;
}
} break;
case Variant::POOL_INT_ARRAY: {

View File

@ -199,7 +199,7 @@ public:
EncodedObjectAsID();
};
Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len = NULL, bool p_allow_objects = true);
Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_object_as_id = false);
Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len = NULL, bool p_allow_objects = false);
Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_full_objects = false);
#endif

View File

@ -46,7 +46,8 @@ _FORCE_INLINE_ bool _should_call_local(MultiplayerAPI::RPCMode mode, bool is_mas
case MultiplayerAPI::RPC_MODE_MASTERSYNC: {
if (is_master)
r_skip_rpc = true; // I am the master, so skip remote call.
} // Do not break, fall over to other sync.
FALLTHROUGH;
}
case MultiplayerAPI::RPC_MODE_REMOTESYNC:
case MultiplayerAPI::RPC_MODE_PUPPETSYNC: {
// Call it, sync always results in a local call.
@ -282,8 +283,9 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const StringName &p_name, int p_
rpc_mode = p_node->get_script_instance()->get_rpc_mode(p_name);
}
ERR_EXPLAIN("RPC '" + String(p_name) + "' is not allowed from: " + itos(p_from) + ". Mode is " + itos((int)rpc_mode) + ", master is " + itos(p_node->get_network_master()) + ".");
ERR_FAIL_COND(!_can_call_mode(p_node, rpc_mode, p_from));
bool can_call = _can_call_mode(p_node, rpc_mode, p_from);
ERR_EXPLAIN("RPC '" + String(p_name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)rpc_mode) + ", master is " + itos(p_node->get_network_master()) + ".");
ERR_FAIL_COND(!can_call);
int argc = p_packet[p_offset];
Vector<Variant> args;
@ -299,7 +301,7 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const StringName &p_name, int p_
ERR_FAIL_COND(p_offset >= p_packet_len);
int vlen;
Error err = decode_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen);
Error err = decode_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen, allow_object_decoding || network_peer->is_object_decoding_allowed());
ERR_EXPLAIN("Invalid packet received. Unable to decode RPC argument.");
ERR_FAIL_COND(err != OK);
@ -331,11 +333,12 @@ void MultiplayerAPI::_process_rset(Node *p_node, const StringName &p_name, int p
rset_mode = p_node->get_script_instance()->get_rset_mode(p_name);
}
ERR_EXPLAIN("RSET '" + String(p_name) + "' is not allowed from: " + itos(p_from) + ". Mode is " + itos((int)rset_mode) + ", master is " + itos(p_node->get_network_master()) + ".");
ERR_FAIL_COND(!_can_call_mode(p_node, rset_mode, p_from));
bool can_call = _can_call_mode(p_node, rset_mode, p_from);
ERR_EXPLAIN("RSET '" + String(p_name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)rset_mode) + ", master is " + itos(p_node->get_network_master()) + ".");
ERR_FAIL_COND(!can_call);
Variant value;
Error err = decode_variant(value, &p_packet[p_offset], p_packet_len - p_offset);
Error err = decode_variant(value, &p_packet[p_offset], p_packet_len - p_offset, NULL, allow_object_decoding || network_peer->is_object_decoding_allowed());
ERR_EXPLAIN("Invalid packet received. Unable to decode RSET value.");
ERR_FAIL_COND(err != OK);
@ -526,11 +529,11 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
if (p_set) {
// Set argument.
Error err = encode_variant(*p_arg[0], NULL, len);
Error err = encode_variant(*p_arg[0], NULL, len, allow_object_decoding || network_peer->is_object_decoding_allowed());
ERR_EXPLAIN("Unable to encode RSET value. THIS IS LIKELY A BUG IN THE ENGINE!");
ERR_FAIL_COND(err != OK);
MAKE_ROOM(ofs + len);
encode_variant(*p_arg[0], &(packet_cache.write[ofs]), len);
encode_variant(*p_arg[0], &(packet_cache.write[ofs]), len, allow_object_decoding || network_peer->is_object_decoding_allowed());
ofs += len;
} else {
@ -539,11 +542,11 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
packet_cache.write[ofs] = p_argcount;
ofs += 1;
for (int i = 0; i < p_argcount; i++) {
Error err = encode_variant(*p_arg[i], NULL, len);
Error err = encode_variant(*p_arg[i], NULL, len, allow_object_decoding || network_peer->is_object_decoding_allowed());
ERR_EXPLAIN("Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!");
ERR_FAIL_COND(err != OK);
MAKE_ROOM(ofs + len);
encode_variant(*p_arg[i], &(packet_cache.write[ofs]), len);
encode_variant(*p_arg[i], &(packet_cache.write[ofs]), len, allow_object_decoding || network_peer->is_object_decoding_allowed());
ofs += len;
}
}
@ -818,6 +821,16 @@ Vector<int> MultiplayerAPI::get_network_connected_peers() const {
return ret;
}
void MultiplayerAPI::set_allow_object_decoding(bool p_enable) {
allow_object_decoding = p_enable;
}
bool MultiplayerAPI::is_object_decoding_allowed() const {
return allow_object_decoding;
}
void MultiplayerAPI::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_root_node", "node"), &MultiplayerAPI::set_root_node);
ClassDB::bind_method(D_METHOD("send_bytes", "bytes", "id", "mode"), &MultiplayerAPI::send_bytes, DEFVAL(NetworkedMultiplayerPeer::TARGET_PEER_BROADCAST), DEFVAL(NetworkedMultiplayerPeer::TRANSFER_MODE_RELIABLE));
@ -838,6 +851,10 @@ void MultiplayerAPI::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_network_connected_peers"), &MultiplayerAPI::get_network_connected_peers);
ClassDB::bind_method(D_METHOD("set_refuse_new_network_connections", "refuse"), &MultiplayerAPI::set_refuse_new_network_connections);
ClassDB::bind_method(D_METHOD("is_refusing_new_network_connections"), &MultiplayerAPI::is_refusing_new_network_connections);
ClassDB::bind_method(D_METHOD("set_allow_object_decoding", "enable"), &MultiplayerAPI::set_allow_object_decoding);
ClassDB::bind_method(D_METHOD("is_object_decoding_allowed"), &MultiplayerAPI::is_object_decoding_allowed);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_object_decoding"), "set_allow_object_decoding", "is_object_decoding_allowed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_network_connections"), "set_refuse_new_network_connections", "is_refusing_new_network_connections");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "network_peer", PROPERTY_HINT_RESOURCE_TYPE, "NetworkedMultiplayerPeer", 0), "set_network_peer", "get_network_peer");
@ -859,7 +876,8 @@ void MultiplayerAPI::_bind_methods() {
BIND_ENUM_CONSTANT(RPC_MODE_PUPPETSYNC);
}
MultiplayerAPI::MultiplayerAPI() {
MultiplayerAPI::MultiplayerAPI() :
allow_object_decoding(false) {
rpc_sender_id = 0;
root_node = NULL;
clear();

View File

@ -63,6 +63,7 @@ private:
int last_send_cache_id;
Vector<uint8_t> packet_cache;
Node *root_node;
bool allow_object_decoding;
protected:
static void _bind_methods();
@ -126,6 +127,9 @@ public:
void set_refuse_new_network_connections(bool p_refuse);
bool is_refusing_new_network_connections() const;
void set_allow_object_decoding(bool p_enable);
bool is_object_decoding_allowed() const;
MultiplayerAPI();
~MultiplayerAPI();
};

View File

@ -79,7 +79,7 @@ Error PacketPeer::put_packet_buffer(const PoolVector<uint8_t> &p_buffer) {
return put_packet(&r[0], len);
}
Error PacketPeer::get_var(Variant &r_variant) {
Error PacketPeer::get_var(Variant &r_variant, bool p_allow_objects) {
const uint8_t *buffer;
int buffer_size;
@ -87,13 +87,13 @@ Error PacketPeer::get_var(Variant &r_variant) {
if (err)
return err;
return decode_variant(r_variant, buffer, buffer_size, NULL, allow_object_decoding);
return decode_variant(r_variant, buffer, buffer_size, NULL, p_allow_objects || allow_object_decoding);
}
Error PacketPeer::put_var(const Variant &p_packet) {
Error PacketPeer::put_var(const Variant &p_packet, bool p_full_objects) {
int len;
Error err = encode_variant(p_packet, NULL, len, !allow_object_decoding); // compute len first
Error err = encode_variant(p_packet, NULL, len, p_full_objects || allow_object_decoding); // compute len first
if (err)
return err;
@ -102,15 +102,15 @@ Error PacketPeer::put_var(const Variant &p_packet) {
uint8_t *buf = (uint8_t *)alloca(len);
ERR_FAIL_COND_V(!buf, ERR_OUT_OF_MEMORY);
err = encode_variant(p_packet, buf, len, !allow_object_decoding);
err = encode_variant(p_packet, buf, len, p_full_objects || allow_object_decoding);
ERR_FAIL_COND_V(err, err);
return put_packet(buf, len);
}
Variant PacketPeer::_bnd_get_var() {
Variant PacketPeer::_bnd_get_var(bool p_allow_objects) {
Variant var;
get_var(var);
get_var(var, p_allow_objects);
return var;
};
@ -132,8 +132,8 @@ Error PacketPeer::_get_packet_error() const {
void PacketPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_var"), &PacketPeer::_bnd_get_var);
ClassDB::bind_method(D_METHOD("put_var", "var"), &PacketPeer::put_var);
ClassDB::bind_method(D_METHOD("get_var", "allow_objects"), &PacketPeer::_bnd_get_var, DEFVAL(false));
ClassDB::bind_method(D_METHOD("put_var", "var", "full_objects"), &PacketPeer::put_var, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_packet"), &PacketPeer::_get_packet);
ClassDB::bind_method(D_METHOD("put_packet", "buffer"), &PacketPeer::_put_packet);
ClassDB::bind_method(D_METHOD("get_packet_error"), &PacketPeer::_get_packet_error);

View File

@ -39,8 +39,7 @@ class PacketPeer : public Reference {
GDCLASS(PacketPeer, Reference);
Variant _bnd_get_var();
void _bnd_put_var(const Variant &p_var);
Variant _bnd_get_var(bool p_allow_objects = false);
static void _bind_methods();
@ -64,8 +63,8 @@ public:
virtual Error get_packet_buffer(PoolVector<uint8_t> &r_buffer);
virtual Error put_packet_buffer(const PoolVector<uint8_t> &p_buffer);
virtual Error get_var(Variant &r_variant);
virtual Error put_var(const Variant &p_packet);
virtual Error get_var(Variant &r_variant, bool p_allow_objects = false);
virtual Error put_var(const Variant &p_packet, bool p_full_objects = false);
void set_allow_object_decoding(bool p_enable);
bool is_object_decoding_allowed() const;

View File

@ -163,7 +163,7 @@ Error PCKPacker::flush(bool p_verbose) {
src->close();
memdelete(src);
count += 1;
if (p_verbose) {
if (p_verbose && files.size() > 0) {
if (count % 100 == 0) {
printf("%i/%i (%.2f)\r", count, files.size(), float(count) / files.size() * 100);
fflush(stdout);

View File

@ -1801,6 +1801,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
if (f->get_error() != OK && f->get_error() != ERR_FILE_EOF) {
f->close();
memdelete(f);
return ERR_CANT_CREATE;
}
@ -1953,10 +1954,12 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
if (f->get_error() != OK && f->get_error() != ERR_FILE_EOF) {
f->close();
memdelete(f);
return ERR_CANT_CREATE;
}
f->close();
memdelete(f);
return OK;
}

View File

@ -221,14 +221,14 @@ void StreamPeer::put_utf8_string(const String &p_string) {
put_u32(cs.length());
put_data((const uint8_t *)cs.get_data(), cs.length());
}
void StreamPeer::put_var(const Variant &p_variant) {
void StreamPeer::put_var(const Variant &p_variant, bool p_full_objects) {
int len = 0;
Vector<uint8_t> buf;
encode_variant(p_variant, NULL, len);
encode_variant(p_variant, NULL, len, p_full_objects);
buf.resize(len);
put_32(len);
encode_variant(p_variant, buf.ptrw(), len);
encode_variant(p_variant, buf.ptrw(), len, p_full_objects);
put_data(buf.ptr(), buf.size());
}
@ -359,7 +359,7 @@ String StreamPeer::get_utf8_string(int p_bytes) {
ret.parse_utf8((const char *)buf.ptr(), buf.size());
return ret;
}
Variant StreamPeer::get_var() {
Variant StreamPeer::get_var(bool p_allow_objects) {
int len = get_32();
Vector<uint8_t> var;
@ -369,7 +369,7 @@ Variant StreamPeer::get_var() {
ERR_FAIL_COND_V(err != OK, Variant());
Variant ret;
decode_variant(ret, var.ptr(), len);
decode_variant(ret, var.ptr(), len, NULL, p_allow_objects);
return ret;
}
@ -398,7 +398,7 @@ void StreamPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("put_double", "value"), &StreamPeer::put_double);
ClassDB::bind_method(D_METHOD("put_string", "value"), &StreamPeer::put_string);
ClassDB::bind_method(D_METHOD("put_utf8_string", "value"), &StreamPeer::put_utf8_string);
ClassDB::bind_method(D_METHOD("put_var", "value"), &StreamPeer::put_var);
ClassDB::bind_method(D_METHOD("put_var", "value", "full_objects"), &StreamPeer::put_var, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_8"), &StreamPeer::get_8);
ClassDB::bind_method(D_METHOD("get_u8"), &StreamPeer::get_u8);
@ -412,7 +412,7 @@ void StreamPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_double"), &StreamPeer::get_double);
ClassDB::bind_method(D_METHOD("get_string", "bytes"), &StreamPeer::get_string, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("get_utf8_string", "bytes"), &StreamPeer::get_utf8_string, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("get_var"), &StreamPeer::get_var);
ClassDB::bind_method(D_METHOD("get_var", "allow_objects"), &StreamPeer::get_var, DEFVAL(false));
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "big_endian"), "set_big_endian", "is_big_endian_enabled");
}

View File

@ -73,7 +73,7 @@ public:
void put_double(double p_val);
void put_string(const String &p_string);
void put_utf8_string(const String &p_string);
void put_var(const Variant &p_variant);
void put_var(const Variant &p_variant, bool p_full_objects = false);
uint8_t get_u8();
int8_t get_8();
@ -87,7 +87,7 @@ public:
double get_double();
String get_string(int p_bytes = -1);
String get_utf8_string(int p_bytes = -1);
Variant get_var();
Variant get_var(bool p_allow_objects = false);
StreamPeer() { big_endian = false; }
};

View File

@ -38,7 +38,7 @@
*/
// based on the very nice implementation of rb-trees by:
// http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
// https://web.archive.org/web/20120507164830/http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
template <class K, class V, class C = Comparator<K>, class A = DefaultAllocator>
class Map {

View File

@ -55,6 +55,7 @@ void AStar::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) {
pt->weight_scale = p_weight_scale;
pt->prev_point = NULL;
pt->last_pass = 0;
pt->enabled = true;
points[p_id] = pt;
} else {
points[p_id]->pos = p_pos;
@ -242,6 +243,9 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
pass++;
if (!end_point->enabled)
return false;
SelfList<Point>::List open_list;
bool found_route = false;
@ -249,6 +253,10 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
for (Set<Point *>::Element *E = begin_point->neighbours.front(); E; E = E->next()) {
Point *n = E->get();
if (!n->enabled)
continue;
n->prev_point = begin_point;
n->distance = _compute_cost(begin_point->id, n->id) * n->weight_scale;
n->last_pass = pass;
@ -290,6 +298,9 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
Point *e = E->get();
if (!e->enabled)
continue;
real_t distance = _compute_cost(p->id, e->id) * e->weight_scale + p->distance;
if (e->last_pass == pass) {
@ -438,6 +449,14 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
return path;
}
void AStar::set_point_disabled(int p_id, bool p_disabled) {
points[p_id]->enabled = !p_disabled;
}
bool AStar::is_point_disabled(int p_id) const {
return !points[p_id]->enabled;
}
void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_available_point_id"), &AStar::get_available_point_id);
@ -450,6 +469,9 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar::has_point);
ClassDB::bind_method(D_METHOD("get_points"), &AStar::get_points);
ClassDB::bind_method(D_METHOD("set_point_disabled", "id", "disabled"), &AStar::set_point_disabled, DEFVAL(true));
ClassDB::bind_method(D_METHOD("is_point_disabled", "id"), &AStar::is_point_disabled);
ClassDB::bind_method(D_METHOD("get_point_connections", "id"), &AStar::get_point_connections);
ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id", "bidirectional"), &AStar::connect_points, DEFVAL(true));

View File

@ -54,6 +54,7 @@ class AStar : public Reference {
Vector3 pos;
real_t weight_scale;
uint64_t last_pass;
bool enabled;
Set<Point *> neighbours;
@ -114,6 +115,9 @@ public:
PoolVector<int> get_point_connections(int p_id);
Array get_points();
void set_point_disabled(int p_id, bool p_disabled = true);
bool is_point_disabled(int p_id) const;
void connect_points(int p_id, int p_with_id, bool bidirectional = true);
void disconnect_points(int p_id, int p_with_id);
bool are_points_connected(int p_id, int p_with_id) const;

View File

@ -31,6 +31,7 @@
#ifndef AUDIOFRAME_H
#define AUDIOFRAME_H
#include "core/math/vector2.h"
#include "core/typedefs.h"
static inline float undenormalise(volatile float f) {
@ -122,6 +123,20 @@ struct AudioFrame {
r = p_frame.r;
}
_ALWAYS_INLINE_ AudioFrame operator=(const AudioFrame &p_frame) {
l = p_frame.l;
r = p_frame.r;
return *this;
}
_ALWAYS_INLINE_ operator Vector2() const {
return Vector2(l, r);
}
_ALWAYS_INLINE_ AudioFrame(const Vector2 &p_v2) {
l = p_v2.x;
r = p_v2.y;
}
_ALWAYS_INLINE_ AudioFrame() {}
};

View File

@ -557,11 +557,23 @@ void Basis::set_euler_yxz(const Vector3 &p_euler) {
*this = ymat * xmat * zmat;
}
bool Basis::is_equal_approx(const Basis &a, const Basis &b) const {
bool Basis::is_equal_approx(const Basis &a, const Basis &b,real_t p_epsilon) const {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
if (!Math::is_equal_approx_ratio(a.elements[i][j], b.elements[i][j], UNIT_EPSILON))
if (!Math::is_equal_approx(a.elements[i][j], b.elements[i][j], p_epsilon))
return false;
}
}
return true;
}
bool Basis::is_equal_approx_ratio(const Basis &a, const Basis &b,real_t p_epsilon) const {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
if (!Math::is_equal_approx_ratio(a.elements[i][j], b.elements[i][j], p_epsilon))
return false;
}
}
@ -605,12 +617,14 @@ Basis::operator String() const {
Quat Basis::get_quat() const {
#ifdef MATH_CHECKS
if (!is_rotation()) {
ERR_EXPLAIN("Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quat() or call orthonormalized() instead.");
ERR_FAIL_V(Quat());
}
#endif
/* Allow getting a quaternion from an unnormalized transform */
Basis m = *this;
m.elements[0].normalize();
m.elements[1].normalize();
m.elements[2].normalize();
real_t trace = m.elements[0][0] + m.elements[1][1] + m.elements[2][2];
real_t temp[4];

View File

@ -133,7 +133,8 @@ public:
return elements[0][2] * v[0] + elements[1][2] * v[1] + elements[2][2] * v[2];
}
bool is_equal_approx(const Basis &a, const Basis &b) const;
bool is_equal_approx(const Basis &a, const Basis &b, real_t p_epsilon=CMP_EPSILON) const;
bool is_equal_approx_ratio(const Basis &a, const Basis &b, real_t p_epsilon=UNIT_EPSILON) const;
bool operator==(const Basis &p_matrix) const;
bool operator!=(const Basis &p_matrix) const;

View File

@ -294,8 +294,8 @@ Vector<Plane> CameraMatrix::get_projection_planes(const Transform &p_transform)
/** Fast Plane Extraction from combined modelview/projection matrices.
* References:
* http://www.markmorley.com/opengl/frustumculling.html
* http://www2.ravensoft.com/users/ggribb/plane%20extraction.pdf
* https://web.archive.org/web/20011221205252/http://www.markmorley.com/opengl/frustumculling.html
* https://web.archive.org/web/20061020020112/http://www2.ravensoft.com/users/ggribb/plane%20extraction.pdf
*/
Vector<Plane> planes;

View File

@ -68,6 +68,7 @@ const char *Expression::func_name[Expression::FUNC_MAX] = {
"lerp",
"inverse_lerp",
"range_lerp",
"smoothstep",
"dectime",
"randomize",
"randi",
@ -164,10 +165,10 @@ int Expression::get_func_argument_count(BuiltinFunc p_func) {
case TEXT_PRINTRAW:
case VAR_TO_STR:
case STR_TO_VAR:
case VAR_TO_BYTES:
case BYTES_TO_VAR:
case TYPE_EXISTS:
return 1;
case VAR_TO_BYTES:
case BYTES_TO_VAR:
case MATH_ATAN2:
case MATH_FMOD:
case MATH_FPOSMOD:
@ -185,6 +186,7 @@ int Expression::get_func_argument_count(BuiltinFunc p_func) {
return 2;
case MATH_LERP:
case MATH_INVERSE_LERP:
case MATH_SMOOTHSTEP:
case MATH_DECTIME:
case MATH_WRAP:
case MATH_WRAPF:
@ -392,6 +394,12 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
VALIDATE_ARG_NUM(4);
*r_return = Math::range_lerp((double)*p_inputs[0], (double)*p_inputs[1], (double)*p_inputs[2], (double)*p_inputs[3], (double)*p_inputs[4]);
} break;
case MATH_SMOOTHSTEP: {
VALIDATE_ARG_NUM(0);
VALIDATE_ARG_NUM(1);
VALIDATE_ARG_NUM(2);
*r_return = Math::smoothstep((double)*p_inputs[0], (double)*p_inputs[1], (double)*p_inputs[2]);
} break;
case MATH_DECTIME: {
VALIDATE_ARG_NUM(0);
@ -696,8 +704,9 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
case VAR_TO_BYTES: {
PoolByteArray barr;
bool full_objects = *p_inputs[1];
int len;
Error err = encode_variant(*p_inputs[0], NULL, len);
Error err = encode_variant(*p_inputs[0], NULL, len, full_objects);
if (err) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
@ -709,7 +718,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
barr.resize(len);
{
PoolByteArray::Write w = barr.write();
encode_variant(*p_inputs[0], w.ptr(), len);
encode_variant(*p_inputs[0], w.ptr(), len, full_objects);
}
*r_return = barr;
} break;
@ -724,10 +733,11 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
}
PoolByteArray varr = *p_inputs[0];
bool allow_objects = *p_inputs[1];
Variant ret;
{
PoolByteArray::Read r = varr.read();
Error err = decode_variant(ret, r.ptr(), varr.size(), NULL);
Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, allow_objects);
if (err != OK) {
r_error_str = RTR("Not enough bytes for decoding bytes, or invalid format.");
r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;

View File

@ -66,6 +66,7 @@ public:
MATH_LERP,
MATH_INVERSE_LERP,
MATH_RANGE_LERP,
MATH_SMOOTHSTEP,
MATH_DECTIME,
MATH_RANDOMIZE,
MATH_RAND,

View File

@ -393,7 +393,7 @@ Vector3 Face3::get_closest_point_to(const Vector3 &p_point) const {
s = CLAMP(numer / denom, 0.f, 1.f);
t = 1 - s;
} else {
s = CLAMP(-e / c, 0.f, 1.f);
s = CLAMP(-d / a, 0.f, 1.f);
t = 0.f;
}
} else {

View File

@ -702,9 +702,11 @@ public:
/* if we can assume that the line segment starts outside the circle (e.g. for continuous time collision detection) then the following can be skipped and we can just return the equivalent of res1 */
sqrtterm = Math::sqrt(sqrtterm);
real_t res1 = (-b - sqrtterm) / (2 * a);
//real_t res2 = ( -b + sqrtterm ) / (2 * a);
real_t res2 = (-b + sqrtterm) / (2 * a);
return (res1 >= 0 && res1 <= 1) ? res1 : -1;
if (res1 >= 0 && res1 <= 1) return res1;
if (res2 >= 0 && res2 <= 1) return res2;
return -1;
}
static inline Vector<Vector3> clip_polygon(const Vector<Vector3> &polygon, const Plane &p_plane) {

View File

@ -208,6 +208,17 @@ public:
static _ALWAYS_INLINE_ double range_lerp(double p_value, double p_istart, double p_istop, double p_ostart, double p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); }
static _ALWAYS_INLINE_ float range_lerp(float p_value, float p_istart, float p_istop, float p_ostart, float p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); }
static _ALWAYS_INLINE_ double smoothstep(double p_from, double p_to, double p_weight) {
if (is_equal_approx(p_from, p_to)) return p_from;
double x = CLAMP((p_weight - p_from) / (p_to - p_from), 0.0, 1.0);
return x * x * (3.0 - 2.0 * x);
}
static _ALWAYS_INLINE_ float smoothstep(float p_from, float p_to, float p_weight) {
if (is_equal_approx(p_from, p_to)) return p_from;
float x = CLAMP((p_weight - p_from) / (p_to - p_from), 0.0f, 1.0f);
return x * x * (3.0f - 2.0f * x);
}
static _ALWAYS_INLINE_ double linear2db(double p_linear) { return Math::log(p_linear) * 8.6858896380650365530225783783321; }
static _ALWAYS_INLINE_ float linear2db(float p_linear) { return Math::log(p_linear) * 8.6858896380650365530225783783321; }
@ -249,11 +260,11 @@ public:
static float random(float from, float to);
static real_t random(int from, int to) { return (real_t)random((real_t)from, (real_t)to); }
static _ALWAYS_INLINE_ bool is_equal_approx_ratio(real_t a, real_t b, real_t epsilon = CMP_EPSILON) {
static _ALWAYS_INLINE_ bool is_equal_approx_ratio(real_t a, real_t b, real_t epsilon = CMP_EPSILON, real_t min_epsilon = CMP_EPSILON) {
// this is an approximate way to check that numbers are close, as a ratio of their average size
// helps compare approximate numbers that may be very big or very small
real_t diff = abs(a - b);
if (diff == 0.0) {
if (diff == 0.0 || diff < min_epsilon) {
return true;
}
real_t avg_size = (abs(a) + abs(b)) / 2.0;

View File

@ -131,6 +131,14 @@ public:
w(q.w) {
}
Quat operator=(const Quat &q) {
x = q.x;
y = q.y;
z = q.z;
w = q.w;
return *this;
}
Quat(const Vector3 &v0, const Vector3 &v1) // shortest arc
{
Vector3 c = v0.cross(v1);

View File

@ -40,6 +40,7 @@ void RandomNumberGenerator::_bind_methods() {
ClassDB::bind_method(D_METHOD("randi"), &RandomNumberGenerator::randi);
ClassDB::bind_method(D_METHOD("randf"), &RandomNumberGenerator::randf);
ClassDB::bind_method(D_METHOD("randfn", "mean", "deviation"), &RandomNumberGenerator::randfn, DEFVAL(0.0), DEFVAL(1.0));
ClassDB::bind_method(D_METHOD("randf_range", "from", "to"), &RandomNumberGenerator::randf_range);
ClassDB::bind_method(D_METHOD("randi_range", "from", "to"), &RandomNumberGenerator::randi_range);
ClassDB::bind_method(D_METHOD("randomize"), &RandomNumberGenerator::randomize);

View File

@ -55,6 +55,8 @@ public:
_FORCE_INLINE_ real_t randf_range(real_t from, real_t to) { return randbase.random(from, to); }
_FORCE_INLINE_ real_t randfn(real_t mean = 0.0, real_t deviation = 1.0) { return randbase.randfn(mean, deviation); }
_FORCE_INLINE_ int randi_range(int from, int to) {
unsigned int ret = randbase.rand();
return ret % (to - from + 1) + from;

View File

@ -31,6 +31,8 @@
#ifndef RANDOM_PCG_H
#define RANDOM_PCG_H
#include <math.h>
#include "core/math/math_defs.h"
#include "thirdparty/misc/pcg.h"
@ -61,6 +63,13 @@ public:
_FORCE_INLINE_ double randd() { return (double)rand() / (double)RANDOM_MAX; }
_FORCE_INLINE_ float randf() { return (float)rand() / (float)RANDOM_MAX; }
_FORCE_INLINE_ double randfn(double p_mean, double p_deviation) {
return p_mean + p_deviation * (cos(Math_TAU * randd()) * sqrt(-2.0 * log(randd()))); // Box-Muller transform
}
_FORCE_INLINE_ float randfn(float p_mean, float p_deviation) {
return p_mean + p_deviation * (cos(Math_TAU * randf()) * sqrt(-2.0 * log(randf()))); // Box-Muller transform
}
double random(double p_from, double p_to);
float random(float p_from, float p_to);
real_t random(int p_from, int p_to) { return (real_t)random((real_t)p_from, (real_t)p_to); }

View File

@ -65,6 +65,7 @@ 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;
real_t dot(const Vector2 &p_other) const;
real_t cross(const Vector2 &p_other) const;
@ -236,6 +237,12 @@ Vector2 Vector2::slerp(const Vector2 &p_b, real_t p_t) const {
return rotated(theta * p_t);
}
Vector2 Vector2::direction_to(const Vector2 &p_b) const {
Vector2 ret(p_b.x - x, p_b.y - y);
ret.normalize();
return ret;
}
Vector2 Vector2::linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_t) {
Vector2 res = p_a;

View File

@ -112,6 +112,7 @@ struct Vector3 {
_FORCE_INLINE_ Vector3 project(const Vector3 &p_b) const;
_FORCE_INLINE_ real_t angle_to(const Vector3 &p_b) const;
_FORCE_INLINE_ Vector3 direction_to(const Vector3 &p_b) const;
_FORCE_INLINE_ Vector3 slide(const Vector3 &p_normal) const;
_FORCE_INLINE_ Vector3 bounce(const Vector3 &p_normal) const;
@ -217,12 +218,8 @@ Vector3 Vector3::linear_interpolate(const Vector3 &p_b, real_t p_t) const {
}
Vector3 Vector3::slerp(const Vector3 &p_b, real_t p_t) const {
#ifdef MATH_CHECKS
ERR_FAIL_COND_V(!is_normalized(), Vector3());
#endif
real_t theta = angle_to(p_b);
return rotated(cross(p_b), theta * p_t);
return rotated(cross(p_b).normalized(), theta * p_t);
}
real_t Vector3::distance_to(const Vector3 &p_b) const {
@ -244,6 +241,12 @@ real_t Vector3::angle_to(const Vector3 &p_b) const {
return Math::atan2(cross(p_b).length(), dot(p_b));
}
Vector3 Vector3::direction_to(const Vector3 &p_b) const {
Vector3 ret(p_b.x - x, p_b.y - y, p_b.z - z);
ret.normalize();
return ret;
}
/* Operators */
Vector3 &Vector3::operator+=(const Vector3 &p_v) {

View File

@ -302,10 +302,6 @@ void MessageQueue::flush() {
_call_function(target, message->target, args, message->args, message->type & FLAG_SHOW_ERROR);
for (int i = 0; i < message->args; i++) {
args[i].~Variant();
}
} break;
case TYPE_NOTIFICATION: {
@ -319,11 +315,17 @@ void MessageQueue::flush() {
// messages don't expect a return value
target->set(message->target, *arg);
arg->~Variant();
} break;
}
}
if ((message->type & FLAG_MASK) != TYPE_NOTIFICATION) {
Variant *args = (Variant *)(message + 1);
for (int i = 0; i < message->args; i++) {
args[i].~Variant();
}
}
message->~Message();
_THREAD_SAFE_LOCK_

View File

@ -608,18 +608,16 @@ Variant Object::get_indexed(const Vector<StringName> &p_names, bool *r_valid) co
}
bool valid = false;
Variant current_value = get(p_names[0]);
Variant current_value = get(p_names[0], &valid);
for (int i = 1; i < p_names.size(); i++) {
current_value = current_value.get_named(p_names[i], &valid);
if (!valid) {
if (r_valid)
*r_valid = false;
return Variant();
}
if (!valid)
break;
}
if (r_valid)
*r_valid = true;
*r_valid = valid;
return current_value;
}
@ -1366,7 +1364,10 @@ Array Object::_get_incoming_connections() const {
void Object::get_signal_list(List<MethodInfo> *p_signals) const {
if (!script.is_null()) {
Ref<Script>(script)->get_script_signal_list(p_signals);
Ref<Script> scr = script;
if (scr.is_valid()) {
scr->get_script_signal_list(p_signals);
}
}
ClassDB::get_signal_list(get_class_name(), p_signals);
@ -1673,7 +1674,7 @@ void Object::clear_internal_resource_paths() {
void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_class"), &Object::get_class);
ClassDB::bind_method(D_METHOD("is_class", "type"), &Object::is_class);
ClassDB::bind_method(D_METHOD("is_class", "class"), &Object::is_class);
ClassDB::bind_method(D_METHOD("set", "property", "value"), &Object::_set_bind);
ClassDB::bind_method(D_METHOD("get", "property"), &Object::_get_bind);
ClassDB::bind_method(D_METHOD("set_indexed", "property", "value"), &Object::_set_indexed_bind);
@ -1691,14 +1692,8 @@ void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_meta", "name"), &Object::has_meta);
ClassDB::bind_method(D_METHOD("get_meta_list"), &Object::_get_meta_list_bind);
//todo reimplement this per language so all 5 arguments can be called
//ClassDB::bind_method(D_METHOD("call","method","arg1","arg2","arg3","arg4"),&Object::_call_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()));
//ClassDB::bind_method(D_METHOD("call_deferred","method","arg1","arg2","arg3","arg4"),&Object::_call_deferred_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("add_user_signal", "signal", "arguments"), &Object::_add_user_signal, DEFVAL(Array()));
ClassDB::bind_method(D_METHOD("has_user_signal", "signal"), &Object::_has_user_signal);
//ClassDB::bind_method(D_METHOD("emit_signal","signal","arguments"),&Object::_emit_signal,DEFVAL(Array()));
{
MethodInfo mi;

View File

@ -779,8 +779,13 @@ public:
static int get_object_count();
_FORCE_INLINE_ static bool instance_validate(Object *p_ptr) {
rw_lock->read_lock();
return instance_checks.has(p_ptr);
bool exists = instance_checks.has(p_ptr);
rw_lock->read_unlock();
return exists;
}
};

View File

@ -76,6 +76,7 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_joy_axis_index_from_string", "axis"), &Input::get_joy_axis_index_from_string);
ClassDB::bind_method(D_METHOD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0));
ClassDB::bind_method(D_METHOD("stop_joy_vibration", "device"), &Input::stop_joy_vibration);
ClassDB::bind_method(D_METHOD("vibrate_handheld", "duration_ms"), &Input::vibrate_handheld, DEFVAL(500));
ClassDB::bind_method(D_METHOD("get_gravity"), &Input::get_gravity);
ClassDB::bind_method(D_METHOD("get_accelerometer"), &Input::get_accelerometer);
ClassDB::bind_method(D_METHOD("get_magnetometer"), &Input::get_magnetometer);
@ -89,6 +90,7 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("action_press", "action", "strength"), &Input::action_press, DEFVAL(1.f));
ClassDB::bind_method(D_METHOD("action_release", "action"), &Input::action_release);
ClassDB::bind_method(D_METHOD("set_default_cursor_shape", "shape"), &Input::set_default_cursor_shape, DEFVAL(CURSOR_ARROW));
ClassDB::bind_method(D_METHOD("get_current_cursor_shape"), &Input::get_current_cursor_shape);
ClassDB::bind_method(D_METHOD("set_custom_mouse_cursor", "image", "shape", "hotspot"), &Input::set_custom_mouse_cursor, DEFVAL(CURSOR_ARROW), DEFVAL(Vector2()));
ClassDB::bind_method(D_METHOD("parse_input_event", "event"), &Input::parse_input_event);
ClassDB::bind_method(D_METHOD("set_use_accumulated_input", "enable"), &Input::set_use_accumulated_input);

View File

@ -100,6 +100,7 @@ public:
virtual uint64_t get_joy_vibration_timestamp(int p_device) = 0;
virtual void start_joy_vibration(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration = 0) = 0;
virtual void stop_joy_vibration(int p_device) = 0;
virtual void vibrate_handheld(int p_duration_ms = 500) = 0;
virtual Point2 get_mouse_position() const = 0;
virtual Point2 get_last_mouse_speed() const = 0;
@ -121,10 +122,10 @@ public:
virtual bool is_emulating_touch_from_mouse() const = 0;
virtual bool is_emulating_mouse_from_touch() const = 0;
virtual CursorShape get_default_cursor_shape() = 0;
virtual CursorShape get_default_cursor_shape() const = 0;
virtual void set_default_cursor_shape(CursorShape p_shape) = 0;
virtual CursorShape get_current_cursor_shape() const = 0;
virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) = 0;
virtual void set_mouse_in_window(bool p_in_window) = 0;
virtual String get_joy_button_string(int p_button) = 0;
virtual String get_joy_axis_string(int p_axis) = 0;

View File

@ -717,8 +717,17 @@ bool InputEventJoypadMotion::action_match(const Ref<InputEvent> &p_event, bool *
bool pressed = same_direction ? Math::abs(jm->get_axis_value()) >= p_deadzone : false;
if (p_pressed != NULL)
*p_pressed = pressed;
if (p_strength != NULL)
*p_strength = pressed ? CLAMP(Math::inverse_lerp(p_deadzone, 1.0f, Math::abs(jm->get_axis_value())), 0.0f, 1.0f) : 0.0f;
if (p_strength != NULL) {
if (pressed) {
if (p_deadzone == 1.0f) {
*p_strength = 1.0f;
} else {
*p_strength = CLAMP(Math::inverse_lerp(p_deadzone, 1.0f, Math::abs(jm->get_axis_value())), 0.0f, 1.0f);
}
} else {
*p_strength = 0.0f;
}
}
}
return match;
}

View File

@ -44,9 +44,9 @@ void MainLoop::_bind_methods() {
BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo("_input_text", PropertyInfo(Variant::STRING, "text")));
BIND_VMETHOD(MethodInfo("_initialize"));
BIND_VMETHOD(MethodInfo("_iteration", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo("_idle", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "screen")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_iteration", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_idle", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "from_screen")));
BIND_VMETHOD(MethodInfo("_finalize"));
BIND_CONSTANT(NOTIFICATION_WM_MOUSE_ENTER);

View File

@ -75,6 +75,11 @@ void MIDIDriver::receive_input_packet(uint64_t timestamp, uint8_t *data, uint32_
if (length >= 3) {
event->set_pitch(data[1]);
event->set_velocity(data[2]);
if (event->get_message() == MIDI_MESSAGE_NOTE_ON && event->get_velocity() == 0) {
// https://www.midi.org/forum/228-writing-midi-software-send-note-off,-or-zero-velocity-note-on
event->set_message(MIDI_MESSAGE_NOTE_OFF);
}
}
break;

View File

@ -157,6 +157,11 @@ int OS::get_process_id() const {
return -1;
};
void OS::vibrate_handheld(int p_duration_ms) {
WARN_PRINTS("vibrate_handheld() only works with Android and iOS");
}
bool OS::is_stdout_verbose() const {
return _verbose_stdout;
@ -220,6 +225,16 @@ int OS::get_virtual_keyboard_height() const {
return 0;
}
void OS::set_cursor_shape(CursorShape p_shape) {
}
OS::CursorShape OS::get_cursor_shape() const {
return CURSOR_ARROW;
}
void OS::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
}
void OS::print_all_resources(String p_to_file) {
ERR_FAIL_COND(p_to_file != "" && _OSPRF);

View File

@ -263,6 +263,7 @@ public:
virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false) = 0;
virtual Error kill(const ProcessID &p_pid) = 0;
virtual int get_process_id() const;
virtual void vibrate_handheld(int p_duration_ms = 500);
virtual Error shell_open(String p_uri);
virtual Error set_cwd(const String &p_cwd);
@ -377,8 +378,9 @@ public:
// returns height of the currently shown virtual keyboard (0 if keyboard is hidden)
virtual int get_virtual_keyboard_height() const;
virtual void set_cursor_shape(CursorShape p_shape) = 0;
virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) = 0;
virtual void set_cursor_shape(CursorShape p_shape);
virtual CursorShape get_cursor_shape() const;
virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot);
virtual bool get_swap_ok_cancel() { return false; }
virtual void dump_memory_to_file(const char *p_file);

View File

@ -114,7 +114,7 @@ Variant PackedDataContainer::_get_at_ofs(uint32_t p_ofs, const uint8_t *p_buf, b
} else {
Variant v;
Error rerr = decode_variant(v, p_buf + p_ofs, datalen - p_ofs, NULL);
Error rerr = decode_variant(v, p_buf + p_ofs, datalen - p_ofs, NULL, false);
if (rerr != OK) {
@ -224,7 +224,8 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
string_cache[s] = tmpdata.size();
}; //fallthrough
FALLTHROUGH;
};
case Variant::NIL:
case Variant::BOOL:
case Variant::INT:
@ -249,9 +250,9 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
uint32_t pos = tmpdata.size();
int len;
encode_variant(p_data, NULL, len);
encode_variant(p_data, NULL, len, false);
tmpdata.resize(tmpdata.size() + len);
encode_variant(p_data, &tmpdata.write[pos], len);
encode_variant(p_data, &tmpdata.write[pos], len, false);
return pos;
} break;

View File

@ -501,7 +501,7 @@ Error ProjectSettings::_load_settings_binary(const String p_path) {
d.resize(vlen);
f->get_buffer(d.ptrw(), vlen);
Variant value;
err = decode_variant(value, d.ptr(), d.size());
err = decode_variant(value, d.ptr(), d.size(), NULL, true);
ERR_EXPLAIN("Error decoding property: " + key);
ERR_CONTINUE(err != OK);
set(key, value);
@ -656,7 +656,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
file->store_string(key);
int len;
err = encode_variant(p_custom_features, NULL, len);
err = encode_variant(p_custom_features, NULL, len, false);
if (err != OK) {
memdelete(file);
ERR_FAIL_V(err);
@ -665,7 +665,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
Vector<uint8_t> buff;
buff.resize(len);
err = encode_variant(p_custom_features, buff.ptrw(), len);
err = encode_variant(p_custom_features, buff.ptrw(), len, false);
if (err != OK) {
memdelete(file);
ERR_FAIL_V(err);
@ -694,7 +694,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
file->store_string(key);
int len;
err = encode_variant(value, NULL, len);
err = encode_variant(value, NULL, len, true);
if (err != OK)
memdelete(file);
ERR_FAIL_COND_V(err != OK, ERR_INVALID_DATA);
@ -702,7 +702,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
Vector<uint8_t> buff;
buff.resize(len);
err = encode_variant(value, buff.ptrw(), len);
err = encode_variant(value, buff.ptrw(), len, true);
if (err != OK)
memdelete(file);
ERR_FAIL_COND_V(err != OK, ERR_INVALID_DATA);

View File

@ -205,6 +205,8 @@ public:
static ScriptCodeCompletionCache *get_singleton() { return singleton; }
ScriptCodeCompletionCache();
virtual ~ScriptCodeCompletionCache() {}
};
class ScriptLanguage {

View File

@ -39,7 +39,7 @@
*/
// based on the very nice implementation of rb-trees by:
// http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
// https://web.archive.org/web/20120507164830/http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
template <class T, class C = Comparator<T>, class A = DefaultAllocator>
class Set {

View File

@ -179,6 +179,7 @@ static const char *locale_list[] = {
"ff_SN", // Fulah (Senegal)
"fi", // Finnish
"fi_FI", // Finnish (Finland)
"fil", // Filipino
"fil_PH", // Filipino (Philippines)
"fo_FO", // Faroese (Faroe Islands)
"fr", // French
@ -227,6 +228,7 @@ static const char *locale_list[] = {
"ja", // Japanese
"ja_JP", // Japanese (Japan)
"kab_DZ", // Kabyle (Algeria)
"ka", // Georgian
"ka_GE", // Georgian (Georgia)
"kk_KZ", // Kazakh (Kazakhstan)
"kl_GL", // Kalaallisut (Greenland)
@ -257,10 +259,12 @@ static const char *locale_list[] = {
"mg_MG", // Malagasy (Madagascar)
"mh_MH", // Marshallese (Marshall Islands)
"mhr_RU", // Eastern Mari (Russia)
"mi_NZ", // Maori (New Zealand)
"mi", // Māori
"mi_NZ", // Māori (New Zealand)
"miq_NI", // Mískito (Nicaragua)
"mk", // Macedonian
"mk_MK", // Macedonian (Macedonia)
"ml", // Malayalam
"ml_IN", // Malayalam (India)
"mni_IN", // Manipuri (India)
"mn_MN", // Mongolian (Mongolia)
@ -326,6 +330,7 @@ static const char *locale_list[] = {
"sgs_LT", // Samogitian (Lithuania)
"shs_CA", // Shuswap (Canada)
"sid_ET", // Sidamo (Ethiopia)
"si", // Sinhala
"si_LK", // Sinhala (Sri Lanka)
"sk", // Slovak
"sk_SK", // Slovak (Slovakia)
@ -343,6 +348,7 @@ static const char *locale_list[] = {
"sq_MK", // Albanian (Macedonia)
"sr", // Serbian
"sr_Cyrl", // Serbian (Cyrillic)
"sr_Latn", // Serbian (Latin)
"sr_ME", // Serbian (Montenegro)
"sr_RS", // Serbian (Serbia)
"ss_ZA", // Swati (South Africa)
@ -357,6 +363,7 @@ static const char *locale_list[] = {
"ta_IN", // Tamil (India)
"ta_LK", // Tamil (Sri Lanka)
"tcy_IN", // Tulu (India)
"te", // Telugu
"te_IN", // Telugu (India)
"tg_TJ", // Tajik (Tajikistan)
"the_NP", // Chitwania Tharu (Nepal)
@ -540,6 +547,7 @@ static const char *locale_names[] = {
"Fulah (Senegal)",
"Finnish",
"Finnish (Finland)",
"Filipino",
"Filipino (Philippines)",
"Faroese (Faroe Islands)",
"French",
@ -588,6 +596,7 @@ static const char *locale_names[] = {
"Japanese",
"Japanese (Japan)",
"Kabyle (Algeria)",
"Georgian",
"Georgian (Georgia)",
"Kazakh (Kazakhstan)",
"Kalaallisut (Greenland)",
@ -618,10 +627,12 @@ static const char *locale_names[] = {
"Malagasy (Madagascar)",
"Marshallese (Marshall Islands)",
"Eastern Mari (Russia)",
"Maori (New Zealand)",
"Māori",
"Māori (New Zealand)",
"Mískito (Nicaragua)",
"Macedonian",
"Macedonian (Macedonia)",
"Malayalam",
"Malayalam (India)",
"Manipuri (India)",
"Mongolian (Mongolia)",
@ -687,6 +698,7 @@ static const char *locale_names[] = {
"Samogitian (Lithuania)",
"Shuswap (Canada)",
"Sidamo (Ethiopia)",
"Sinhala",
"Sinhala (Sri Lanka)",
"Slovak",
"Slovak (Slovakia)",
@ -704,6 +716,7 @@ static const char *locale_names[] = {
"Albanian (Macedonia)",
"Serbian",
"Serbian (Cyrillic)",
"Serbian (Latin)",
"Serbian (Montenegro)",
"Serbian (Serbia)",
"Swati (South Africa)",
@ -718,6 +731,7 @@ static const char *locale_names[] = {
"Tamil (India)",
"Tamil (Sri Lanka)",
"Tulu (India)",
"Telugu",
"Telugu (India)",
"Tajik (Tajikistan)",
"Chitwania Tharu (Nepal)",
@ -968,6 +982,19 @@ String TranslationServer::get_locale_name(const String &p_locale) const {
return locale_name_map[p_locale];
}
Array TranslationServer::get_loaded_locales() const {
Array locales;
for (const Set<Ref<Translation> >::Element *E = translations.front(); E; E = E->next()) {
const Ref<Translation> &t = E->get();
String l = t->get_locale();
locales.push_back(l);
}
return locales;
}
Vector<String> TranslationServer::get_all_locales() {
Vector<String> locales;
@ -1017,6 +1044,13 @@ StringName TranslationServer::translate(const StringName &p_message) const {
if (!enabled)
return p_message;
// Locale can be of the form 'll_CC', i.e. language code and regional code,
// e.g. 'en_US', 'en_GB', etc. It might also be simply 'll', e.g. 'en'.
// To find the relevant translation, we look for those with locale starting
// with the language code, and then if any is an exact match for the long
// form. If not found, we fall back to a near match (another locale with
// same language code).
StringName res;
bool near_match = false;
const CharType *lptr = &locale[0];
@ -1026,13 +1060,11 @@ StringName TranslationServer::translate(const StringName &p_message) const {
const Ref<Translation> &t = E->get();
String l = t->get_locale();
if (lptr[0] != l[0] || lptr[1] != l[1])
continue; // locale not match
continue; // Language code does not match.
//near match
bool match = (l != locale);
if (near_match && !match)
continue; //only near-match once
bool exact_match = (l == locale);
if (!exact_match && near_match)
continue; // Only near-match once, but keep looking for exact matches.
StringName r = t->get_message(p_message);
@ -1041,43 +1073,38 @@ StringName TranslationServer::translate(const StringName &p_message) const {
res = r;
if (match)
if (exact_match)
break;
else
near_match = true;
}
if (!res) {
//try again with fallback
if (fallback.length() >= 2) {
if (!res && fallback.length() >= 2) {
// Try again with the fallback locale.
const CharType *fptr = &fallback[0];
near_match = false;
for (const Set<Ref<Translation> >::Element *E = translations.front(); E; E = E->next()) {
const CharType *fptr = &fallback[0];
near_match = false;
for (const Set<Ref<Translation> >::Element *E = translations.front(); E; E = E->next()) {
const Ref<Translation> &t = E->get();
String l = t->get_locale();
if (fptr[0] != l[0] || fptr[1] != l[1])
continue; // Language code does not match.
const Ref<Translation> &t = E->get();
String l = t->get_locale();
if (fptr[0] != l[0] || fptr[1] != l[1])
continue; // locale not match
bool exact_match = (l == fallback);
if (!exact_match && near_match)
continue; // Only near-match once, but keep looking for exact matches.
//near match
bool match = (l != fallback);
StringName r = t->get_message(p_message);
if (near_match && !match)
continue; //only near-match once
if (!r)
continue;
StringName r = t->get_message(p_message);
res = r;
if (!r)
continue;
res = r;
if (match)
break;
else
near_match = true;
}
if (exact_match)
break;
else
near_match = true;
}
}
@ -1168,6 +1195,8 @@ void TranslationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("remove_translation", "translation"), &TranslationServer::remove_translation);
ClassDB::bind_method(D_METHOD("clear"), &TranslationServer::clear);
ClassDB::bind_method(D_METHOD("get_loaded_locales"), &TranslationServer::get_loaded_locales);
}
void TranslationServer::load_translations() {

View File

@ -94,6 +94,8 @@ public:
String get_locale_name(const String &p_locale) const;
Array get_loaded_locales() const;
void add_translation(const Ref<Translation> &p_translation);
void remove_translation(const Ref<Translation> &p_translation);

View File

@ -328,4 +328,31 @@ struct _GlobalLock {
#define _PRINTF_FORMAT_ATTRIBUTE_2_3
#endif
/** This is needed due to a strange OpenGL API that expects a pointer
* type for an argument that is actually an offset.
*/
#define CAST_INT_TO_UCHAR_PTR(ptr) ((uint8_t *)(uintptr_t)(ptr))
/** Hint for compilers that this fallthrough in a switch is intentional.
* Can be replaced by [[fallthrough]] annotation if we move to C++17.
* Including conditional support for it for people who set -std=c++17
* themselves.
* Requires a trailing semicolon when used.
*/
#if __cplusplus >= 201703L
#define FALLTHROUGH [[fallthrough]]
#elif defined(__GNUC__) && __GNUC__ >= 7
#define FALLTHROUGH __attribute__((fallthrough))
#elif defined(__llvm__) && __cplusplus >= 201103L && defined(__has_feature)
#if __has_feature(cxx_attributes) && defined(__has_warning)
#if __has_warning("-Wimplicit-fallthrough")
#define FALLTHROUGH [[clang::fallthrough]]
#endif
#endif
#endif
#ifndef FALLTHROUGH
#define FALLTHROUGH
#endif
#endif // TYPEDEFS_H

File diff suppressed because it is too large Load Diff

View File

@ -3297,7 +3297,7 @@ String String::http_unescape() const {
if ((ord1 >= '0' && ord1 <= '9') || (ord1 >= 'A' && ord1 <= 'Z')) {
CharType ord2 = ord_at(i + 2);
if ((ord2 >= '0' && ord2 <= '9') || (ord2 >= 'A' && ord2 <= 'Z')) {
char bytes[2] = { (char)ord1, (char)ord2 };
char bytes[3] = { (char)ord1, (char)ord2, 0 };
res += (char)strtol(bytes, NULL, 16);
i += 2;
}

View File

@ -97,6 +97,10 @@ public:
_FORCE_INLINE_ CharString() {}
_FORCE_INLINE_ CharString(const CharString &p_str) { _cowdata._ref(p_str._cowdata); }
_FORCE_INLINE_ CharString operator=(const CharString &p_str) {
_cowdata._ref(p_str._cowdata);
return *this;
}
bool operator<(const CharString &p_right) const;
CharString &operator+=(char p_char);
@ -339,6 +343,10 @@ public:
_FORCE_INLINE_ String() {}
_FORCE_INLINE_ String(const String &p_str) { _cowdata._ref(p_str._cowdata); }
String operator=(const String &p_str) {
_cowdata._ref(p_str._cowdata);
return *this;
}
String(const char *p_str);
String(const CharType *p_str, int p_clip_to_len = -1);

View File

@ -341,6 +341,7 @@ struct _VariantCall {
VCALL_LOCALMEM1R(Vector2, project);
VCALL_LOCALMEM1R(Vector2, angle_to);
VCALL_LOCALMEM1R(Vector2, angle_to_point);
VCALL_LOCALMEM1R(Vector2, direction_to);
VCALL_LOCALMEM2R(Vector2, linear_interpolate);
VCALL_LOCALMEM2R(Vector2, slerp);
VCALL_LOCALMEM4R(Vector2, cubic_interpolate);
@ -397,6 +398,7 @@ struct _VariantCall {
VCALL_LOCALMEM1R(Vector3, distance_squared_to);
VCALL_LOCALMEM1R(Vector3, project);
VCALL_LOCALMEM1R(Vector3, angle_to);
VCALL_LOCALMEM1R(Vector3, direction_to);
VCALL_LOCALMEM1R(Vector3, slide);
VCALL_LOCALMEM1R(Vector3, bounce);
VCALL_LOCALMEM1R(Vector3, reflect);
@ -773,6 +775,8 @@ struct _VariantCall {
VCALL_PTR0R(Basis, get_orthogonal_index);
VCALL_PTR0R(Basis, orthonormalized);
VCALL_PTR2R(Basis, slerp);
VCALL_PTR2R(Basis, is_equal_approx);
VCALL_PTR0R(Basis, get_rotation_quat);
VCALL_PTR0R(Transform, inverse);
VCALL_PTR0R(Transform, affine_inverse);
@ -1497,9 +1501,9 @@ void register_variant_methods() {
ADDFUNC2R(STRING, STRING, String, replacen, STRING, "what", STRING, "forwhat", varray());
ADDFUNC2R(STRING, STRING, String, insert, INT, "position", STRING, "what", varray());
ADDFUNC0R(STRING, STRING, String, capitalize, varray());
ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, split, STRING, "divisor", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, rsplit, STRING, "divisor", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
ADDFUNC2R(STRING, POOL_REAL_ARRAY, String, split_floats, STRING, "divisor", BOOL, "allow_empty", varray(true));
ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, split, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, rsplit, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
ADDFUNC2R(STRING, POOL_REAL_ARRAY, String, split_floats, STRING, "delimiter", BOOL, "allow_empty", varray(true));
ADDFUNC0R(STRING, STRING, String, to_upper, varray());
ADDFUNC0R(STRING, STRING, String, to_lower, varray());
@ -1554,6 +1558,7 @@ void register_variant_methods() {
ADDFUNC0R(VECTOR2, REAL, Vector2, angle, varray());
ADDFUNC0R(VECTOR2, REAL, Vector2, length_squared, varray());
ADDFUNC0R(VECTOR2, BOOL, Vector2, is_normalized, varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, direction_to, VECTOR2, "b", varray());
ADDFUNC1R(VECTOR2, REAL, Vector2, distance_to, VECTOR2, "to", varray());
ADDFUNC1R(VECTOR2, REAL, Vector2, distance_squared_to, VECTOR2, "to", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, project, VECTOR2, "b", varray());
@ -1602,6 +1607,7 @@ void register_variant_methods() {
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());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, direction_to, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, REAL, Vector3, dot, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, cross, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, BASIS, Vector3, outer, VECTOR3, "b", varray());
@ -1842,6 +1848,8 @@ void register_variant_methods() {
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, BOOL, Basis, is_equal_approx, BASIS, "b", REAL, "epsilon", varray(CMP_EPSILON));
ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray());
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, inverse, varray());
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, affine_inverse, varray());
@ -1923,9 +1931,9 @@ void register_variant_methods() {
_VariantCall::add_variant_constant(Variant::TRANSFORM, "IDENTITY", identity_transform);
transform_x.set(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0);
_VariantCall::add_variant_constant(Variant::TRANSFORM, "FLIP_X", transform_x);
transform_x.set(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0);
transform_y.set(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0);
_VariantCall::add_variant_constant(Variant::TRANSFORM, "FLIP_Y", transform_y);
transform_x.set(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0);
transform_z.set(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0);
_VariantCall::add_variant_constant(Variant::TRANSFORM, "FLIP_Z", transform_z);
_VariantCall::add_variant_constant(Variant::PLANE, "PLANE_YZ", Plane(Vector3(1, 0, 0), 0));

View File

@ -1542,6 +1542,9 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r
} else if (c != '=') {
what += String::chr(c);
} else {
if (p_stream->is_utf8()) {
what.parse_utf8(what.ascii(true).get_data());
}
r_assign = what;
Token token;
get_token(p_stream, token, line, r_err_str);

View File

@ -65,7 +65,7 @@ private:
const Pair *a = _cowdata.ptr();
int middle = 0;
#if DEBUG_ENABLED
#ifdef DEBUG_ENABLED
if (low > high)
ERR_PRINT("low > high, this may be a bug");
#endif

View File

@ -50,7 +50,7 @@ class VSet {
const T *a = &_data[0];
int middle = 0;
#if DEBUG_ENABLED
#ifdef DEBUG_ENABLED
if (low > high)
ERR_PRINT("low > high, this may be a bug");
#endif

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="@GlobalScope" category="Core" version="3.1">
<class name="@GlobalScope" category="Core" version="3.1.2">
<brief_description>
Global scope constants and variables.
</brief_description>
@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<members>
@ -640,7 +638,7 @@
_ key
</constant>
<constant name="KEY_QUOTELEFT" value="96" enum="KeyList">
Left Quote Key
` key.
</constant>
<constant name="KEY_BRACELEFT" value="123" enum="KeyList">
{ key
@ -664,9 +662,10 @@
<constant name="KEY_STERLING" value="163" enum="KeyList">
</constant>
<constant name="KEY_CURRENCY" value="164" enum="KeyList">
¤ key.
</constant>
<constant name="KEY_YEN" value="165" enum="KeyList">
Yen Key
¥ key.
</constant>
<constant name="KEY_BROKENBAR" value="166" enum="KeyList">
¦ key
@ -681,21 +680,22 @@
© key
</constant>
<constant name="KEY_ORDFEMININE" value="170" enum="KeyList">
ª key.
</constant>
<constant name="KEY_GUILLEMOTLEFT" value="171" enum="KeyList">
« key
</constant>
<constant name="KEY_NOTSIGN" value="172" enum="KeyList">
» key
¬ key.
</constant>
<constant name="KEY_HYPHEN" value="173" enum="KeyList">
key
Soft hyphen key.
</constant>
<constant name="KEY_REGISTERED" value="174" enum="KeyList">
® key
</constant>
<constant name="KEY_MACRON" value="175" enum="KeyList">
Macron Key
¯ key.
</constant>
<constant name="KEY_DEGREE" value="176" enum="KeyList">
° key
@ -716,19 +716,19 @@
µ key
</constant>
<constant name="KEY_PARAGRAPH" value="182" enum="KeyList">
Paragraph Key
¶ key.
</constant>
<constant name="KEY_PERIODCENTERED" value="183" enum="KeyList">
· key
</constant>
<constant name="KEY_CEDILLA" value="184" enum="KeyList">
¬ key
¸ key.
</constant>
<constant name="KEY_ONESUPERIOR" value="185" enum="KeyList">
¹ key
</constant>
<constant name="KEY_MASCULINE" value="186" enum="KeyList">
♂ key
º key.
</constant>
<constant name="KEY_GUILLEMOTRIGHT" value="187" enum="KeyList">
» key
@ -746,97 +746,97 @@
¿ key
</constant>
<constant name="KEY_AGRAVE" value="192" enum="KeyList">
à key
À key.
</constant>
<constant name="KEY_AACUTE" value="193" enum="KeyList">
á key
Á key.
</constant>
<constant name="KEY_ACIRCUMFLEX" value="194" enum="KeyList">
â key
 key.
</constant>
<constant name="KEY_ATILDE" value="195" enum="KeyList">
ã key
à key.
</constant>
<constant name="KEY_ADIAERESIS" value="196" enum="KeyList">
ä key
Ä key.
</constant>
<constant name="KEY_ARING" value="197" enum="KeyList">
å key
Å key.
</constant>
<constant name="KEY_AE" value="198" enum="KeyList">
æ key
Æ key.
</constant>
<constant name="KEY_CCEDILLA" value="199" enum="KeyList">
ç key
Ç key.
</constant>
<constant name="KEY_EGRAVE" value="200" enum="KeyList">
è key
È key.
</constant>
<constant name="KEY_EACUTE" value="201" enum="KeyList">
é key
É key.
</constant>
<constant name="KEY_ECIRCUMFLEX" value="202" enum="KeyList">
ê key
Ê key.
</constant>
<constant name="KEY_EDIAERESIS" value="203" enum="KeyList">
ë key
Ë key.
</constant>
<constant name="KEY_IGRAVE" value="204" enum="KeyList">
ì key
Ì key.
</constant>
<constant name="KEY_IACUTE" value="205" enum="KeyList">
í key
Í key.
</constant>
<constant name="KEY_ICIRCUMFLEX" value="206" enum="KeyList">
î key
Î key.
</constant>
<constant name="KEY_IDIAERESIS" value="207" enum="KeyList">
ë key
Ï key.
</constant>
<constant name="KEY_ETH" value="208" enum="KeyList">
ð key
Ð key.
</constant>
<constant name="KEY_NTILDE" value="209" enum="KeyList">
ñ key
Ñ key.
</constant>
<constant name="KEY_OGRAVE" value="210" enum="KeyList">
ò key
Ò key.
</constant>
<constant name="KEY_OACUTE" value="211" enum="KeyList">
ó key
Ó key.
</constant>
<constant name="KEY_OCIRCUMFLEX" value="212" enum="KeyList">
ô key
Ô key.
</constant>
<constant name="KEY_OTILDE" value="213" enum="KeyList">
õ key
Õ key.
</constant>
<constant name="KEY_ODIAERESIS" value="214" enum="KeyList">
ö key
Ö key.
</constant>
<constant name="KEY_MULTIPLY" value="215" enum="KeyList">
× key
</constant>
<constant name="KEY_OOBLIQUE" value="216" enum="KeyList">
ø key
Ø key.
</constant>
<constant name="KEY_UGRAVE" value="217" enum="KeyList">
ù key
Ù key.
</constant>
<constant name="KEY_UACUTE" value="218" enum="KeyList">
ú key
Ú key.
</constant>
<constant name="KEY_UCIRCUMFLEX" value="219" enum="KeyList">
û key
Û key.
</constant>
<constant name="KEY_UDIAERESIS" value="220" enum="KeyList">
ü key
Ü key.
</constant>
<constant name="KEY_YACUTE" value="221" enum="KeyList">
ý key
Ý key.
</constant>
<constant name="KEY_THORN" value="222" enum="KeyList">
þ key
Þ key.
</constant>
<constant name="KEY_SSHARP" value="223" enum="KeyList">
ß key
@ -965,7 +965,7 @@
Joypad Button 15
</constant>
<constant name="JOY_BUTTON_MAX" value="16" enum="JoystickList">
Joypad Button 16
Represents the maximum number of joystick buttons supported.
</constant>
<constant name="JOY_SONY_CIRCLE" value="1" enum="JoystickList">
DUALSHOCK circle button
@ -992,16 +992,16 @@
XBOX controller Y button
</constant>
<constant name="JOY_DS_A" value="1" enum="JoystickList">
DualShock controller A button
Nintendo controller A button.
</constant>
<constant name="JOY_DS_B" value="0" enum="JoystickList">
DualShock controller B button
Nintendo controller B button.
</constant>
<constant name="JOY_DS_X" value="3" enum="JoystickList">
DualShock controller X button
Nintendo controller X button.
</constant>
<constant name="JOY_DS_Y" value="2" enum="JoystickList">
DualShock controller Y button
Nintendo controller Y button.
</constant>
<constant name="JOY_SELECT" value="10" enum="JoystickList">
Joypad Button Select
@ -1052,8 +1052,10 @@
Joypad Right Stick Vertical Axis
</constant>
<constant name="JOY_AXIS_4" value="4" enum="JoystickList">
Generic gamepad axis 4.
</constant>
<constant name="JOY_AXIS_5" value="5" enum="JoystickList">
Generic gamepad axis 5.
</constant>
<constant name="JOY_AXIS_6" value="6" enum="JoystickList">
Joypad Left Trigger Analog Axis
@ -1062,10 +1064,13 @@
Joypad Right Trigger Analog Axis
</constant>
<constant name="JOY_AXIS_8" value="8" enum="JoystickList">
Generic gamepad axis 8.
</constant>
<constant name="JOY_AXIS_9" value="9" enum="JoystickList">
Generic gamepad axis 9.
</constant>
<constant name="JOY_AXIS_MAX" value="10" enum="JoystickList">
Represents the maximum number of joystick axes supported.
</constant>
<constant name="JOY_ANALOG_LX" value="0" enum="JoystickList">
Joypad Left Stick Horizontal Axis
@ -1086,228 +1091,292 @@
Joypad Right Analog Trigger
</constant>
<constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MidiMessageList">
MIDI note OFF message.
</constant>
<constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MidiMessageList">
MIDI note ON message.
</constant>
<constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MidiMessageList">
MIDI aftertouch message.
</constant>
<constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MidiMessageList">
MIDI control change message.
</constant>
<constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MidiMessageList">
MIDI program change message.
</constant>
<constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MidiMessageList">
MIDI channel pressure message.
</constant>
<constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MidiMessageList">
MIDI pitch bend message.
</constant>
<constant name="OK" value="0" enum="Error">
Functions that return Error return OK when no error occurred. Most functions don't return errors and/or just print errors to STDOUT.
Methods that return [enum Error] return [constant OK] when no error occurred. Note that many functions don't return an error code but will print error messages to stdout.
Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
[codeblock]
var err = method_that_returns_error()
if (err != OK):
print("Failure!)
# Or, equivalent:
if (err):
print("Still failing!)
[/codeblock]
</constant>
<constant name="FAILED" value="1" enum="Error">
Generic error.
</constant>
<constant name="ERR_UNAVAILABLE" value="2" enum="Error">
Unavailable error
Unavailable error.
</constant>
<constant name="ERR_UNCONFIGURED" value="3" enum="Error">
Unconfigured error
Unconfigured error.
</constant>
<constant name="ERR_UNAUTHORIZED" value="4" enum="Error">
Unauthorized error
Unauthorized error.
</constant>
<constant name="ERR_PARAMETER_RANGE_ERROR" value="5" enum="Error">
Parameter range error
Parameter range error.
</constant>
<constant name="ERR_OUT_OF_MEMORY" value="6" enum="Error">
Out of memory (OOM) error
Out of memory (OOM) error.
</constant>
<constant name="ERR_FILE_NOT_FOUND" value="7" enum="Error">
File: Not found error
File: Not found error.
</constant>
<constant name="ERR_FILE_BAD_DRIVE" value="8" enum="Error">
File: Bad drive error
File: Bad drive error.
</constant>
<constant name="ERR_FILE_BAD_PATH" value="9" enum="Error">
File: Bad path error
File: Bad path error.
</constant>
<constant name="ERR_FILE_NO_PERMISSION" value="10" enum="Error">
File: No permission error
File: No permission error.
</constant>
<constant name="ERR_FILE_ALREADY_IN_USE" value="11" enum="Error">
File: Already in use error
File: Already in use error.
</constant>
<constant name="ERR_FILE_CANT_OPEN" value="12" enum="Error">
File: Can't open error
File: Can't open error.
</constant>
<constant name="ERR_FILE_CANT_WRITE" value="13" enum="Error">
File: Can't write error
File: Can't write error.
</constant>
<constant name="ERR_FILE_CANT_READ" value="14" enum="Error">
File: Can't read error
File: Can't read error.
</constant>
<constant name="ERR_FILE_UNRECOGNIZED" value="15" enum="Error">
File: Unrecognized error
File: Unrecognized error.
</constant>
<constant name="ERR_FILE_CORRUPT" value="16" enum="Error">
File: Corrupt error
File: Corrupt error.
</constant>
<constant name="ERR_FILE_MISSING_DEPENDENCIES" value="17" enum="Error">
File: Missing dependencies error
File: Missing dependencies error.
</constant>
<constant name="ERR_FILE_EOF" value="18" enum="Error">
File: End of file (EOF) error
File: End of file (EOF) error.
</constant>
<constant name="ERR_CANT_OPEN" value="19" enum="Error">
Can't open error
Can't open error.
</constant>
<constant name="ERR_CANT_CREATE" value="20" enum="Error">
Can't create error
</constant>
<constant name="ERR_PARSE_ERROR" value="43" enum="Error">
Parse error
Can't create error.
</constant>
<constant name="ERR_QUERY_FAILED" value="21" enum="Error">
Query failed error
Query failed error.
</constant>
<constant name="ERR_ALREADY_IN_USE" value="22" enum="Error">
Already in use error
Already in use error.
</constant>
<constant name="ERR_LOCKED" value="23" enum="Error">
Locked error
Locked error.
</constant>
<constant name="ERR_TIMEOUT" value="24" enum="Error">
Timeout error
Timeout error.
</constant>
<constant name="ERR_CANT_CONNECT" value="25" enum="Error">
Can't connect error.
</constant>
<constant name="ERR_CANT_RESOLVE" value="26" enum="Error">
Can't resolve error.
</constant>
<constant name="ERR_CONNECTION_ERROR" value="27" enum="Error">
Connection error.
</constant>
<constant name="ERR_CANT_ACQUIRE_RESOURCE" value="28" enum="Error">
Can't acquire resource error
Can't acquire resource error.
</constant>
<constant name="ERR_CANT_FORK" value="29" enum="Error">
Can't fork process error.
</constant>
<constant name="ERR_INVALID_DATA" value="30" enum="Error">
Invalid data error
Invalid data error.
</constant>
<constant name="ERR_INVALID_PARAMETER" value="31" enum="Error">
Invalid parameter error
Invalid parameter error.
</constant>
<constant name="ERR_ALREADY_EXISTS" value="32" enum="Error">
Already exists error
Already exists error.
</constant>
<constant name="ERR_DOES_NOT_EXIST" value="33" enum="Error">
Does not exist error
Does not exist error.
</constant>
<constant name="ERR_DATABASE_CANT_READ" value="34" enum="Error">
Database: Read error
Database: Read error.
</constant>
<constant name="ERR_DATABASE_CANT_WRITE" value="35" enum="Error">
Database: Write error
Database: Write error.
</constant>
<constant name="ERR_COMPILATION_FAILED" value="36" enum="Error">
Compilation failed error
Compilation failed error.
</constant>
<constant name="ERR_METHOD_NOT_FOUND" value="37" enum="Error">
Method not found error
Method not found error.
</constant>
<constant name="ERR_LINK_FAILED" value="38" enum="Error">
Linking failed error
Linking failed error.
</constant>
<constant name="ERR_SCRIPT_FAILED" value="39" enum="Error">
Script failed error
Script failed error.
</constant>
<constant name="ERR_CYCLIC_LINK" value="40" enum="Error">
Cycling link (import cycle) error
Cycling link (import cycle) error.
</constant>
<constant name="ERR_INVALID_DECLARATION" value="41" enum="Error">
Invalid declaration error.
</constant>
<constant name="ERR_DUPLICATE_SYMBOL" value="42" enum="Error">
Duplicate symbol error.
</constant>
<constant name="ERR_PARSE_ERROR" value="43" enum="Error">
Parse error.
</constant>
<constant name="ERR_BUSY" value="44" enum="Error">
Busy error
Busy error.
</constant>
<constant name="ERR_SKIP" value="45" enum="Error">
Skip error.
</constant>
<constant name="ERR_HELP" value="46" enum="Error">
Help error
Help error.
</constant>
<constant name="ERR_BUG" value="47" enum="Error">
Bug error
Bug error.
</constant>
<constant name="ERR_PRINTER_ON_FIRE" value="48" enum="Error">
Printer on fire error. (This is an easter egg, no engine methods return this error code.)
</constant>
<constant name="PROPERTY_HINT_NONE" value="0" enum="PropertyHint">
No hint for edited property.
</constant>
<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code].
</constant>
<constant name="PROPERTY_HINT_EXP_RANGE" value="2" enum="PropertyHint">
Hints that the string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
Hints that an integer or float property should be within an exponential range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"0.01,100,0.01,or_greater"[/code].
</constant>
<constant name="PROPERTY_HINT_ENUM" value="3" enum="PropertyHint">
Property hint for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties.
Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
</constant>
<constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint">
Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing.
</constant>
<constant name="PROPERTY_HINT_LENGTH" value="5" enum="PropertyHint">
Deprecated hint, unused.
</constant>
<constant name="PROPERTY_HINT_KEY_ACCEL" value="7" enum="PropertyHint">
Deprecated hint, unused.
</constant>
<constant name="PROPERTY_HINT_FLAGS" value="8" enum="PropertyHint">
Property hint for a bitmask description, for bits 0,1,2,3 and 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers.
Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code].
</constant>
<constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="9" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D render layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="10" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D physics layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 3D render layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 3D physics layers.
</constant>
<constant name="PROPERTY_HINT_FILE" value="13" enum="PropertyHint">
String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc".
Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
<constant name="PROPERTY_HINT_DIR" value="14" enum="PropertyHint">
String property is a directory (so pop up a file dialog when edited).
Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
</constant>
<constant name="PROPERTY_HINT_GLOBAL_FILE" value="15" enum="PropertyHint">
Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
<constant name="PROPERTY_HINT_GLOBAL_DIR" value="16" enum="PropertyHint">
Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
</constant>
<constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint">
String property is a resource, so open the resource popup menu when edited.
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
</constant>
<constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
</constant>
<constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="19" enum="PropertyHint">
Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use.
</constant>
<constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="20" enum="PropertyHint">
Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited.
</constant>
<constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="21" enum="PropertyHint">
Hints that the image is compressed using lossy compression.
Hints that an image is compressed using lossy compression.
</constant>
<constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="22" enum="PropertyHint">
Hints that the image is compressed using lossless compression.
Hints that an image is compressed using lossless compression.
</constant>
<constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags">
Property will be used as storage (default).
The property is serialized and saved in the scene file (default).
</constant>
<constant name="PROPERTY_USAGE_EDITOR" value="2" enum="PropertyUsageFlags">
Property will be visible in editor (default).
The property is shown in the editor inspector (default).
</constant>
<constant name="PROPERTY_USAGE_NETWORK" value="4" enum="PropertyUsageFlags">
Deprecated usage flag, unused.
</constant>
<constant name="PROPERTY_USAGE_EDITOR_HELPER" value="8" enum="PropertyUsageFlags">
Deprecated usage flag, unused.
</constant>
<constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags">
The property can be checked in the editor inspector.
</constant>
<constant name="PROPERTY_USAGE_CHECKED" value="32" enum="PropertyUsageFlags">
The property is checked in the editor inspector.
</constant>
<constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="64" enum="PropertyUsageFlags">
The property is a translatable string.
</constant>
<constant name="PROPERTY_USAGE_GROUP" value="128" enum="PropertyUsageFlags">
Used to group properties together in the editor.
</constant>
<constant name="PROPERTY_USAGE_CATEGORY" value="256" enum="PropertyUsageFlags">
Used to categorize properties together in the editor.
</constant>
<constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048" enum="PropertyUsageFlags">
The property does not save its state in [PackedScene].
</constant>
<constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096" enum="PropertyUsageFlags">
Editing the property prompts the user for restarting the editor.
</constant>
<constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192" enum="PropertyUsageFlags">
The property is a script variable which should be serialized and saved in the scene file.
</constant>
<constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags">
Default usage (storage and editor).
Default usage (storage, editor and network).
</constant>
<constant name="PROPERTY_USAGE_DEFAULT_INTL" value="71" enum="PropertyUsageFlags">
Default usage for translatable strings (storage, editor, network and internationalized).
</constant>
<constant name="PROPERTY_USAGE_NOEDITOR" value="5" enum="PropertyUsageFlags">
Default usage but without showing the property in the editor (storage, network).
</constant>
<constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags">
Flag for normal method
@ -1316,23 +1385,25 @@
Flag for editor method
</constant>
<constant name="METHOD_FLAG_NOSCRIPT" value="4" enum="MethodFlags">
Deprecated method flag, unused.
</constant>
<constant name="METHOD_FLAG_CONST" value="8" enum="MethodFlags">
Flag for constant method
</constant>
<constant name="METHOD_FLAG_REVERSE" value="16" enum="MethodFlags">
Deprecated method flag, unused.
</constant>
<constant name="METHOD_FLAG_VIRTUAL" value="32" enum="MethodFlags">
Flag for virtual method
</constant>
<constant name="METHOD_FLAG_FROM_SCRIPT" value="64" enum="MethodFlags">
Flag for method from script
Deprecated method flag, unused.
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
Default method flags
</constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
Variable is of type nil (only applied for null).
Variable is of type [Nil] (only applied for [code]null[/code]).
</constant>
<constant name="TYPE_BOOL" value="1" enum="Variant.Type">
Variable is of type [bool].
@ -1341,7 +1412,7 @@
Variable is of type [int].
</constant>
<constant name="TYPE_REAL" value="3" enum="Variant.Type">
Variable is of type [float]/real.
Variable is of type [float] (real).
</constant>
<constant name="TYPE_STRING" value="4" enum="Variant.Type">
Variable is of type [String].
@ -1413,59 +1484,85 @@
Variable is of type [PoolColorArray].
</constant>
<constant name="TYPE_MAX" value="27" enum="Variant.Type">
Marker for end of type constants.
Represents the size of the [enum Variant.Type] enum.
</constant>
<constant name="OP_EQUAL" value="0" enum="Variant.Operator">
Equality operator ([code]==[/code]).
</constant>
<constant name="OP_NOT_EQUAL" value="1" enum="Variant.Operator">
Inequality operator ([code]!=[/code]).
</constant>
<constant name="OP_LESS" value="2" enum="Variant.Operator">
Less than operator ([code]&lt;[/code]).
</constant>
<constant name="OP_LESS_EQUAL" value="3" enum="Variant.Operator">
Less than or equal operator ([code]&lt;=[/code]).
</constant>
<constant name="OP_GREATER" value="4" enum="Variant.Operator">
Greater than operator ([code]&gt;[/code]).
</constant>
<constant name="OP_GREATER_EQUAL" value="5" enum="Variant.Operator">
Greater than or equal operator ([code]&gt;=[/code]).
</constant>
<constant name="OP_ADD" value="6" enum="Variant.Operator">
Addition operator ([code]+[/code]).
</constant>
<constant name="OP_SUBTRACT" value="7" enum="Variant.Operator">
Subtraction operator ([code]-[/code]).
</constant>
<constant name="OP_MULTIPLY" value="8" enum="Variant.Operator">
Multiplication operator ([code]*[/code]).
</constant>
<constant name="OP_DIVIDE" value="9" enum="Variant.Operator">
Division operator ([code]/[/code]).
</constant>
<constant name="OP_NEGATE" value="10" enum="Variant.Operator">
Unary negation operator ([code]-[/code]).
</constant>
<constant name="OP_POSITIVE" value="11" enum="Variant.Operator">
Unary plus operator ([code]+[/code]).
</constant>
<constant name="OP_MODULE" value="12" enum="Variant.Operator">
Remainder/modulo operator ([code]%[/code]).
</constant>
<constant name="OP_STRING_CONCAT" value="13" enum="Variant.Operator">
String concatenation operator ([code]+[/code]).
</constant>
<constant name="OP_SHIFT_LEFT" value="14" enum="Variant.Operator">
Left shift operator ([code]&lt;&lt;[/code]).
</constant>
<constant name="OP_SHIFT_RIGHT" value="15" enum="Variant.Operator">
Right shift operator ([code]&gt;&gt;[/code]).
</constant>
<constant name="OP_BIT_AND" value="16" enum="Variant.Operator">
Bitwise AND operator ([code]&amp;[/code]).
</constant>
<constant name="OP_BIT_OR" value="17" enum="Variant.Operator">
Bitwise OR operator ([code]|[/code]).
</constant>
<constant name="OP_BIT_XOR" value="18" enum="Variant.Operator">
Bitwise XOR operator ([code]^[/code]).
</constant>
<constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator">
Bitwise NOT operator ([code]~[/code]).
</constant>
<constant name="OP_AND" value="20" enum="Variant.Operator">
Logical AND operator ([code]and[/code] or [code]&amp;&amp;[/code]).
</constant>
<constant name="OP_OR" value="21" enum="Variant.Operator">
Logical OR operator ([code]or[/code] or [code]||[/code]).
</constant>
<constant name="OP_XOR" value="22" enum="Variant.Operator">
Logical XOR operator (not implemented in GDScript).
</constant>
<constant name="OP_NOT" value="23" enum="Variant.Operator">
Logical NOT operator ([code]not[/code] or [code]![/code]).
</constant>
<constant name="OP_IN" value="24" enum="Variant.Operator">
Logical IN operator ([code]in[/code]).
</constant>
<constant name="OP_MAX" value="25" enum="Variant.Operator">
Represents the size of the [enum Variant.Operator] enum.
</constant>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AABB" category="Built-In Types" version="3.1">
<class name="AABB" category="Built-In Types" version="3.1.2">
<brief_description>
Axis-Aligned Bounding Box.
</brief_description>
@ -7,10 +7,8 @@
AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
<link>https://docs.godotengine.org/en/3.1/tutorials/math/index.html</link>
</tutorials>
<demos>
</demos>
<methods>
<method name="AABB">
<return type="AABB">

View File

@ -1,17 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.1">
<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.1.2">
<brief_description>
Anchor point in AR Space.
</brief_description>
<description>
The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them.
This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognised.
This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognized.
Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_anchor_name" qualifiers="const">
<return type="String">
@ -24,7 +22,7 @@
<return type="bool">
</return>
<description>
Returns true if the anchor is being tracked and false if no anchor with this id is currently known.
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_plane" qualifiers="const">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRCamera" inherits="Camera" category="Core" version="3.1">
<class name="ARVRCamera" inherits="Camera" category="Core" version="3.1.2">
<brief_description>
A camera node with a few overrules for AR/VR applied, such as location tracking.
</brief_description>
@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<constants>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRController" inherits="Spatial" category="Core" version="3.1">
<class name="ARVRController" inherits="Spatial" category="Core" version="3.1.2">
<brief_description>
A spatial node representing a spatially tracked controller.
</brief_description>
@ -10,8 +10,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_controller_name" qualifiers="const">
<return type="String">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRInterface" inherits="Reference" category="Core" version="3.1">
<class name="ARVRInterface" inherits="Reference" category="Core" version="3.1.2">
<brief_description>
Base class for ARVR interface implementation.
</brief_description>
@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_capabilities" qualifiers="const">
<return type="int">
@ -55,7 +53,7 @@
<return type="bool">
</return>
<description>
Returns true if the current output of this interface is in stereo.
Returns [code]true[/code] if the current output of this interface is in stereo.
</description>
</method>
<method name="uninitialize">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.1">
<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.1.2">
<brief_description>
Our origin point in AR/VR.
</brief_description>
@ -11,8 +11,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<members>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.1">
<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.1.2">
<brief_description>
A tracked object
</brief_description>
@ -10,8 +10,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_hand" qualifiers="const">
<return type="int" enum="ARVRPositionalTracker.TrackerHand">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRServer" inherits="Object" category="Core" version="3.1">
<class name="ARVRServer" inherits="Object" category="Core" version="3.1.2">
<brief_description>
This is our AR/VR Server.
</brief_description>
@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="center_on_hmd">
<return type="void">
@ -56,7 +54,7 @@
<return type="int">
</return>
<description>
Get the number of interfaces currently registered with the AR/VR server. If your game supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try an initialize each interface and use the first one that returns true.
Get the number of interfaces currently registered with the AR/VR server. If your game supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try an initialize each interface and use the first one that returns [code]true[/code].
</description>
</method>
<method name="get_interfaces" qualifiers="const">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar" inherits="Reference" category="Core" version="3.1">
<class name="AStar" inherits="Reference" category="Core" version="3.1.2">
<brief_description>
AStar class representation that uses vectors as edges.
</brief_description>
@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="_compute_cost" qualifiers="virtual">
<return type="float">
@ -46,8 +44,8 @@
<description>
Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
[codeblock]
var as = AStar.new()
as.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1
var astar = AStar.new()
astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1
[/codeblock]
If there already exists a point for the given id, its position and weight scale are updated to the given values.
</description>
@ -82,10 +80,10 @@
<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]
var as = AStar.new()
as.add_point(1, Vector3(1, 1, 0))
as.add_point(2, Vector3(0, 5, 0))
as.connect_points(1, 2, false)
var astar = AStar.new()
astar.add_point(1, Vector3(1, 1, 0))
astar.add_point(2, Vector3(0, 5, 0))
astar.connect_points(1, 2, false)
[/codeblock]
</description>
</method>
@ -124,11 +122,11 @@
<description>
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
[codeblock]
var as = AStar.new()
as.add_point(1, Vector3(0, 0, 0))
as.add_point(2, Vector3(0, 5, 0))
as.connect_points(1, 2)
var res = as.get_closest_position_in_segment(Vector3(3, 3, 0)) # returns (0, 3, 0)
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 5, 0))
astar.connect_points(1, 2)
var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0)
[/codeblock]
The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point.
</description>
@ -143,19 +141,18 @@
<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]
var as = AStar.new()
as.add_point(1, Vector3(0, 0, 0))
as.add_point(2, Vector3(0, 1, 0), 1) # default weight is 1
as.add_point(3, Vector3(1, 1, 0))
as.add_point(4, Vector3(2, 0, 0))
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1
astar.add_point(3, Vector3(1, 1, 0))
astar.add_point(4, Vector3(2, 0, 0))
as.connect_points(1, 2, false)
as.connect_points(2, 3, false)
as.connect_points(4, 3, false)
as.connect_points(1, 4, false)
as.connect_points(5, 4, false)
astar.connect_points(1, 2, false)
astar.connect_points(2, 3, false)
astar.connect_points(4, 3, false)
astar.connect_points(1, 4, false)
var res = as.get_id_path(1, 3) # returns [1, 2, 3]
var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
[/codeblock]
If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
</description>
@ -168,16 +165,16 @@
<description>
Returns an array with the ids of the points that form the connect with the given point.
[codeblock]
var as = AStar.new()
as.add_point(1, Vector3(0, 0, 0))
as.add_point(2, Vector3(0, 1, 0))
as.add_point(3, Vector3(1, 1, 0))
as.add_point(4, Vector3(2, 0, 0))
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 1, 0))
astar.add_point(3, Vector3(1, 1, 0))
astar.add_point(4, Vector3(2, 0, 0))
as.connect_points(1, 2, true)
as.connect_points(1, 3, true)
astar.connect_points(1, 2, true)
astar.connect_points(1, 3, true)
var neighbors = as.get_point_connections(1) # returns [2, 3]
var neighbors = astar.get_point_connections(1) # Returns [2, 3]
[/codeblock]
</description>
</method>
@ -226,6 +223,15 @@
Returns whether a point associated with the given id exists.
</description>
</method>
<method name="is_point_disabled" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<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>
@ -235,6 +241,17 @@
Removes the point associated with the given id from the points pool.
</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>
<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>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.1">
<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.1.2">
<brief_description>
Base dialog for user notification.
</brief_description>
@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="add_button">
<return type="Button">
@ -38,14 +36,14 @@
<return type="Label">
</return>
<description>
Return the label used for built-in text.
Returns the label used for built-in text.
</description>
</method>
<method name="get_ok">
<return type="Button">
</return>
<description>
Return the OK Button.
Returns the OK Button.
</description>
</method>
<method name="register_text_enter">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.1">
<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.1.2">
<brief_description>
Sprite node that can use multiple textures for animation.
</brief_description>
@ -8,14 +8,12 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<description>
Return true if an animation if currently being played.
Returns [code]true[/code] if an animation if currently being played.
</description>
</method>
<method name="play">
@ -23,8 +21,10 @@
</return>
<argument index="0" name="anim" type="String" default="&quot;&quot;">
</argument>
<argument index="1" name="backwards" type="bool" default="false">
</argument>
<description>
Play the animation set in parameter. If no parameter is provided, the current animation is played.
Play the animation set in parameter. If no parameter is provided, the current animation is played. Property [code]backwards[/code] plays the animation in reverse if set to [code]true[/code].
</description>
</method>
<method name="stop">
@ -61,6 +61,7 @@
If [code]true[/code], the [member animation] is currently playing.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale">
The animation speed is multiplied by this value.
</member>
</members>
<signals>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.1">
<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.1.2">
<brief_description>
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
@ -8,14 +8,12 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<description>
Return true if an animation if currently being played.
Returns [code]true[/code] if an animation if currently being played.
</description>
</method>
<method name="play">

View File

@ -1,17 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedTexture" inherits="Texture" category="Core" version="3.1">
<class name="AnimatedTexture" inherits="Texture" category="Core" version="3.1.2">
<brief_description>
Proxy texture for simple frame-based animations.
</brief_description>
<description>
[code]AnimatedTexture[/code] is a resource format for simple frame-based animations, where multiple frames textures can be chained automatically with a predefined delay for each frame. It's not a [Node], contrarily to [AnimationPlayer] or [AnimatedSprite], but has the advantage of being usable at any place where a [Texture] resource can be used, e.g. in a [TileSet].
[code]AnimatedTexture[/code] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture] resource can be used, e.g. in a [TileSet].
The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.
[code]AnimatedTexture[/code] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_frame_delay" qualifiers="const">
<return type="float">
@ -19,7 +17,7 @@
<argument index="0" name="frame" type="int">
</argument>
<description>
Retrieves the delayed assigned to the given [code]frame[/code] ID.
Returns the given frame's delay value.
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
@ -28,7 +26,7 @@
<argument index="0" name="frame" type="int">
</argument>
<description>
Retrieves the [Texture] assigned to the given [code]frame[/code] ID.
Returns the given frame's [Texture].
</description>
</method>
<method name="set_frame_delay">
@ -39,7 +37,7 @@
<argument index="1" name="delay" type="float">
</argument>
<description>
Defines 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].
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:
[codeblock]
Frame 0: 0.5 s (1 / fps)
@ -57,15 +55,15 @@
<argument index="1" name="texture" type="Texture">
</argument>
<description>
Assigns a [Texture] to the given [code]frame[/code] ID. 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 frame texture up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.
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.
</description>
</method>
</methods>
<members>
<member name="fps" type="float" setter="set_fps" getter="get_fps">
Number of frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). Default value: 4.
For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run over 4 seconds, with one frame each 0.5 seconds.
Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). Default value: 4.
For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds.
</member>
<member name="frames" type="int" setter="set_frames" getter="get_frames">
Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]. Default value: 1.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Animation" inherits="Resource" category="Core" version="3.1">
<class name="Animation" inherits="Resource" category="Core" version="3.1.2">
<brief_description>
Contains data used to animate everything in the engine.
</brief_description>
@ -17,10 +17,8 @@
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
<link>https://docs.godotengine.org/en/3.1/tutorials/animation/index.html</link>
</tutorials>
<demos>
</demos>
<methods>
<method name="add_track">
<return type="int">
@ -265,14 +263,14 @@
<argument index="0" name="path" type="NodePath">
</argument>
<description>
Return the index of the specified track. If the track is not found, return -1.
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>
<description>
Return the amount of tracks in the animation.
Returns the amount of tracks in the animation.
</description>
</method>
<method name="method_track_get_key_indices" qualifiers="const">
@ -285,7 +283,7 @@
<argument index="2" name="delta" type="float">
</argument>
<description>
Return all the key indices of a method track, given a position and delta time.
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">
@ -296,7 +294,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Return the method name of a method track.
Returns the method name of a method track.
</description>
</method>
<method name="method_track_get_params" qualifiers="const">
@ -307,7 +305,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Return the arguments values to be called on a method track for a given key in a given track.
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">
@ -347,7 +345,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Return the interpolation type of a given track, from the INTERPOLATION_* enum.
Returns the interpolation type of a given track, from the INTERPOLATION_* enum.
</description>
</method>
<method name="track_get_key_count" qualifiers="const">
@ -356,7 +354,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Return the amount of keys in a given track.
Returns the amount of keys in a given track.
</description>
</method>
<method name="track_get_key_time" qualifiers="const">
@ -367,7 +365,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Return the time at which the key is located.
Returns the time at which the key is located.
</description>
</method>
<method name="track_get_key_transition" qualifiers="const">
@ -378,7 +376,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Return the transition curve (easing) for a specific key (see built-in math function "ease").
Returns the transition curve (easing) for a specific key (see built-in math function "ease").
</description>
</method>
<method name="track_get_key_value" qualifiers="const">
@ -389,7 +387,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Return the value of a given key in a given track.
Returns the value of a given key in a given track.
</description>
</method>
<method name="track_get_path" qualifiers="const">
@ -440,7 +438,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Return true if the given track is imported. Else, return false.
Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code].
</description>
</method>
<method name="track_move_down">
@ -600,7 +598,7 @@
<argument index="1" name="time_sec" type="float">
</argument>
<description>
Return 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]).
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">
@ -613,7 +611,7 @@
<argument index="2" name="delta" type="float">
</argument>
<description>
Return all the key indices of a value track, given a position and delta time.
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">
@ -622,7 +620,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Return the update mode of a value track.
Returns the update mode of a value track.
</description>
</method>
<method name="value_track_set_update_mode">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNode" inherits="Resource" category="Core" version="3.1">
<class name="AnimationNode" inherits="Resource" category="Core" version="3.1.2">
<brief_description>
Base resource for [AnimationTree] nodes.
</brief_description>
@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="add_input">
<return type="void">
@ -54,7 +52,7 @@
<argument index="5" name="optimize" type="bool" default="true">
</argument>
<description>
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. Time is a delta, unless "seek" is true, in which case it is absolute. A filter mode may be optionally passed.
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. Time is a delta, unless "seek" is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed.
</description>
</method>
<method name="blend_node">
@ -146,7 +144,7 @@
<return type="String">
</return>
<description>
Return true whether you want the blend tree editor to display filter editing on this node.
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">
@ -155,7 +153,7 @@
<argument index="0" name="path" type="NodePath">
</argument>
<description>
Return true wether a given path is filtered.
Returns [code]true[/code] whether a given path is filtered.
</description>
</method>
<method name="process" qualifiers="virtual">
@ -166,7 +164,7 @@
<argument index="1" name="seek" type="bool">
</argument>
<description>
Called when a custom node is processed. The argument "time" is relative, unless "seek" is true (in which case it is absolute).
Called when a custom node is processed. The argument "time" is relative, unless "seek" 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.
This function returns the time left for the current animation to finish (if unsure, just pass the value from the main blend being called).
@ -206,7 +204,7 @@
</methods>
<members>
<member name="filter_enabled" type="bool" setter="set_filter_enabled" getter="is_filter_enabled">
Return whether filtering is enabled.
Returns whether filtering is enabled.
</member>
</members>
<signals>
@ -217,6 +215,7 @@
</signal>
<signal name="tree_changed">
<description>
Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree].
</description>
</signal>
</signals>

View File

@ -1,17 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeAdd2" inherits="AnimationNode" category="Core" version="3.1">
<class name="AnimationNodeAdd2" inherits="AnimationNode" category="Core" version="3.1.2">
<brief_description>
Blends two animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
<constants>

View File

@ -1,17 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeAdd3" inherits="AnimationNode" category="Core" version="3.1">
<class name="AnimationNodeAdd3" inherits="AnimationNode" category="Core" version="3.1.2">
<brief_description>
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations together additively out of three based on a value in the [code][-1.0, 1.0][/code] range.
This node has three inputs:
- The base animation to add to
- A -add animation to blend with when the blend amount is in the [code][-1.0, 0.0][/code] range.
- A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
<constants>

View File

@ -1,17 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeAnimation" inherits="AnimationRootNode" category="Core" version="3.1">
<class name="AnimationNodeAnimation" inherits="AnimationRootNode" category="Core" version="3.1.2">
<brief_description>
Input animation to use in an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<members>
<member name="animation" type="String" setter="set_animation" getter="get_animation">
Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player].
</member>
</members>
<constants>

View File

@ -1,17 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlend2" inherits="AnimationNode" category="Core" version="3.1">
<class name="AnimationNodeBlend2" inherits="AnimationNode" category="Core" version="3.1.2">
<brief_description>
Blends two animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
<constants>

View File

@ -1,17 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlend3" inherits="AnimationNode" category="Core" version="3.1">
<class name="AnimationNodeBlend3" inherits="AnimationNode" category="Core" version="3.1.2">
<brief_description>
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations together linearly out of three based on a value in the [code][-1.0, 1.0][/code] range.
This node has three inputs:
- The base animation
- A -blend animation to blend with when the blend amount is in the [code][-1.0, 0.0][/code] range.
- A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
<constants>

View File

@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" category="Core" version="3.1">
<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" category="Core" version="3.1.2">
<brief_description>
Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis.
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree].
This is a virtual axis on which you can add any type of [AnimationNode] using [method add_blend_point].
Outputs the linear blend of the two [code]AnimationNode[/code] closest to the node's current [code]value[/code].
You can set the extents of the axis using the [member min_space] and [member max_space].
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="add_blend_point">
<return type="void">
@ -19,12 +22,14 @@
<argument index="2" name="at_index" type="int" default="-1">
</argument>
<description>
Add 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>
<description>
Returns the number of points on the blend axis.
</description>
</method>
<method name="get_blend_point_node" qualifiers="const">
@ -33,6 +38,7 @@
<argument index="0" name="point" type="int">
</argument>
<description>
Returns the [code]AnimationNode[/code] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
@ -41,6 +47,7 @@
<argument index="0" name="point" type="int">
</argument>
<description>
Returns the position of the point at index [code]point[/code].
</description>
</method>
<method name="remove_blend_point">
@ -49,6 +56,7 @@
<argument index="0" name="point" type="int">
</argument>
<description>
Removes the point at index [code]point[/code] from the blend axis.
</description>
</method>
<method name="set_blend_point_node">
@ -59,6 +67,7 @@
<argument index="1" name="node" type="AnimationRootNode">
</argument>
<description>
Changes the AnimationNode referenced by the point at index [code]point[/code].
</description>
</method>
<method name="set_blend_point_position">
@ -69,17 +78,22 @@
<argument index="1" name="pos" type="float">
</argument>
<description>
Updates the position of the point at index [code]point[/code] on the blend axis.
</description>
</method>
</methods>
<members>
<member name="max_space" type="float" setter="set_max_space" getter="get_max_space">
The blend space's axis's upper limit for the points' position. See [method add_blend_point].
</member>
<member name="min_space" type="float" setter="set_min_space" getter="get_min_space">
The blend space's axis's lower limit for the points' position. See [method add_blend_point].
</member>
<member name="snap" type="float" setter="set_snap" getter="get_snap">
Position increment to snap to when moving a point on the axis.
</member>
<member name="value_label" type="String" setter="set_value_label" getter="get_value_label">
Label of the virtual axis of the blend space.
</member>
</members>
<constants>

View File

@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" category="Core" version="3.1">
<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" category="Core" version="3.1.2">
<brief_description>
Blends linearly between three [AnimationNode] of any type placed in a 2d space.
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree].
This node allows you to blend linearly between three animations using a [Vector2] weight.
You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="add_blend_point">
<return type="void">
@ -19,6 +21,7 @@
<argument index="2" name="at_index" type="int" default="-1">
</argument>
<description>
Add 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">
@ -33,12 +36,14 @@
<argument index="3" name="at_index" type="int" default="-1">
</argument>
<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>
<description>
Returns the number of points in the blend space.
</description>
</method>
<method name="get_blend_point_node" qualifiers="const">
@ -47,6 +52,7 @@
<argument index="0" name="point" type="int">
</argument>
<description>
Returns the [code]AnimationRootNode[/code] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
@ -55,12 +61,14 @@
<argument index="0" name="point" type="int">
</argument>
<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>
<description>
Returns the number of triangles in the blend space.
</description>
</method>
<method name="get_triangle_point">
@ -71,6 +79,7 @@
<argument index="1" name="point" type="int">
</argument>
<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">
@ -79,6 +88,7 @@
<argument index="0" name="point" type="int">
</argument>
<description>
Removes the point at index [code]point[/code] from the blend space.
</description>
</method>
<method name="remove_triangle">
@ -87,6 +97,7 @@
<argument index="0" name="triangle" type="int">
</argument>
<description>
Removes the triangle at index [code]triangle[/code] from the blend space.
</description>
</method>
<method name="set_blend_point_node">
@ -97,6 +108,7 @@
<argument index="1" name="node" type="AnimationRootNode">
</argument>
<description>
Changes the AnimationNode referenced by the point at index [code]point[/code].
</description>
</method>
<method name="set_blend_point_position">
@ -107,37 +119,49 @@
<argument index="1" name="pos" type="Vector2">
</argument>
<description>
Updates the position of the point at index [code]point[/code] on the blend axis.
</description>
</method>
</methods>
<members>
<member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles">
If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point].
</member>
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode">
Controls the interpolation between animations. See [enum BlendMode] constants.
</member>
<member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space">
The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point].
</member>
<member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space">
The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point].
</member>
<member name="snap" type="Vector2" setter="set_snap" getter="get_snap">
Position increment to snap to when moving a point.
</member>
<member name="x_label" type="String" setter="set_x_label" getter="get_x_label">
Name of the blend space's X axis.
</member>
<member name="y_label" type="String" setter="set_y_label" getter="get_y_label">
Name of the blend space's Y axis.
</member>
</members>
<signals>
<signal name="triangles_updated">
<description>
Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position.
</description>
</signal>
</signals>
<constants>
<constant name="BLEND_MODE_INTERPOLATED" value="0" enum="BlendMode">
The interpolation between animations is linear.
</constant>
<constant name="BLEND_MODE_DISCRETE" value="1" enum="BlendMode">
The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations.
</constant>
<constant name="BLEND_MODE_DISCRETE_CARRY" value="2" enum="BlendMode">
Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position.
</constant>
</constants>
</class>

View File

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" category="Core" version="3.1">
<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" category="Core" version="3.1.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="add_node">
<return type="void">

View File

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeOneShot" inherits="AnimationNode" category="Core" version="3.1">
<class name="AnimationNodeOneShot" inherits="AnimationNode" category="Core" version="3.1.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_mix_mode" qualifiers="const">
<return type="int" enum="AnimationNodeOneShot.MixMode">

View File

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeOutput" inherits="AnimationNode" category="Core" version="3.1">
<class name="AnimationNodeOutput" inherits="AnimationNode" category="Core" version="3.1.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
</methods>
<constants>

View File

@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" category="Core" version="3.1">
<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" category="Core" version="3.1.2">
<brief_description>
State machine for control of animations.
</brief_description>
<description>
Contains multiple nodes representing animation states, connected in a graph. Nodes transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the [code]AnimationTree[/code] node to control it programatically. Example:
[codeblock]
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
[/codeblock]
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="add_node">
<return type="void">
@ -19,6 +23,7 @@
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<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">
@ -31,18 +36,21 @@
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition">
</argument>
<description>
Adds a transition between the given nodes.
</description>
</method>
<method name="get_end_node" qualifiers="const">
<return type="String">
</return>
<description>
Returns the graph's end node.
</description>
</method>
<method name="get_graph_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
Returns the draw offset of the graph. Used for display in the editor.
</description>
</method>
<method name="get_node" qualifiers="const">
@ -51,6 +59,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
Returns the animation node with the given name.
</description>
</method>
<method name="get_node_name" qualifiers="const">
@ -59,6 +68,7 @@
<argument index="0" name="node" type="AnimationNode">
</argument>
<description>
Returns the given animation node's name.
</description>
</method>
<method name="get_node_position" qualifiers="const">
@ -67,12 +77,14 @@
<argument index="0" name="name" type="String">
</argument>
<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>
<description>
Returns the graph's end node.
</description>
</method>
<method name="get_transition" qualifiers="const">
@ -81,12 +93,14 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns the given transition.
</description>
</method>
<method name="get_transition_count" qualifiers="const">
<return type="int">
</return>
<description>
Returns the number of connections in the graph.
</description>
</method>
<method name="get_transition_from" qualifiers="const">
@ -95,6 +109,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns the given transition's start node.
</description>
</method>
<method name="get_transition_to" qualifiers="const">
@ -103,6 +118,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns the given transition's end node.
</description>
</method>
<method name="has_node" qualifiers="const">
@ -111,6 +127,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
Returns [code]true[/code] if the graph contains the given node.
</description>
</method>
<method name="has_transition" qualifiers="const">
@ -121,6 +138,7 @@
<argument index="1" name="to" type="String">
</argument>
<description>
Returns [code]true[/code] if there is a transition between the given nodes.
</description>
</method>
<method name="remove_node">
@ -129,6 +147,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
Deletes the given node from the graph.
</description>
</method>
<method name="remove_transition">
@ -139,6 +158,7 @@
<argument index="1" name="to" type="String">
</argument>
<description>
Deletes the given transition.
</description>
</method>
<method name="remove_transition_by_index">
@ -147,6 +167,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Deletes the given transition.
</description>
</method>
<method name="rename_node">
@ -157,6 +178,7 @@
<argument index="1" name="new_name" type="String">
</argument>
<description>
Renames the given node.
</description>
</method>
<method name="set_end_node">
@ -165,14 +187,16 @@
<argument index="0" name="name" type="String">
</argument>
<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="name" type="Vector2">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
Sets the draw offset of the graph. Used for display in the editor.
</description>
</method>
<method name="set_node_position">
@ -183,6 +207,7 @@
<argument index="1" name="position" type="Vector2">
</argument>
<description>
Sets the node's coordinates. Used for display in the editor.
</description>
</method>
<method name="set_start_node">
@ -191,6 +216,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
Sets the given node as the graph start point.
</description>
</method>
</methods>

View File

@ -1,18 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeStateMachinePlayback" inherits="Resource" category="Core" version="3.1">
<class name="AnimationNodeStateMachinePlayback" inherits="Resource" category="Core" version="3.1.2">
<brief_description>
Playback control for AnimationNodeStateMachine.
</brief_description>
<description>
Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code]. Example:
[codeblock]
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
[/codeblock]
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_current_node" qualifiers="const">
<return type="String">
</return>
<description>
Returns the currently playing animation state.
</description>
</method>
<method name="get_travel_path" qualifiers="const">
@ -25,6 +30,7 @@
<return type="bool">
</return>
<description>
Returns [code]true[/code] if an animation is playing.
</description>
</method>
<method name="start">
@ -33,12 +39,14 @@
<argument index="0" name="node" type="String">
</argument>
<description>
Starts playing the given animation.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<description>
Stops the currently playing animation.
</description>
</method>
<method name="travel">
@ -47,6 +55,7 @@
<argument index="0" name="to_node" type="String">
</argument>
<description>
Transitions from the current state to another one, following the shortest path.
</description>
</method>
</methods>

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