Compare commits

...

559 Commits

Author SHA1 Message Date
Rémi Verschelde
25047050b7 Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@Nallebeorn, @ibrahn, @KellyThomas, @ShyRed

Thanks to all contributors and donors for making Godot possible!

[ci skip]

(cherry picked from commit a18fe06773)
2018-06-14 15:22:48 +00:00
Hein-Pieter van Braam
38e6ba10b4 Update changelog for 3.0.3-stable 2018-06-14 15:21:42 +00:00
Hein-Pieter van Braam
e649ec71df Fix some missed changes from a cherrypick 2018-06-13 12:21:29 +00:00
Hein-Pieter van Braam
711aa196af Bump version to 3.0.3-stable 2018-06-13 11:57:40 +00:00
bruvzg
518a691231 Mono: Allow loading mscorlib from resources.
(cherry picked from commit b3ddf12fb1)
2018-06-13 11:57:40 +00:00
Rémi Verschelde
e8bfc09b81 i18n: Sync translations with Weblate 2018-06-05 22:10:51 +02:00
Rémi Verschelde
74808e71d2 i18n: Sync translation templates with current source 2018-06-05 22:04:33 +02:00
Hugo Locurcio
403f7dc35f Change ".." punctuation for "..." in editor strings (#16507)
(cherry picked from commit 1c419531a0)
2018-06-05 21:42:33 +02:00
Hein-Pieter van Braam
e09170dffa Revert "Prevent visibility notification been called twice in object creation"
This reverts commit 826108efec.

This caused a regression (#18614), and potentially other unintended regressions.
2018-06-05 12:14:57 +02:00
Hein-Pieter van Braam
f640639867 Fix Mono static linking on Mingw 2018-06-01 21:45:21 +02:00
Hein-Pieter van Braam
d24f77be99 Fix documentation version strings 2018-06-01 18:19:33 +02:00
Kelly thomas
f697b53eba round / ceil methods for c sharp vectors
(cherry picked from commit a6bd2c6e72)
2018-06-01 18:08:52 +02:00
Alexander Alekseev
8231b3cef8 Vector3::round, Vector2::round & Vector2::ceil methods were added.
Now both structs (Vector2 & Vector3) have round, floor & ceil methods.
(see #18603)

(cherry picked from commit 26963473a9)
2018-06-01 18:08:29 +02:00
Adam Cigánek
b95cc40640 Set current SynchronizationContext before the game loop starts
This fixes the problem that `SynchronizationContext.Current` would be null
during the call to `_EnterTree`, `_Ready` and the first call to `_Process` thus
the task continuations would be scheduled outside the main thread, which is unexpected and might lead to crashes.

With this change, task continuations are scheduled always on the main thread and so async/await can be used without any explicit synchronization, which is what is expected.

Fixes #18849

(cherry picked from commit f25240cfe6)
2018-06-01 18:07:32 +02:00
Michele Valente
9294978596 fixes build error on Linux after its introduction in #18949
The function expects now a return value. Returning NULL seems to work in
this case.

(cherry picked from commit 6c74f3de6d)
2018-06-01 18:06:44 +02:00
Ignacio Etcheverry
3d3e4e62af Mono: Project building fixes
- Set (Csc/Vbc/Fsc)ToolExe environment variables to point to the batch files in Mono's bin directory when building with Mono's MSBuild.
- Set Mono's MSBuild as the default build tool on Windows.
- Generate projects with portable DebugType instead of full.

(cherry picked from commit 01397a10d9)
2018-06-01 18:06:42 +02:00
Kelly Thomas
d00926894e mono: add Slerp method to vector classes, expose Cross method for Vector2, and fix unnecessary casts in Basis
(cherry picked from commit b335274bcd)
2018-06-01 18:05:28 +02:00
Carter Anderson
5d2ad1e5c7 Reduce allocations when converting mono arrays to pool arrays
(cherry picked from commit 56262ceafe)
2018-06-01 18:04:54 +02:00
Ignacio Etcheverry
9945da3efc Mono: Improve 'script class not found' error
No longer printed when using using placeholder script instances (for non-tool scripts in the editor).
Print different error if the project assembly is not loaded

(cherry picked from commit c8945fe7d8)
2018-06-01 18:04:12 +02:00
Rémi Verschelde
d1e5677fe6 Travis: Add server build with clang
(cherry picked from commit 1e19e2846d)
2018-06-01 18:02:49 +02:00
geequlim
49ddd7b0e7 Add more IDE created files into .gitignore
(cherry picked from commit d3a6960437)
2018-06-01 18:01:21 +02:00
Max Hilbrunner
e29800ea7b Javascript: Remove weird log
(cherry picked from commit 0c56e011ad)
2018-06-01 18:00:51 +02:00
volzhs
97ad6b813a Make filename clipped on Import dock
(cherry picked from commit 12fb5f58d9)
2018-06-01 18:00:17 +02:00
Bastiaan Olij
77542276f8 Check for 0 roll influence
(cherry picked from commit 660bebec94)
2018-06-01 17:59:15 +02:00
Bastiaan Olij
0a3779135d Improve side impulse calculation
(cherry picked from commit a36e5951ff)
2018-06-01 17:59:11 +02:00
anakimluke
edf423a7aa fixed minor doc wording problem
(cherry picked from commit 4fe2605ab3)
2018-06-01 17:56:56 +02:00
clayjohn
02b1586de2 filled in docs for panorama sky
filled in docs for panorama sky

(cherry picked from commit 1bf7f8fcd1)
2018-06-01 17:56:24 +02:00
clayjohn
a2a136ea02 added documentation for procedural sky
Added documentation for procedural sky

added documentation for procedural sky

added documentation for procedural sky

(cherry picked from commit 6711691d10)
2018-06-01 17:55:54 +02:00
Kelly Thomas
9b8388dab1 [docs] fix links in class docs
(cherry picked from commit 888eefa0fd)
2018-06-01 17:55:13 +02:00
Kelly Thomas
fbad7c2dd9 [docs] fix links in class docs
(cherry picked from commit c6ed46891d)
2018-06-01 17:53:52 +02:00
Chris Bradfield
12fe774844 [DOCS] Update VideoPlayer classref
(cherry picked from commit 393125a6a4)
2018-06-01 17:52:07 +02:00
Max Hilbrunner
8dc021925f [DOCS] Array sort
(cherry picked from commit 9115d84913)
2018-06-01 17:50:56 +02:00
Bastiaan Olij
6843ccf462 Added some quick info on shaders to the docs
(cherry picked from commit b7ae2ca128)
2018-06-01 17:50:29 +02:00
Michael Alexsander Silva Dias
b27352a401 Fixed GroupCallFlags links in the SceneTree's doc.
(cherry picked from commit e10687a520)
2018-06-01 17:49:22 +02:00
Kelly Thomas
8461d6b5f9 Mono: Basis constructor for euler parameter
(cherry picked from commit c26d30986a)
2018-06-01 17:46:38 +02:00
Kelly Thomas
0febfa9eea mono: New Color methods: Darkened, Lightened and ToRgba32
(cherry picked from commit 88bd33f451)
2018-06-01 17:45:49 +02:00
Kelly Thomas
232a3a524b mono: Plane, expose Normal, and D
(cherry picked from commit 16e1b4bacf)
2018-06-01 17:44:56 +02:00
toger5
b04c9a1b66 fixed capital A osx
(cherry picked from commit 6476b708d9)
2018-06-01 17:43:28 +02:00
toger5
dd026c77e3 fixed a input not registered in osx script editor
(cherry picked from commit d927e972d1)
2018-06-01 17:43:14 +02:00
Sherjil Ozair
00bf66d7f2 Add additional macos shortcuts for going to start/end of line
(cherry picked from commit 166c7fdc9d)
2018-06-01 17:43:10 +02:00
Kelly Thomas
6224f02c56 Fix index out of range error in string.Extension()
(cherry picked from commit c7e98eef67)
2018-06-01 17:37:43 +02:00
Rémi Verschelde
31ce9ba07f Fix scons installation on AppVeyor
Seems like AppVeyor just upgraded pip and finally removed the
deprecated --egg switch.

(cherry picked from commit 79e76d8329)
2018-06-01 17:35:29 +02:00
Ignacio Etcheverry
94b4bb2a12 Mono: Fix MonoImage filename being set to an invalid path
(cherry picked from commit 97fb999976)
2018-06-01 17:33:51 +02:00
Dmitry Pupinin
188bfd2ac9 Increase versionCode range 3.0
(cherry picked from commit d71d968987)
2018-06-01 17:33:27 +02:00
Hein-Pieter van Braam
04defcca4f Bump to 3.0.3rc3 2018-06-01 17:27:54 +02:00
Paul Joannon
81eb60434a [mono] fix signals parameter retrieval
(cherry picked from commit 7a72395412)
2018-05-16 12:27:45 +02:00
Hein-Pieter van Braam
6635f2a108 Add back missing method from e10a2e5999 2018-05-14 00:25:34 +02:00
Paul Joannon
1d3be8c453 fix API string path
(cherry picked from commit a35c8bbdc7)
2018-05-13 23:03:48 +02:00
JFonS
4de1d0905a Fix vector reduction in shader language
(cherry picked from commit 5b50685b38)
2018-05-13 23:02:32 +02:00
Karolis K
c461b15720 Fix icon if remote icon load fails
(cherry picked from commit c3e921fba3)
2018-05-13 22:58:13 +02:00
Fabio Alessandrelli
5c93f887ba Implement missing methods in dummy rasterizer
(cherry picked from commit 0cad1417b6)
2018-05-13 22:56:53 +02:00
Leon Krause
9dc5ca0e7c Fix duplicate definitions with FreeType
(cherry picked from commit b8c35b4078)
2018-05-13 22:46:11 +02:00
Chris Bradfield
c7b141d20a [DOCS] Vector2/Vector3/TileMap wording fixes
(cherry picked from commit 8bc4882dd3)
2018-05-13 22:45:08 +02:00
volzhs
0b3b3de2cd Ability to change path color with self modulate
Fix #18164

(cherry picked from commit d77ffa3e97)
2018-05-13 22:43:10 +02:00
Bastiaan Olij
5e551a584e added custom aabb to primitives
(cherry picked from commit 1ee40206d4)
2018-05-13 22:41:29 +02:00
Alexander Holland
fd95935fef hide tab changed debug print
(cherry picked from commit 31f28885f9)
2018-05-13 22:40:28 +02:00
RaphaelHunter
4fbb460a02 Fix:code editor text size should change at least one each time, don't mind how you setting your display scale
(cherry picked from commit eeb0534426)
2018-05-13 22:39:13 +02:00
Michael Alexsander Silva Dias
4aad40d249 Small changes for some strings.
(cherry picked from commit 5b0ddb1354)
2018-05-13 22:37:56 +02:00
Hugo Locurcio
8ccb27ce18 Tweak the property hint ranges of caret blink and line length guideline
This allows for more precise adjustments.

(cherry picked from commit 0eb2f6c223)
2018-05-13 22:36:21 +02:00
Anish
9a0a40042e Adds keywords to autocomplete predictions.
Adds keywords to the autocomplete prediction in GDScript so
they are not replaced by irrelevant predictions.

Fixes: #5972
(cherry picked from commit 6e32157a65)
2018-05-13 22:35:19 +02:00
Unknown
09277c8fd8 LinkButtons are now responsive to engine theme
Fixes #18636, so now LinkButtons (like those in the asset store) will change font colour to remain visible in any engine theme, just like Labels etc

(cherry picked from commit c364a1278e)
2018-05-13 22:34:10 +02:00
Hein-Pieter van Braam
faceb5b75d Implement pull/18665 for 3.0
Windows detect.py: Detect missing WindowsSdkDir
2018-05-13 22:32:01 +02:00
Hein-Pieter van Braam
9dc5ba1aaf Bump version to 3.0.3rc2 2018-05-13 22:28:07 +02:00
robfram
a187fb381e Fix placeholders position in LineEdit when editing inside the Editor
Editing the `Text` property through the editor causes a wrong
placement of the placeholder, as it calls `LineEdit::clear_internal`,
which was wrongly reseting the cached placeholder width.

Fix #18184.

(cherry picked from commit c17de1f70f)
2018-05-13 22:19:42 +02:00
Leon Krause
868c44b239 Fix keyboard focus lock-out with HTML5 canvas in iframe
(cherry picked from commit 9080e96bc8)
2018-05-13 22:17:53 +02:00
Charly Mourglia
10c12b37ec Consider TextEdit paste operation complex.
Not considering a paste operation as a complex one ends up
adding an unneeded extra step when pasting over a selection.

This fixes issue #18325

(cherry picked from commit b09e0454bb)
2018-05-13 22:16:56 +02:00
Brian Richardson
ae32bcf4c3 Fix a crash when trying to run Godot debugger on a release build.
The GDScriptLanguage::enter_function is wrapped in #ifdef DEBUG but the exit_function is not, resulting in a stack underflow error.

(cherry picked from commit 9149b11973)
2018-05-13 22:14:44 +02:00
thfrwn
3491e776dd fix clang6 assignment error
(cherry picked from commit f48ff4dc64)
2018-05-13 22:13:14 +02:00
Ibrahn Sahir
5f632391ca fix for segfault when using CallBasic in visual script on release build
(cherry picked from commit 95dfa5b96d)
2018-05-13 22:11:08 +02:00
Poommetee Ketson
2e61ca6193 Particles: fix corrupted scene when saved after convert (2nd try)
(cherry picked from commit 38865345d9)
2018-05-13 22:08:53 +02:00
Peter Folkins
3013f4cf2b Fix AnimationPlayer edited scene bug
(cherry picked from commit 223f085857)
2018-05-13 22:05:28 +02:00
Peter Folkins
31c4b743cb Fix enums without class name not opening docs page
(cherry picked from commit ccd986f53e)
2018-05-13 22:04:37 +02:00
Felix Yang
78e2e48d57 Fix for Issue#18457 - Folder name with trailing space on Windows
(cherry picked from commit 164dceab28)
2018-05-13 22:03:40 +02:00
Ignacio Etcheverry
736e574a5e Fix editor detecting msbuild with a msvc 'tools only' install
(cherry picked from commit 93d13bee8b)
2018-05-13 22:00:53 +02:00
Ignacio Etcheverry
664052824e Fix MSVC check when building with mono
(cherry picked from commit a1aa98e05a)
2018-05-13 22:00:20 +02:00
RaphaelHunter
0b9f61c9a6 add condition check in Imgae::create(...)
(cherry picked from commit 63e258cc8f)
2018-05-13 21:59:22 +02:00
Hein-Pieter van Braam
41bb321962 For uwp the ARM architecture needs to be in lower case
(cherry picked from commit 07f590046a)
2018-05-13 21:58:37 +02:00
Geequlim
0c030d6e08 Fix double free for drag preview control in viewport
(cherry picked from commit 56c2463f8c)
2018-05-13 21:56:56 +02:00
Pedro J. Estébanez
c8ce9c0080 Fix Variant leak in call_native
(cherry picked from commit 474eda9e30)
2018-05-13 21:55:19 +02:00
DmitryKrutskikh
a519dcd576 Disable 'run' button if any project not selected and tiny refactoring
(cherry picked from commit 965b6ac273)
2018-05-13 21:53:27 +02:00
Leon Krause
66c0be642f Fix relative mouse motion when captured in HTML5 platform
(cherry picked from commit d78b10313b)
2018-05-13 21:52:14 +02:00
Guilherme Felipe
2fa54c1df6 Fix custom cursor disappearing on osx
(cherry picked from commit 48f9e6a05b)
2018-05-13 21:51:25 +02:00
Yaakuro
7f65584f28 Use mimetype according to glTF spec.
(cherry picked from commit 9a50a4442d)
2018-05-13 21:48:37 +02:00
Ruslan Mustakov
7e09206e5c Proper focus in/out handling on iOS
PR #18675 (commit 96301e9) revealed a problem with how iOS lifecycle
callbacks were handled by Godot. Before that PR it was possible to get
NOTIFICATION_WM_FOCUS_IN callback without getting the corresponding
NOTIFICATION_WM_FOCUS_OUT. That commit added a flag to ensure they are
always coupled, but now there is an issue when, for example, you open a
notification panel on iOS without moving the app to background.
It resulted in view.stopAnimation being called without the
corresponding startAnimation when the app moves to foreground again, so
it looked like the game hanged.

I changed focus out notification to be sent in applicationWillResignActive,
because it makes more sense than to do it in applicationDidEnterBackground,
because it is always called in pair with applicationDidBecomeActive, where
focus in is sent. applicationDidEnterBackground may not come under
circumstances that are now described as a comment in code.

(cherry picked from commit 08a924bcee)
2018-05-13 21:46:57 +02:00
Ruslan Mustakov
ecb4c4268c Resume audio on iOS after phone call or alarm
When a phone call or an alarm triggers on iOS, the application receives
an "audio interruption" and it's up to the application to resume
playback when the interruption ends. I added handling for audio
interruptions same as if the game is focused out and then back in.

(cherry picked from commit 96301e934d)
2018-05-13 21:46:53 +02:00
bruvzg
db76c54117 Fix Linux/X11 build on ARMs.
(cherry picked from commit ce64c2a32e)
2018-05-13 21:45:09 +02:00
ShyRed
c2a8eb2081 Use fake audio playing property in editor
It appears that some time ago users were supposed to be able to include the playback of sound effects in their animations by placing keys on the "playing" property. Back then the key frame editor took the value of the checkbox in the property_editor.

Somewhere / Sometime this behaviour changed and the key frame editor is now reading the actual value from the object instead of relying on the property editor.

This commit introduces a fake active field that is returned when reading the playing property in the editor. While the actual active flag is changed when playback is finished the fake one will stay the same thus allowing the user to take their time with setting the key in the animation editor.

(cherry picked from commit bc1522e268)
2018-05-13 21:42:27 +02:00
Hein-Pieter van Braam
5917063192 Merge pull request #18082 from RandomShaper/improve-gui-touch-3.0
Implement universal translation of touch to mouse (3.0)
2018-05-13 21:30:37 +02:00
Hein-Pieter van Braam
bcb38393a5 Merge pull request #18157 from RandomShaper/improve-uri-utils-3.0
Improve/fix URI utils (3.0)
2018-05-13 21:11:42 +02:00
Rémi Verschelde
1905e1c8a2 Android: Increase targetSdkVersion to 27
Matches the change for 2.1 in #18626, and the new requirements from Google
for new apps starting with August 2018 (targetSdkVersion 26 or higher):
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

(cherry picked from commit a6552819b1)
2018-05-08 15:30:11 +02:00
Gustav Lund
a6c9527c2f Fix for large .pck files
An error in unix file IO was causing crashes when getting the size of a file larger than max integer size
As ftell returns a long the fix is trivial

(cherry picked from commit 8a7840a304)
2018-05-08 09:10:26 +02:00
Chris Bradfield
f4c469f1b7 Rewrite Tween class reference.
(cherry picked from commit d7218c742c)
2018-05-08 09:09:04 +02:00
Kelly Thomas
196107cd9e correct documentation for version number data type
(cherry picked from commit 28eb97c8ab)
2018-05-08 09:08:52 +02:00
Mel Collins
33b78c0ad6 [DOCS] Clarify look_at and looking_at
(cherry picked from commit b431264f77)
2018-05-08 09:07:52 +02:00
RameshRavone
fa19d01c7b Fix: JAR files signed with the MD5 algorithm as unsigned
(cherry picked from commit d3182248c4)
2018-05-08 09:06:54 +02:00
Rémi Verschelde
f847837fb2 Update AUTHORS and DONORS list
New contributor added to AUTHORS:
@mysticfall

Thanks to all contributors and donors for making Godot possible!

[ci skip]

(cherry picked from commit bd54ff78d9)
2018-05-04 15:14:16 +02:00
Rémi Verschelde
056348a8c0 i18n: Sync translation templates with current source 2018-05-03 11:25:51 +02:00
Rémi Verschelde
ddbe559c04 i18n: Sync translations with Weblate 2018-05-03 11:20:59 +02:00
Your Name
63e70e3cd1 Bump to 3.0.3-rc1 2018-05-01 22:08:47 +02:00
Robin Hübner
4866733a74 GDNative Unix: fix shared lib loading, dlopen expects leading ./ to interpret as relative path.
(cherry picked from commit 8287441955)
2018-05-01 22:07:02 +02:00
Marcelo Fernandez
01e64eb247 Prevent PulseAudio driver to lock its mutex for too long
(cherry picked from commit cf4371a0ad)
2018-05-01 22:05:20 +02:00
Marcelo Fernandez
4fe0a8efd8 Fixed high cpu usage with PulseAudio
(cherry picked from commit 11078101db)
2018-05-01 22:04:51 +02:00
Max Hilbrunner
0551c5c2cd PCKPacker:pck_start(): Update version
(cherry picked from commit a3aa5ad0d0)
2018-05-01 22:04:08 +02:00
Pedro J. Estébanez
e10a2e5999 Implement universal translation of touch to mouse
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)

The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.

Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.

*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.

On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.

Plus: Improve/fix tracking of current mouse position.
2018-04-30 19:04:35 +02:00
Hein-Pieter van Braam
cd9b0d7cc3 Fix msbuild with a msvc 'tools only' install
Taken from https://github.com/Microsoft/vswhere/wiki/Find-MSBuild
without '-products *' vswhere does not locate msbuild when installing a
tools-only (no IDE) version of the microsoft compilers.

(cherry picked from commit 0ec912a79e)
2018-04-30 12:54:51 +02:00
Hein-Pieter van Braam
8e301c69cb Fix lto builds on clang compilers
This needs to go to master also
2018-04-30 00:52:42 +02:00
Hein-Pieter van Braam
3ee4d6af2e Hand-merge API hash fixes #18514
This hasn't made it into master yet but is important for mono support.
If this turns out to be the wrong call we'll revert and merge whatever
next version of this becomes available.
2018-04-29 20:44:48 +02:00
Ignacio Etcheverry
00c55bb2eb Fix _export_begin not being called when exporting to android
(cherry picked from commit c8884ce3bd)
2018-04-29 18:45:09 +02:00
Ignacio Etcheverry
fe9da69f96 Make 'Export PCK/ZIP' work well with EditorExportPlugin
Add debug flag to the 'Export PCK/ZIP' option
Make 'Export PCK/ZIP' notify when the export process begins. This is necessary to receive the 'EditorExportPlugin::_export_begin' callback

(cherry picked from commit 68b35de2b6)
2018-04-29 18:44:55 +02:00
Ignacio Etcheverry
c358e4c728 Add option to link mono statically on Windows
(cherry picked from commit b5e6e142ef)
2018-04-29 16:16:26 +02:00
Ivan Vodopiviz
7645c539c8 Fix new Node dialog Create button behavior
Added a one-liner to update the Create button disabled state when
selecting an item from the search results list.

Fixes #17265, long live the Realm!

(cherry picked from commit 68a4241131)
2018-04-29 15:14:09 +02:00
Marcelo Fernandez
e7837828f6 Improved error checking at EditorExportPlatformPC::export_project
(cherry picked from commit 0876502f72)
2018-04-29 15:12:21 +02:00
Marcelo Fernandez
272fb05270 Added File.get_path and File.get_path_absolute functions
(cherry picked from commit a4e64c5454)
2018-04-29 15:09:29 +02:00
ShyRed
41f360f9c2 Update preview on filesystem change
Check and recreate a file's preview, if it has changes to it in the filesystem.

(cherry picked from commit 188ccf190b)
2018-04-29 15:08:11 +02:00
Bernhard Liebl
4ce6a8f5f9 Show error icon at "Output" in case of errors
(cherry picked from commit 5120690013)
2018-04-29 15:06:29 +02:00
Bastiaan Olij
dfe6d42a01 A few fixes on the ARVR Server
(cherry picked from commit 5356423377)
2018-04-29 15:05:38 +02:00
Peter Folkins
c20776945d Set default file name for exported projects
(cherry picked from commit bff73bdbf1)
2018-04-29 15:03:45 +02:00
Wilson E. Alvarez
0d6c64b38a Removed unneeded sort from SpriteFramesEditor plugin
(cherry picked from commit bb9c75c5ed)
2018-04-29 15:02:18 +02:00
Leon Krause
c968c787e5 Disable Emscripten assertions in release_debug builds
The messages generated by some assertions can be confusing to users.

(cherry picked from commit d6c9d8d778)
2018-04-29 15:01:29 +02:00
Bernhard Liebl
6e658fdcc1 Warn about WorldEnvironment being ignored
(cherry picked from commit 29d305599d)
2018-04-29 15:00:41 +02:00
Pieter-Jan Briers
aedc4a4e80 Explicitly print an error when --export fails.
Previously this would not explicitly say the export failed.
Sure you might see another error somewhere,
but that's not very reliable/obvious.

(cherry picked from commit 4954982b95)
2018-04-29 14:57:32 +02:00
Wilson E. Alvarez
7417b6adb4 Comment out some debugging messages when playing Theora files
(cherry picked from commit 9590282ae8)
2018-04-29 14:56:52 +02:00
Fabio Alessandrelli
66b36235c9 Fix IPhone and OSX cross compilation
(cherry picked from commit e7b9e2f970)
2018-04-29 14:46:03 +02:00
Rémi Verschelde
e317ab9abe Add --print-fps option to output FPS to stdout
Works both for the editor and games.

Projects can still use "debug/settings/stdout/print_fps" to enable it
permanently. The --print-fps option takes precedence (so works even if
the project setting is disabled). That setting is also no longer redefined
on the fly based on the verbose flag, that was a mess.

(cherry picked from commit 10fa69285c)
2018-04-29 14:44:43 +02:00
Brigham Henry Keys
6a48c552e2 Updated thekla_atlas to support arm64
(cherry picked from commit cd63e699ca)
2018-04-29 14:43:53 +02:00
Craigory V Coppola
a1fd60f7d2 Docs update for several classes
Namely: Dictionary, GraphEdit, Object, TileMap, Script, ScollBar,
ScrollContainer and SplitContainer

(cherry picked from commit 0dd526e062)
2018-04-29 14:42:13 +02:00
HoratioZEDU
b5ecdd8ce8 Fixed (minor) typo in CapsuleShape2D doc page
(cherry picked from commit 2dcd499707)
2018-04-29 14:35:59 +02:00
homer666
20ea59332f [DOCS] Popup.popup_exclusive description
(cherry picked from commit d4ce53b9b1)
2018-04-29 14:35:42 +02:00
krogank9
57b895338b [DOCS] Add note that Pool*Arrays are passed by value (#18340)
(cherry picked from commit 6b797574a2)
2018-04-29 14:33:28 +02:00
Poommetee Ketson
2f82b67071 [DOCS] add HTTPRequest.request return values
(cherry picked from commit f05e24ed18)
2018-04-29 14:32:44 +02:00
bncastle
56b8c4b0eb Add descriptions for GroupCall flags
Add descriptions for GroupCall flags

(cherry picked from commit 7eed3cc199)
2018-04-29 14:32:13 +02:00
Max Hilbrunner
bae5f9feb8 [DOCS] OS
(cherry picked from commit 66714a3d29)
2018-04-29 14:31:56 +02:00
Poommetee Ketson
e95f542204 Add new transform tutorial to appropriate classes
(cherry picked from commit e83af5dfc6)
2018-04-29 14:30:45 +02:00
Denis Washington
e7c42f132c Add Navigation docs
(cherry picked from commit 89b9e8852e)
2018-04-29 14:30:25 +02:00
Denis Washington
1608f04851 Add Navigation2D docs
(cherry picked from commit a7f3933a51)
2018-04-29 14:30:13 +02:00
Max Hilbrunner
93ebac318b [DOCS] SceneTree
(cherry picked from commit bc66869d4c)
2018-04-29 14:29:25 +02:00
Mel Collins
c4d66d087f [DOCS] Tweaks and fixes for (Interpolated)Camera
(cherry picked from commit 99110772c0)
2018-04-29 14:28:58 +02:00
GaryO
feee8ddd3c Add detail to doc for add_surface_from_arrays (#17911)
Includes review comments from #17911 from @cbscribe and @Noshyaar

(cherry picked from commit 06c5a9ed5f)
2018-04-29 14:27:46 +02:00
Michael Alexsander Silva Dias
659df8cbd8 Added missing end points for brief descriptions in the docs.
(cherry picked from commit d912e10c65)
2018-04-29 14:27:30 +02:00
Mel Collins
19a010cc3a [DOCS] Some content for InterpolatedCamera
(cherry picked from commit c05d12384a)
2018-04-29 14:27:15 +02:00
mhilbrunner
307fcb2713 [DOCS] Typo fix for CollisionShape[2D]
(cherry picked from commit 41da122875)
2018-04-29 14:27:01 +02:00
Max Hilbrunner
ec017f4c01 [DOCS] Node & PackedScene (#17833)
* [DOCS] Node: SceneSaver -> PackedScene

* [DOCS] PackedScene: Code example, resolve TODO

(cherry picked from commit 13d5ee01f9)
2018-04-29 14:25:17 +02:00
Pieter-Jan Briers
f12db4013e Improve Input.is_action_just_* docs.
More clarification.

(cherry picked from commit 11aa330a6f)
2018-04-29 14:24:52 +02:00
mhilbrunner
e53f01a7af [DOCS] Node: Networking updates, fix outdated and missing docs
(cherry picked from commit 5a3e841c60)
2018-04-29 14:24:26 +02:00
Max Hilbrunner
46de6afc40 [DOCS] Input
(cherry picked from commit 22cb4a1cf9)
2018-04-29 14:23:23 +02:00
Max Hilbrunner
90bf0b7aec [DOCS] Net.MultiplayerEnet: List returned errors
(cherry picked from commit ec3f5218e8)
2018-04-29 14:23:04 +02:00
Neil Moore
6cdf6d3044 Update Image format enumeration documentation
Provides more information about each image format.

(cherry picked from commit 60f1f58158)
2018-04-29 14:22:40 +02:00
Xavier Cho
1da969736f Remove duplicated declaration of RoundToInt() from Mathf
(cherry picked from commit 9e2e6bb1e2)
2018-04-29 14:15:09 +02:00
Paul Joannon
486f4d2769 [mono] add the 'Facades' subfolder to the searched directories in _preload_hook
(cherry picked from commit 22606a7bec)
2018-04-29 13:54:16 +02:00
Ignacio Etcheverry
199a54d5ac Mono: BindingsGenerator enum fixes
- Make enums have an unique signature name of int. This means that when generating internal methods, there is no difference between different enums types nor between enums and int. This way enums can re-use internal methods.
- Make type resolver fallback to int if a type is not found and it's an enum.

(cherry picked from commit fbc808012f)
2018-04-29 13:49:27 +02:00
Xavier Cho
57c281557a #18051: Fix indentation issues introduced during clean up
(cherry picked from commit 6b611e6431)
2018-04-29 13:40:15 +02:00
Xavier Cho
d330bee1c2 #18051: Do not use var in a for-loop, or where type is not obvious
(cherry picked from commit e59fad3924)
2018-04-29 13:40:09 +02:00
Xavier Cho
72bcacf2b6 #18051: Use common name for Color type argument
(cherry picked from commit 94edd92248)
2018-04-29 13:40:04 +02:00
Xavier Cho
3876a8776e #18051: Remove redundant verbatim prefixes
(cherry picked from commit f0bf5532fa)
2018-04-29 13:39:51 +02:00
Xavier Cho
37ce381e3d #18051: Use default parameter value
(cherry picked from commit 85787776a5)
2018-04-29 13:39:40 +02:00
Xavier Cho
939d50243b #18051: Use array initializer when applicable
(cherry picked from commit b765c051cb)
2018-04-29 13:39:34 +02:00
Xavier Cho
57f18194f5 #18051: Remove redundant parenthesis
(cherry picked from commit 9097c71255)
2018-04-29 13:39:28 +02:00
Xavier Cho
58f2953ddf #18051: Remove unnecessary variable assignments
(cherry picked from commit 93dd59d763)
2018-04-29 13:39:22 +02:00
Xavier Cho
31171ea5a2 #18051: Use 'var' when applicable
(cherry picked from commit fdfc478c88)
2018-04-29 13:39:08 +02:00
Xavier Cho
e7b97af276 #18051: Remove redundant casts and 'using', 'else', 'this' statements
(cherry picked from commit 0ef3e0577b)
2018-04-29 13:38:58 +02:00
Marcelo Fernandez
95004aafb2 Fix use64 used without being initialized
(cherry picked from commit 9b4d23e898)
2018-04-28 23:06:24 +02:00
Ignacio Etcheverry
3f6ea30f8d Mono: Fix '!t' error messages when generating bindings
This error wasn't affecting the bindings generation process.

(cherry picked from commit ff7fe9e771)
2018-04-28 22:59:38 +02:00
Ignacio Etcheverry
58918b629d Mono: Do not spam script class not found error
Print this error only when trying to instantiate the script. This way we prevent errors being printed for source files which are not meant to be used as scripts.

(cherry picked from commit f8ce412560)
2018-04-28 22:59:25 +02:00
Ignacio Etcheverry
736d8db007 Mono: Fix crash on script load if the scripts domain isn't loaded
(cherry picked from commit 89e84185e8)
2018-04-28 22:59:11 +02:00
Pieter-Jan Briers
1e8ff7460a Fixes a typo in the VisualServer.canvas_item_add_set_transform docs.
(cherry picked from commit 09f79cde69)
2018-04-28 22:58:29 +02:00
sersoong
b5425e3d87 Fixed context menu TTR bugs
(cherry picked from commit a1cfc89108)
2018-04-28 22:57:32 +02:00
George Marques
3acd6fb728 Fix names of Variant operators
(cherry picked from commit fefee533ae)
2018-04-28 22:56:33 +02:00
volzhs
94ddb499df Fix error spam with Sprite has compressed texture
Fix #18177

(cherry picked from commit 3ecf8eef37)
2018-04-28 22:54:54 +02:00
volzhs
5a947ebc42 Fix index out of size error on Image
Fix #18229

(cherry picked from commit af0d547c02)
2018-04-28 22:54:44 +02:00
Bojidar Marinov
44f4c8e745 Fix crash resulting from bad month check in core_bind.cpp
Also, make it clear that day is 0-based. This might cause very slight differcies in existing games.
Fixes #18221

(cherry picked from commit 4b9cf93338)
2018-04-28 22:53:02 +02:00
Ruslan Mustakov
4eed7cb9b2 Fix Android input source checks
Input source types are not pure bit flags, they are combinations of
flags, so != 0 check was incorrect and resulted in crashes later, when
trying to obtain the device.

(cherry picked from commit 5dffa506dc)
2018-04-28 22:50:25 +02:00
Michael Alexsander Silva Dias
ca00323e7f Minor fixes for the AnimationPlayer doc.
(cherry picked from commit 9c3698dee2)
2018-04-28 22:48:28 +02:00
Will Vincent
d49fc76ab8 Remove incorrect & potentially confusing references to Euler
e is referred to as Euler’s number, so technically the MATH_EXP description in VisualScript doc was not incorrect, though could potentially lead to confusion.

e is different from Euler’s constant however, making the existing GDScript exp & VisualScriptMathConstant descriptions nvalid.

(cherry picked from commit b6b8c7b215)
2018-04-28 22:47:43 +02:00
ShyRed
d89015cfe3 ItemList selection: Check against item count
ItemList needs to check against the number of items available when the user moves the selection via "ui_right" action.

(cherry picked from commit cbcb96ae85)
2018-04-28 22:43:36 +02:00
Chaosus
826108efec Prevent visibility notification been called twice in object creation
(cherry picked from commit d42b17607e)
2018-04-28 22:38:19 +02:00
Andrea Catania
739c14b07d Fixed wrong function call
(cherry picked from commit df2a626b49)
2018-04-28 22:35:25 +02:00
robfram
7f64090401 LineEdit placeholder alignment, content margins, and overflow bugs
LineEdit doesn't correctly uses style margins nor use placeholders
width correctly, causing multiple rendering bugs.

(cherry picked from commit 53b51f68bf)
2018-04-28 22:30:06 +02:00
Pedro J. Estébanez
3bda257163 Fix theme editor sample widgets
(cherry picked from commit a0626d7d9c)
2018-04-28 22:19:54 +02:00
Pedro J. Estébanez
02f767fe0d Add support for radio-looking items with icon
Letting users of `PopupMenu` use them. `OptionButton` was one of those interested and is updated in this commit.

Fixes #18063.

(cherry picked from commit b964a9e678)
2018-04-28 22:17:08 +02:00
Pedro J. Estébanez
20fa30bde6 Use radio-button-like menu entries where applicable
(cherry picked from commit a6dc160d5c)
2018-04-28 22:16:53 +02:00
Pedro J. Estébanez
b5b0e42b85 Support radio-button entries in ItemListPlugin
(cherry picked from commit bf14a6deff)
2018-04-28 22:16:38 +02:00
Pedro J. Estébanez
a525ea128d Add radio-button-looking entries to PopupMenu
They work exactly the same as current checkbox-decorated items, but in order to preserve compatibility, separate methods are used, like `add_radio_check_item()`. The other option would have been to add a new parameter at the end of `add_check_item()` and the like, but that would have forced callers to provide the defaults manually.

`is_item_checkable()`, `is_item_checked()` and `set_item_checked()` are used regardless the item is set to look as check box or radio button.

Keeping check in the name adds an additional clue about these facts.

Closes #13055.

(cherry picked from commit ab3b1d9f3e)
2018-04-28 22:16:25 +02:00
Andrea Catania
3b57b95efb Fixed area overlap cleaning
(cherry picked from commit 45b778c7f8)
2018-04-28 22:10:29 +02:00
Alexander Alekseev
4002da9603 Fix RigidBody's configuration warning for Z axis
(cherry picked from commit 6a5ed3a42b)
2018-04-28 20:30:34 +02:00
Crazy-P
e5a17617e6 Resolves Inccorect Quaternion Conversion
Fixes https://github.com/godotengine/godot/issues/18025

(cherry picked from commit ae7a9df292)
2018-04-28 20:29:40 +02:00
Pedro J. Estébanez
4e756d61c8 Fix skeleton import from glTF
For some glTF files, the order of bones in the skeleton array wasn't matching the joints array in the meshes.

Fixes #17808.

(cherry picked from commit d8765dd103)
2018-04-28 20:24:43 +02:00
Alexander Alekseev
0f5a3d23ea Update transform buttons in tile editor while using T, A, S shortcuts (fixes #17962)
(cherry picked from commit 0853ac2006)
2018-04-28 20:24:00 +02:00
karroffel
2e31c9fe10 fix bone scale/rotation in AnimationPlayers
fixes #17325.

The bone pose transform was created by setting the rotation and
**then** scaling the transform. This leads to object "deformation"
that's not intended.

(cherry picked from commit 4303fbca5a)
2018-04-28 20:19:35 +02:00
Alexander Alekseev
cf3c1d878d Fix of a possible memory leak: ConcavePolygonShapeBullet::setup was able to exit without releasing the 'shapeInterface' pointer.
(cherry picked from commit b569251110)
2018-04-28 20:18:03 +02:00
Poommetee Ketson
c5dfe6824c Mesh: fix crash when creating mesh outline from QuadMesh
Since create_outline can only make outline for PRIMITIVE_TRIANGLES,
when QuadMesh (which is PRIMITIVE_TRIANGLE_FAN) is used to create
outline, will leave `arrays` empty, and crash when it is being indexed
for "indices" subarray.

This PR shows error when there's only one surface and it is not
TRIANGLES. Also prevent the crash if it has more than one surface
and none of them are TRIANGLES (and any other cases that could leave
`arrays` empty) by checking the size of `arrays` == 8 before indexing
it, since the method seems to expect `arrays` to be of that size.

(cherry picked from commit a492d22952)
2018-04-28 20:16:22 +02:00
Andrea Catania
640063334d physics area added monitorable check
(cherry picked from commit fe768f4f00)
2018-04-28 20:15:24 +02:00
Andrea Catania
ac9e87aae3 Fixed physics server area cleaning
(cherry picked from commit 776942981b)
2018-04-28 20:14:28 +02:00
Andrea Catania
5e09cf3e89 Corrected physics query max result checking
(cherry picked from commit 444b8471a3)
2018-04-28 20:13:28 +02:00
Igors Vaitkus
6989a7ac53 Fix UpdatePowerInfo method implementation in PowerIphone class
(cherry picked from commit 06fab24348)
2018-04-28 20:11:49 +02:00
Tom Dobbelaere
060f9f2cd7 Trigger IO error only after exhausting attempts
(cherry picked from commit a4fae0e5e3)
2018-04-28 20:06:30 +02:00
Benedikt Bär
4c19fc2eb1 Implement missing navgiation polygon debugging in tilemap
(cherry picked from commit 84d60b0829)
2018-04-28 20:03:46 +02:00
Fabio Alessandrelli
5e70e4469a Fix bug in HTML5 HTTPClient.
The URL parameter already has a slash, adding an extra one results in
an invalid resource path

(cherry picked from commit b8c73b195f)
2018-04-28 20:01:35 +02:00
Poommetee Ketson
287f169f2a [Docs] fix typos
(cherry picked from commit a88ee7d920)
2018-04-28 20:00:42 +02:00
Michael Alexsander Silva Dias
60bc0f79a7 Fixed some popups not shrinking their size back when losing items.
(cherry picked from commit 7cbf301f31)
2018-04-28 19:59:37 +02:00
Ruslan Mustakov
c8d0d38cab Add safety checks when handling Android input
It is possible that input comes before the engine is fully initialized.
This fixes the crashes that ocurred when that happens.

(cherry picked from commit 995724b762)
2018-04-28 19:58:00 +02:00
Leon Krause
d3ffc8ad0c Fix engine.js startGame() when loading from directory
(cherry picked from commit 3014e48ec5)
2018-04-28 19:54:29 +02:00
Leon Krause
393e1ef4ee Allow custom path when using engine.js preloadFile() with URL
(cherry picked from commit d373029382)
2018-04-28 19:54:19 +02:00
Leon Krause
78b44eab0a Fix engine.js preloadFile() with directories
(cherry picked from commit 6f1bddf4b5)
2018-04-28 19:54:12 +02:00
Leon Krause
0f6626977b Expose Emscripten libs to engine.js discreetly
(cherry picked from commit 63c7fc6358)
2018-04-28 19:54:00 +02:00
Ben Hickling
71885e5ae4 multiply blend mode fix for spatial materials
(cherry picked from commit 314a419511)
2018-04-28 17:53:53 +02:00
Alessandro
038c4d3a83 Fix all categories unfold when one key binding is changed
(cherry picked from commit eda1e266c8)
2018-04-28 17:52:20 +02:00
bruvzg
de66976ff0 Fix dragging window from non-retina to retina display.
(cherry picked from commit 14597dc2b2)
2018-04-28 17:51:11 +02:00
Benedikt Bär
b08aa6fb3c Fix compressor audio effect sidechain selection
(cherry picked from commit 7792dfe554)
2018-04-28 17:49:39 +02:00
Ivan Vodopiviz
ce944bc3fb Prevented external editor from running multiple times
Fixes #16923. I'm not a fan of the special case for scripts in editor_node.cpp, but in any case,
I made it so it wouldn't make the external editor to re-open just because we switched scenes.

(cherry picked from commit f5147befb6)
2018-04-28 17:47:23 +02:00
Poommetee Ketson
5485939233 [DOCS] minor ParticlesMaterial docs fix Linear -> Radial
(cherry picked from commit 7d18334ad2)
2018-04-28 17:46:34 +02:00
robfram
3cc2eee4e8 Fix crash in canvas_item_add_polyline when passing more points than colors
When `p_points.size() > p_colors.size()`, it crashed with invalid
array access to `p_colors`. Also, when `p_colors` was an empty
`Vector` it crashed due a missing `else` checking the `size`
condition, as the code handling that special case exists.

This PR fixes the missing `else` for `p_colors.size == 0` and,
following the `canvas_item_add_multiline` spirit, it only uses the
first color for the whole polyline if points and colors differ in
size.

Fix #17621.

(cherry picked from commit 8eedb2afe2)
2018-04-28 17:45:25 +02:00
Ruslan Mustakov
56395b03e1 Fix oversampled font artifacts after resize
Font update after resize relies on the viewport size which was updated
after the font was already refreshed, which resulted in artifacts when
it was rendered into the actual/new viewport size.

Fixes #15173.

(cherry picked from commit 47747718d6)
2018-04-28 17:42:57 +02:00
Gilles Roudiere
448d281222 Fixes wrong calculation of gridcontainer's children size
(cherry picked from commit 896e5a64d3)
2018-04-28 17:40:29 +02:00
Pedro J. Estébanez
c07d588e80 Fix listing files inside directory in pack file
When adding a directory path to the inventory of the pack, an empty file name was being added to the file list. That made `Directory.get_ntext()` signal end-of-list too early so that files in a subdirectory were missed.

Fixes #15801.
Helps with #16798.

(cherry picked from commit 536611704a)
2018-04-28 17:35:48 +02:00
Ivan Vodopiviz
52c710f25a Changed debug max distance to avoid overflow
Changed it to roughly sqrt(FLT_MAX), it's a little less to account for float inaccuracies.
Fixes #1835

(cherry picked from commit 55f79f2e80)
2018-04-28 17:32:59 +02:00
Michael Alexsander Silva Dias
29a02a78df Fixed small typo in the "InstancePlaceholder" doc.
(cherry picked from commit 712d6e724a)
2018-04-28 17:31:08 +02:00
robfram
91525e3075 Fix bug added in PR#17589. Resources couldn't be saved to files
This PR fixes the code to avoid saving default environment every time
the project is run whitin the editor.

Should fix #17727. Sorry for the troubles!

(cherry picked from commit 7821b70a00)
2018-04-28 17:22:42 +02:00
robfram
7563c17113 Fix saving unmodified scenes and resources
When `_save_all_scenes` or `save_resource_in_path` was called, they
always saved all the scenes and the resource no matter if they were
modified or not. For example, when `saving before run` option was
checked, it always overwrote the current scene and the default
environment simply by opening and runing the project.

This PR adds checks for unsaved scenes (using the same `unsave` check
others method used) and modified resources (comparing last modified
time and last import time).

Fix #6025.

(cherry picked from commit 28ab60422d)
2018-04-28 17:22:29 +02:00
JFonS
43dcf23990 Hinted shader uniforms can have a default value
(cherry picked from commit 479f531635)
2018-04-28 17:16:07 +02:00
Bernhard Liebl
1182637ec9 Fix debugger_stdout_settings being ignored
(cherry picked from commit 2b728de8f2)
2018-04-28 17:12:41 +02:00
robfram
d40f40e1c9 Fix pressing F3 do both changing to script editor AND find next text
As `KEY_F3` was used both for changing to script editor window and, in
the script editor, for finding the next result in the last search, and
the key event is **not** consumed, the resulting behaviour was similar
to press `F3` twice, first to change to script editor and second to
find the next result of a previous search.

This PR sets the `key_pressed` status of `InputEvent` to `false` if
this event is responsible of an editor change, simulating the
consumption of the event.

Fix #17334

(cherry picked from commit 8939f44f6a)
2018-04-28 17:09:55 +02:00
robfram
fa831f0224 Fix non-valid characters for input_action
Add a new function to check action names, `_validate_action_name`, in
the spirit of `_valprop`. Offending characters include non-printable
ascii, and `\/=:"`. Also set only one text for the UI message.

(cherry picked from commit da6c07698f)
2018-04-28 17:07:20 +02:00
robfram
141e389c3f Fix non working action names containing whitespaces
Now the action name is quoted if it contains spaces. Also, quotation
mark (") is added to the forbidden character list for action names, as
it was also a bug.

Fix #17322

(cherry picked from commit ea94a82596)
2018-04-28 17:04:20 +02:00
Poommetee Ketson
72350eebb2 ScriptTextEditor: fix capitalize offset
(cherry picked from commit caa0d513ab)
2018-04-28 16:45:17 +02:00
Jorn Van denbussche
80fbea28fb Fixes importing hdr files with extra header info
(cherry picked from commit 886156da2c)
2018-04-28 16:42:27 +02:00
Hein-Pieter van Braam
7ec8a6e756 Fix converting a tilset if the existing file is not a tileset
See ed3b080ca6
2018-04-28 16:40:31 +02:00
Poommetee Ketson
ddb31e9c5a EditorNode: fix clicking ok keeps trying to save
(cherry picked from commit e12e6cacdb)
2018-04-28 16:29:58 +02:00
Bernhard Liebl
dc97f91a18 Fix column width on AutoLoad table on hidpi displays
(cherry picked from commit f494d5ac5c)
2018-04-28 16:28:47 +02:00
ShyRed
171542d96a Update TileMap when its TileSet changes
Make TileMap monitor its TileSet for changes and emit a signal when the TileSet changes. This makes the editor update and show the updated version of the TileSet.

(cherry picked from commit 67f4944a21)
2018-04-28 16:25:33 +02:00
robfram
b855bc44ae Implement line clipping for TextureProgress to avoid bad rendering due to imprecise UV mapping
Original code used a quick aproximation for simulating the
correspondent texel in the `TextureProgress` texture as radial
progress indicator. This lead to visualization errors. Changed it for
a Liang-Barsky line clipping algorithm stripped to its minimum for
this specific use case.

Fix #17364.

(cherry picked from commit 7991bd168d)
2018-04-28 16:19:52 +02:00
ShyRed
c39e32ae60 Update Sprite when Texture changes
Make Sprite monitor its Texture for changes and trigger an update when the sprite changes.

(cherry picked from commit a23c0877f1)
2018-04-28 16:13:28 +02:00
Bernhard Liebl
5eef26b64e Fix broken hover/select coloring of keys in animation editor
(cherry picked from commit 172aa6c61e)
2018-04-28 16:07:03 +02:00
Pieter-Jan Briers
0d2a2a9300 Fixes canvas light shaders.
Fixes #16904

Restore more out functionality, fix built-ins.

Requested changes, I think?

(cherry picked from commit 25ba49fd88)
2018-04-28 16:03:23 +02:00
Bernhard Liebl
6d767b0f9a AnimationPlayer: fix scrubbing after play backwards
(cherry picked from commit b553b38e7b)
2018-04-28 15:55:36 +02:00
robfram
d49579b038 Fix overwriting all common properties when using Change Type tool
If you change the type of an existing node, it checks if you have
modified the initial value of their properties before overwriting
their values in the new node.

For example, if you created a `Label` and changed it to
`LineEdit`, the `mouse_filter` property was created as `Ignore`
for the original `Label` node, and was maintained after changing
it to `LineEdit` causing not to work as expected. Now it checks if
`Ignore` is the default value for `Label` nodes, and as it is, the
property value is left unchanged, maintaining the default value
for `LineEdit`, which is `Stop`.

Fix #13955 and alike.

(cherry picked from commit 8ea4ea0d53)
2018-04-28 15:47:57 +02:00
Poommetee Ketson
a3ba1b0280 Fix script template on _ready behavior
(cherry picked from commit 01ec06d9ae)
2018-04-15 01:18:49 +02:00
Marcelo Fernandez
c2e02e2066 Added error checks for fscache saving
(cherry picked from commit 06e537fec5)
2018-04-15 01:17:01 +02:00
Chaosus
3503ee4be6 Fix invalid mix function overload
(cherry picked from commit 97bef8d908)
2018-04-15 01:13:38 +02:00
Bernhard Liebl
069b429795 AnimationPlayer: fix popups close on double click
(cherry picked from commit 6d51b6ab42)
2018-04-15 01:08:45 +02:00
Saracen
2f7aa6c2aa Make the shader token names consistent.
(cherry picked from commit b095e21d91)
2018-04-15 01:07:37 +02:00
Chaosus
a29680c25a [Mono] Improve Mathf
(cherry picked from commit 655a4e6540)
2018-04-15 00:57:14 +02:00
Alexander Alekseev
3a430e46b9 [mono] Fixes #17936 as GodotSharp (Core\Basic.cs) requires C#7 now, but we most probably should keep C#6 yet
(cherry picked from commit 5677aed175)
2018-04-15 00:56:14 +02:00
Nikodem Lokatelj
b4733a1da9 Fixed _issue_activated to take the correct issue id from the list
(cherry picked from commit 4fdee1d9f1)
2018-04-15 00:55:25 +02:00
Wilson E. Alvarez
8ebd4bb874 Move GodotSharp and MonoBuildTab member variables to initializer list
(cherry picked from commit 3f86fefb64)
2018-04-15 00:54:00 +02:00
Chaosus
63a88c69ac Added wrap functions to C#
(cherry picked from commit d52722c6da)
2018-04-15 00:52:29 +02:00
Ignacio Etcheverry
bfc94dd4c9 Mono: Runtime main args and assembly search fixes
- Setup runtime main args during initialization. This must be done manually by embedders who do not call mono_runtime_run_main. Fixes NullReferenceException in System.Environment.
- Continue to search the assembly in the rest of the search locations if loading it from one of them failed.

(cherry picked from commit fa1d656af4)
2018-04-15 00:48:15 +02:00
Andreas Haas
6472d8c7d4 Mono: Avoid invalid class names.
Disallow reserved keywords as class names and prefix base class with the Godot
namespace if it's the same as the class name.

Fixes #12483

(cherry picked from commit 700d07cf7c)
2018-04-15 00:48:11 +02:00
Hein-Pieter van Braam
e4fadebc3b Fix a merge error 2018-04-15 00:43:26 +02:00
Ignacio Etcheverry
548ec63f76 EditorExport: Allow export plugins to add shared libraries
(cherry picked from commit a38b59b656)
2018-04-15 00:04:18 +02:00
Ignacio Etcheverry
9e4d34aebb Mono: Add project export plugin
(cherry picked from commit 9fd606c549)
2018-04-15 00:04:14 +02:00
Paul Joannon
d02c891a4b [mono] write classes with no constructor as abstract
(cherry picked from commit ef5672d3f9)
2018-04-14 23:54:11 +02:00
Paul Joannon
3bd414786c [mono] rename functions to conform to PascalCase
in:
* StringExtensions.cs
* Transform.cs

(cherry picked from commit d7020aef8d)
2018-04-14 23:53:56 +02:00
Carter Anderson
c7adcc8dca Fix mono basis GetEuler bug and marshalling/unmarshalling
(cherry picked from commit 91f271fa9e)
2018-04-14 23:20:33 +02:00
Aaron Franke
577f3ccaf9 Replace float with real_t, default Vectors, other misc C# improvements
Replace float with real_t in most files, defined at the top of each file via using. Objects such as Vector3 now accept doubles as inputs, and convert to real_t internally. I've added default Vectors such as Vector3.Zero. Other misc C# improvements such as Mathf.RoundToInt(). Color continues to use float only because high precision is not needed for 8-bit color math and to keep things simple. Everything seems to compile and work fine, but testing is requested, as this is the first time I've ever contributed to Godot.

(cherry picked from commit ff97c97c93)
2018-04-14 23:20:03 +02:00
robfram
bffd4f0548 Fix bad autocomplete of partially written node paths when using syntactic sugar notation ($)
If you had a tree like Node2D->Sprite->Camera2D and you write a
code like $Node2D/Spr and chose the autocompletion sugested
Node2D/Sprite, the resulting string was $Node2D/Node2D/Sprite
instead $Node2D/Sprite. If you chose Node2D/Sprite/Camera2D, then
you ended with $Node2D/Node2D/Sprite/Camera2D.

Fix #15813.

(cherry picked from commit 95f186b621)
2018-04-14 23:14:30 +02:00
Hugo Locurcio
4c8c383876 Update Hack font to v3.003
(cherry picked from commit 93f52813bf)
2018-04-14 23:11:18 +02:00
Marcelo Fernandez
125b403c0f WASAPI driver will now resample when the device rate != audio/mix_rate
(cherry picked from commit d21a2019f1)
2018-04-14 22:07:30 +02:00
Marcelo Fernandez
5f5ec7e162 WASAPI audio driver compile fix on mingw
(cherry picked from commit 3316a64e12)
2018-04-14 22:03:10 +02:00
Marcelo Fernandez
a91d9cb918 Fix possible crash when audio channels change
(cherry picked from commit 87ebdd6041)
2018-04-14 21:47:05 +02:00
Marcelo Fernandez
a7ea441504 Fix PulseAudio problems with 8 channels devices
(cherry picked from commit 34395c6a38)
2018-04-14 21:46:11 +02:00
Marcelo Fernandez
4b5472b100 Fix error detecting for PulseAudio pa_stream_new call
(cherry picked from commit 86e101ec82)
2018-04-14 21:46:06 +02:00
Rémi Verschelde
3dc4447cb8 CoreAudio: Fix iphone build after audio device refactor (#17742)
(cherry picked from commit e955fbc36e)
2018-04-14 21:44:57 +02:00
Marcelo Fernandez
9a21f964ba Added new audio device functions to set/get the audio device
(cherry picked from commit ecc1b34cbc)
2018-04-14 21:42:44 +02:00
Marcelo Fernandez
1f07f71b6c Fix PulseAudio driver for audio devices that report unknown number of channels
(cherry picked from commit 11fbfab7ec)
2018-04-14 21:38:26 +02:00
Alexander Holland
259b9664ef auto-completion edge jump
arrow up/down jumps to end/start on edges

(cherry picked from commit e36dd4282b)
2018-04-14 21:29:48 +02:00
Leon Krause
b5a55810c5 Disable FreeType SIMD in HTML5 builds
SIMD is currently unsupported in WebAssembly.

(cherry picked from commit 315983c90d)
2018-04-14 21:15:37 +02:00
robfram
4fc6256010 Change shebang of pre-commit-clang-format hook to make it portable
The default one is "#!/bin/bash", but BSD systems doesn't have bash
in that path. For portability reasons, it should be changed to
"#!/usr/bin/env bash".

More info: https://en.wikipedia.org/wiki/Shebang_%28Unix%29#Portability

(cherry picked from commit 52abf4ba84)
2018-04-14 20:59:39 +02:00
bruvzg
ce1b62a01f Explicitly set OpenGL profile to core (X11, Windows).
Enable GLES2 on Windows.

(cherry picked from commit ad67911f1a)
2018-04-14 20:56:49 +02:00
Emanuele Fornara
28d4271e3e skip demo download prompt if ssl is unavailable
(cherry picked from commit 0071c04dcb)
2018-04-14 20:44:54 +02:00
Lars Kokemohr
30b5265417 completed-signal is emitted by all GDScriptFunctionStates of a coroutine now, allowing to yield for completion of a function with more than one yield inside.
(cherry picked from commit 3dfef37628)
2018-04-14 20:42:44 +02:00
poke1024
2f53325bed Fix round preview getting square on "run scene" (issue 16734)
(cherry picked from commit 899f7b125e)
2018-04-14 20:37:54 +02:00
Andreas Loew
7ad6a9aeea Fix selection of Sprites using AtlasTexture in the editor.
Fixes #16261.

(cherry picked from commit a01ba4523b)
2018-04-14 20:30:51 +02:00
Marcelo Fernandez
8018dc6599 Fix for a possible crash when a custom theme is not loaded properly
(cherry picked from commit 2f1429eb24)
2018-04-14 20:28:13 +02:00
Ranoller
aaed3ef5ed FIX Windows enter/exit mouse notifications
Fix to this issue #17202

(cherry picked from commit 979dccbd8d)
2018-04-14 20:25:57 +02:00
Ruslan Mustakov
99cf2ffb19 iPhone X support and iOS-related fixes
Starting from April 2018 Apple no longer accepts apps that do not
support iPhone X. For games this mainly means respecting the safe area,
unobstructed by notch and virtual home button. UI controls must be
placed within the safe area so that users can interact with them.

This commit:

- Adds OS::get_window_safe_area method that returns unobscured area of
  the window, where interactive controls should be rendered.

- Reorganizes how launch screens are exported - the previous way was
  incorrect and modern iPhones did not pick up the correct screens and
  because of that used a non-native resolution to render the game.

- Adds launch screen options for iPhone X.

- Makes launch screens optional in the export template. If not
  specified, a white screen will be used.

- Adds App Store icon (1024x1024) export option as it now has to be
  bundled with the app instead of being provided in iTunes Connect.

- Fixes crash when launching games in iOS Simulator. It happened because
  controllerWasConnected callback came before the engine was
  initialized. Now in such case the controllers will be queued up and
  registered after initialization is done.

- Fixes issue with the virtual keyboard where for some reason
  autocorrection panel would intersect with the keyboard itself and not
  allow you to use the top row of the keyboard. This is fixed by
  disabling autocorrection altogether.

Closes #17358. Fixes #17428. Fixes #17331.

(cherry picked from commit 1d9a3a9b1c)
2018-04-14 20:17:47 +02:00
Poommetee Ketson
3b200c55b6 GridMap: fix next/prev plane text, fix meta not found
(cherry picked from commit 89323f94bb)
2018-04-14 20:10:02 +02:00
Geoffrey
13e9b605cf Moves the md5sum's from the <filename>.import file into .import/<filename>.md5
Saves asset md5sum's in a file that doesn't contain data that needs to be VC'd
Now saves the md5s to a different file (.import.md5)

Now reads the md5's from a separate file

Now uses a file in the .import folder to store md5s

(cherry picked from commit 030b59502f)
2018-04-14 19:57:45 +02:00
Geoffrey
5d7b7f798a Made print_tree_pretty() function which displays scene tree graphically
(cherry picked from commit 8362ce4769)
2018-04-14 19:56:55 +02:00
Ruslan Mustakov
710b57d493 Make BaseButton not emit press when container is scrolled
This fixes the problem described in #13996 in a proper way.

This also adds "deadzone" property to ScrollContainer. It can be used
on mobile, where taps are not as precise as mouse clicks. Player could
slightly move their finger when tapping, in which case we still want
the button to be pressed rather than the container to be scrolled.

(cherry picked from commit dcf5be92a3)
2018-04-14 19:36:10 +02:00
Rado'sPC\aRaGaR
ef44ed93a7 For-in loop variable added to autocompletion
Fix for #16494

(cherry picked from commit f97ebdcab3)
2018-04-14 19:19:47 +02:00
Pedro J. Estébanez
4f0b5f7307 Implement always-on-top for MacOS
Courtesy of @bruvzg.

(cherry picked from commit 2e8c7824c0)
2018-04-14 19:04:13 +02:00
Pedro J. Estébanez
1c25e50490 Add new window setting: always on top
Implemented for Windows and Linux.

(cherry picked from commit ee2c31d306)
2018-04-14 19:03:53 +02:00
Pedro J. Estébanez
a9ec1e3913 Fix buggy http-encoding
(cherry picked from commit 1fc85b87bd)

The original commit's message said "percent-encoding" because it was fixing the same code under a different method name. That rename was reverted but the fix was and is still relevant.
2018-04-12 21:22:46 +02:00
Pedro J. Estébanez
46101928bd Enhance HTTPClient.query_string_from_dict()
(cherry picked from commit 8d8e9d54c8)
2018-04-12 21:20:10 +02:00
Rémi Verschelde
74e72c995d Update AUTHORS and DONORS list
New contributor added to AUTHORS:
@robfram

Thanks to all contributors and donors! :)

[ci skip]

(cherry picked from commit e6e911eb2b)
2018-04-06 21:46:45 +02:00
Gilles Roudiere
b6f30f1b5b Fixes infinite loop in GridContainer
(cherry picked from commit 44cb8eb3a2)
2018-03-29 00:41:03 +02:00
volzhs
b09d06fcf7 Fix getting Android device information
Fix #17644

(cherry picked from commit 4e378aeeb8)
2018-03-29 00:34:31 +02:00
Wilson E. Alvarez
9567297a66 Fixed several leaks in VisualServerScene, RasterizerSceneGLES3 and RasterizerGLES3
(cherry picked from commit e9ac87390c)
2018-03-29 00:29:06 +02:00
Bojidar Marinov
607884139c Fix a potential bug hinted by clang
(cherry picked from commit 4d81e8afe6)
2018-03-29 00:27:46 +02:00
Wilson E. Alvarez
42f351db0d Fixed leak in BulletPhysicsServer
(cherry picked from commit e5ae9750ed)
2018-03-29 00:24:09 +02:00
Rémi Verschelde
9ab9dd73b0 SCons: Fix running 'scons' without platform argument
The cache and progress logic assumed the 'env' to be defined,
but it is only when the selected platform is in the supported list.

Fixes #17497.

(cherry picked from commit a44f9ca545)
2018-03-29 00:21:41 +02:00
Xavier Sellier
fa9e03996c Prevent android to split-screen
(cherry picked from commit 61e8f8a866)
2018-03-29 00:19:49 +02:00
Marcelo Fernandez
814b610ed3 Fix for clang warning at distance_to
(cherry picked from commit bbd21c2203)
2018-03-29 00:15:24 +02:00
Leon Krause
a5ccaa919e Prevent division by zero in GridContainer
(cherry picked from commit 38623e07ac)
2018-03-29 00:12:35 +02:00
robfram
5042d0c30a Fix silent failure of importing OGG Vorbis files
When importing non-valid OGG Vorbis audio files, now the filesystem
navigation tree shows the correct sad red-face icon, as it does with
non-valid PNG, JPG or WAV files.

Fix #9793.

(cherry picked from commit a8d37de461)
2018-03-29 00:11:46 +02:00
ShyRed
27f5e404a7 Update libwebm
Update of libwebm.

Up-to-date version of libwebm contains several bugfixes that allow playback of files that would crash Godot otherwise.

(cherry picked from commit e71f109910)
2018-03-29 00:06:05 +02:00
Pedro J. Estébanez
2e9c9f7d74 Fix animation length from glTF not correctly set
(cherry picked from commit 1f26da0ad1)
2018-03-29 00:04:15 +02:00
Pedro J. Estébanez
6063e74e06 Fix glTF not accepting VEC3 colors
Aside from the colors themselves, the rejection was adding somes issues later in the mesh import process.

(cherry picked from commit adbe749513)
2018-03-29 00:04:10 +02:00
bncastle
449e75455b Fix BaseButton not always calling _pressed()
Fix "ui_accept" action in BaseButton.cpp not calling _pressed() func in
GDScript

(cherry picked from commit ceb079fa35)
2018-03-28 23:55:58 +02:00
Bernhard Liebl
73cc3a96c0 Fix uninitialized data in Sprite::_get_rects()
(cherry picked from commit 5f917139ab)
2018-03-28 23:54:10 +02:00
Andrew Dunai
683511310e Fix garbage in string padding.
(cherry picked from commit 0269e366f1)
2018-03-28 23:51:31 +02:00
Felix Yang
12336dc253 Added a check for trailing dot when creating folder.
Merge the trailing dot test into existing test. Removed OS test.

(cherry picked from commit 96f61b2d65)
2018-03-28 23:50:29 +02:00
Pedro J. Estébanez
8da76f3bb8 Fix wrong SSL handshake
The name of the remote host is passed to mbed TLS in all cases so the client hello message is correctly formed.

(cherry picked from commit 602da6fa4f)
2018-03-28 23:49:00 +02:00
Marcelo Fernandez
8289f8628d Modify OSX can_export logic to match the logic from EditorExportPlatformPC::can_export
(cherry picked from commit a42dfd7882)
2018-03-28 23:47:22 +02:00
Gary Oberbrunner
91bc845152 Fix infinite loop in GridContainer layout
I had a grid container and tried to set rect.min_height larger in the
editor; that caused an infinite loop in GridContainer::_notification
at line 118. The reason is max_index was being set to the *height* of
the row, not the *index* of the row. So later when it tried to erase
that row and try again, there was nothing to erase.
I applied the same fix to the width code.

(cherry picked from commit 561e57df13)
2018-03-28 23:45:39 +02:00
bruvzg
d8a0b6ba63 Hack to force macOS window activation for non-bundled app.
(cherry picked from commit 506e17ee70)
2018-03-28 23:39:16 +02:00
Poommetee Ketson
bf4d8ee69c EditorAudioBus: expand effects list
(cherry picked from commit 555a8c0b8d)
2018-03-28 23:36:58 +02:00
Blazej Floch
2c93def09d Add "Show Origin" and "Show Viewport" options to 2D Editor Viewport
(cherry picked from commit 934498d37a)
2018-03-28 23:33:03 +02:00
Andreas Haas
9cbcff4e91 ScriptEditor: Use EditorSettings instead of hardcoded values in constructor.
(cherry picked from commit 1cfc43421e)
2018-03-28 23:13:46 +02:00
Marcelo Fernandez
985b84689f Support for uneven amount of channels on PulseAudio
(cherry picked from commit 00693f4ad0)
2018-03-28 23:05:23 +02:00
Nicolas Silva
89e4125241 Use GL_LINE_STRIP instead of GL_LINES when drawing polylines.
(cherry picked from commit 20cab06f9a)
2018-03-28 23:01:09 +02:00
Hugo Locurcio
209acbaac7 Add documentation for the DynamicFont hinting property
(cherry picked from commit a0ddd6122c)
2018-03-28 22:56:29 +02:00
Hugo Locurcio
8a0966a8cb Add an hinting mode setting to DynamicFonts
- Editor font hinting can now be tweaked in the Editor Settings.
- DynamicFonts used in projects now have tweakable hinting settings
  in their DynamicFontData child. Changes will be visible upon
  reloading the scene in the editor.

(cherry picked from commit c1544c12ef)
2018-03-28 22:56:04 +02:00
MrCdK
99331ca395 Added pitch scale property to AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D
(cherry picked from commit 5bc010e8ee)
2018-03-28 22:43:44 +02:00
Unknown
ec362d54a9 Fix Automatic switch to viewport when playing a scene #16357
(cherry picked from commit d002b7d24a)
2018-03-28 22:41:06 +02:00
MrCdK
5e8e2a8730 AudioServer emit bus_layout_changed signal when adding, moving or deleting a bus
(cherry picked from commit 56dcf4b983)
2018-03-28 22:34:43 +02:00
bruvzg
df7d60a9d3 Abort compilation on missing return values (CGG/clang)
(cherry picked from commit 5ec09455ed)
2018-03-28 22:21:33 +02:00
J Andrew Long
fe20a1e35b add restore purchases for iOS
(cherry picked from commit da652c1539)
2018-03-28 22:16:07 +02:00
Poommetee Ketson
55a66efa38 Fix get_drive (bookmarks) in linux not working
(cherry picked from commit 7e5b10b7d3)
2018-03-28 22:13:39 +02:00
geequlim
5eebe51014 Fix builtin script cannot open from debug stacks
(cherry picked from commit 095e2bcc26)
2018-03-28 22:12:31 +02:00
geequlim
9febb6f747 Don't print error message when select debugger stacks if the debugger is stopped.
Clear debugger stack inspector if the debugger is stopped when selected stack changed.

(cherry picked from commit cfde737478)
2018-03-28 22:09:16 +02:00
volzhs
626525d23a Draw relationship line on scene tree dock if option is on
(cherry picked from commit 36aa62802a)
2018-03-28 22:06:01 +02:00
JFonS
a026e2626c Fix weird editor crash when switching from editing one gradient to another keeps 'grabbing' variable to true
(cherry picked from commit f68594a525)
2018-03-28 22:01:19 +02:00
Marc Gilleron
cf2e30b30c Fix Line2D tile mode for non-square textures
(cherry picked from commit d2fae5c9a6)
2018-03-28 21:33:49 +02:00
poke1024
f7efa9d43a Fix line thickness for CollisionPolygon2D.
(cherry picked from commit a36f6e5386)
2018-03-28 21:23:42 +02:00
poke1024
dfb739aff0 Fix grid mesh tile panning bug (issue 16524)
Fix basic function and interference of touch pad pan with mesh tile delete (shift + right click on touch pad) in grid map editor (fix 16524)

(cherry picked from commit b90810ce8e)
2018-03-28 21:11:38 +02:00
Fabio Alessandrelli
89bff17cd2 More threading in AssetLib
AssetLib now uses thread as requested to download previews and items

(cherry picked from commit 3a25415a1c)
2018-03-28 21:03:56 +02:00
Poommetee Ketson
3e1716b2c3 GridMapEditorPlgn: fix a leak
(cherry picked from commit 5cf331588a)
2018-03-28 21:02:51 +02:00
Hein-Pieter van Braam
e6200de73a Bump version to 3.0.3-devel
And onwards!
2018-03-18 02:38:31 +01:00
Rémi Verschelde
593e616a48 Dist: Fix Linux desktop file launch argument
(cherry picked from commit a55e2f2dac)
2018-03-14 12:06:18 +01:00
Rémi Verschelde
eeb7385f02 SCons: Fix linking system pcre2 on server platform
Fixes #17245.

(cherry picked from commit e619727e99)
2018-03-04 13:47:35 +01:00
Hein-Pieter van Braam
2ff3b08583 Bump to 3.0.2-stable
Thanks to all of our contributors!
2018-03-03 15:22:04 +01:00
Hein-Pieter van Braam
6ab8fb04af Fix documentation indentation for apply_torqe_impulse 2018-03-03 15:19:40 +01:00
Hein-Pieter van Braam
498d177cfe Update changelog for 3.0.2 2018-03-03 15:12:41 +01:00
Chaosus
06a60bb6ef Fix floatBitsToUint function
(cherry picked from commit c6b6af7bb5)
2018-03-03 14:54:52 +01:00
Rémi Verschelde
c0132f30c4 Viewport: Fix missing tooltips w/ disabled physics object picking
Previously this option seemed to be the sole responsible for enabling
physics processing in Viewport, while several other features like
tooltips and debugging collision hints rely on it.

All this logic is moved to internal processing (it's incorrect to let
it be affected by users disabling physics/idle processing), and disabling
physics object picking no longer affects the internal physics processing.

Fixes #17001.

(cherry picked from commit ce7da2c7d6)
2018-03-03 14:19:57 +01:00
Max Hilbrunner
649cb70ddb [DOCS] Small fix to Area: Fix copy/paste errors
(cherry picked from commit fdd0f18959)
2018-03-03 11:00:41 +01:00
Rémi Verschelde
65d214d3da i18n: Sync translation templates with current source 2018-03-03 10:58:19 +01:00
Rémi Verschelde
9ee98e999b i18n: Sync translations with Weblate
(cherry picked from commit 7c7d3efb5b)
2018-03-03 10:56:41 +01:00
Max Hilbrunner
5bcc7f88b6 [DOCS] Small fix to PinJoint2D
(cherry picked from commit 0b65bac1a1)
2018-03-03 01:55:33 +01:00
Max Hilbrunner
93e99846b0 [DOCS] NetworkedMultiplayerENet
(cherry picked from commit 5aae17a6fb)
2018-03-03 01:55:27 +01:00
Rhody Lugo
5c2e554853 prune cache only at the start and end of build
(cherry picked from commit 29e6ec6594)
2018-03-03 01:53:22 +01:00
Poommetee Ketson
c4468aef5d s/Camear/Camera in docs
(cherry picked from commit b099a500eb)
2018-03-03 01:52:12 +01:00
Bernhard Liebl
f967334f53 Fix more regressions in RichTextLabel from PR 15711
(cherry picked from commit 0e1e95c41f)
2018-03-03 01:47:52 +01:00
Rémi Verschelde
4132f2ea7e Update AUTHORS and DONORS list
New contributors added as AUTHORS:
@mrcdk, @binbitten, @paulloz, @PJB3005

New Gold sponsor: Skirmish <https://skirmish.io>

Thanks and welcome! :)

[ci skip]

(cherry picked from commit 741af0652d)
2018-03-02 19:48:12 +01:00
Rémi Verschelde
262c97098d Fix serialization of identifiers with non printable ASCII characters
Fixes #6888.

(cherry picked from commit ab001d830b)
2018-03-02 14:54:45 +01:00
Hein-Pieter van Braam
cee20e24bd Don't crash when trying to add an invalid navmesh
It is possible to try to add an invalid object as a navmesh through
GDScript which results in an engine crash. This creates a debug message
that should help the user figure out what's wrong.

(cherry picked from commit 555eebf3f4)
2018-03-02 12:06:46 +01:00
Rémi Verschelde
87476c057a NativeScript: Fix initialization in wrong scope
Regression from d702d7b335 which broke javascript build.

(cherry picked from commit 08cadc3d87)
2018-03-02 02:08:50 +01:00
Hein-Pieter van Braam
53693e393d Revert "Make KEY_ESCAPE close all output/debugger docks on bottom"
This reverts commit c04d868476.

This caused a regression when trying to close the typing suggestion.
Reverting this for now until a better implementation for this behavior
gets made.
2018-03-01 23:06:26 +01:00
Anish
3f7e036c4f Godot now allows built-in irrespective of the filepath.
Since the file in the filepath is irrelevant when setting the file
as built-in, changes have been made to allow setting to built-in
even if the file in the path exists.

Fixes #16425

(cherry picked from commit 1fdb8251d2)
2018-03-01 21:38:15 +01:00
Poommetee Ketson
0aab429453 AnimationEditor: fix time indicator offset
(cherry picked from commit acf54f8bdc)
2018-03-01 21:18:58 +01:00
Marcelo Fernandez
61fd30c00e Fixed Windows ignoring minimized/maximized status set by user
(cherry picked from commit f8da9550f4)
2018-03-01 21:15:35 +01:00
Fabio Alessandrelli
44b206a3fa Fix server build on FreeBSD
(cherry picked from commit 8f9914bd94)
2018-03-01 21:12:28 +01:00
Hein-Pieter van Braam
675899a521 Fix various valgrind reported uninitialized variable uses
(cherry picked from commit d702d7b335)
2018-03-01 21:06:31 +01:00
Ruslan Mustakov
61a9ef5d81 Fix intermittent audio driver crash during startup on Android
set_pause can be called before the driver is initialized, and there
already is a check for that. The problem is that the 'active' field
was not initialied in the constructor, which lead to it having an
undefined value.

(cherry picked from commit c10749d51f)
2018-03-01 21:05:15 +01:00
Nicolas Silva
9c27e4d885 Allow degenerate triangles in polygon triangulation when necessary.
(cherry picked from commit e73266a51c)
2018-03-01 20:18:08 +01:00
poke1024
c800653c6f Fix regression through fa98637aca
(cherry picked from commit 89f607604e)
2018-03-01 19:19:29 +01:00
Hein-Pieter van Braam
3e931e258c More reliably find mscorlib.dll on Linux
(cherry picked from commit c094e90b25)
2018-02-27 22:12:01 +01:00
Hein-Pieter van Braam
7e5a374825 Deprecate a typo for a new method introduced in 3.0.1 2018-02-27 17:53:46 +01:00
Hein-Pieter van Braam
a850ebf352 Revert "fix spurious error messages during autocomplete and validate"
This reverts commit b7faa76485.

This causes a regression in 3.0.1. We haven't found a proper fix yet so
we're removing this from 3.0.2
2018-02-27 17:52:18 +01:00
Hein-Pieter van Braam
4e1d19b20c Revert "[Mono] Basis values now marshalled in the correct order."
This reverts commit 9173819b71.

The fixes for these issues aren't quite baked yet. Taking them out of
3.0.2
2018-02-27 17:52:18 +01:00
Hein-Pieter van Braam
d7430ef077 Revert "The marshalling in was also incorrect."
This reverts commit b6f958965b.

The fixes for these issues aren't quite baked yet. Taking them out of
3.0.2
2018-02-27 17:52:18 +01:00
Poommetee Ketson
17408bea9c (Magnify|Pan)Gesture: implement as_text
(cherry picked from commit 67e20dc2b6)
2018-02-27 17:52:18 +01:00
Rémi Verschelde
2c55064708 doc: Sync with current source 2018-02-27 13:57:29 +01:00
Rémi Verschelde
42e82b9377 doc: Update version string for 3.0.2 2018-02-27 13:57:10 +01:00
Rémi Verschelde
a4b077a0ba Android: Mark GLES3 as required in the manifest
Fixes #17076.

(cherry picked from commit 7d09e6540a)
2018-02-27 13:33:59 +01:00
Ignacio Etcheverry
f6c65d9d15 Mono: Buildsystem improvements
- Bundle with mscorlib.dll to avoid compatibilities issues
- Add build option 'mono_assemblies_output_dir' to specify the output directory where the assemblies will be copied to. '#bin' by default.

(cherry picked from commit a45697d8df)
2018-02-27 11:35:19 +01:00
Michele Valente
990bddcf36 fix release builds with mono
"_signals" and "signals_invalidated" were moved out of the
"TOOLS_ENABLED" directive. Updated also the two "update_signals" and
"_update_signals" methods so it makes sense.

(cherry picked from commit 3c7d9001bc)
2018-02-27 11:34:52 +01:00
Poommetee Ketson
c730a6ce44 Fix error spam when using PanoramaSky without texture
(cherry picked from commit 7a1b7ddf6c)
2018-02-27 11:34:03 +01:00
indicainkwell
115c0a7415 added docs on Control's drag and drop api
(cherry picked from commit 7154a96d3f)
2018-02-27 11:32:35 +01:00
Paul Joannon
87242c7b92 fix build error when compiling with mono, tools=no, target=release
change TTR to RTR in `print_unhandled_exception`

(cherry picked from commit 90a705d671)
2018-02-27 11:25:10 +01:00
Andrea Catania
4eb9ee9355 Fixed physics server typo
(cherry picked from commit 134cca0cf2)
2018-02-27 11:22:56 +01:00
bruvzg
48ed52184d Add missing return statements (iOS and server).
(cherry picked from commit e3c2778d7e)
2018-02-27 00:06:01 +01:00
JFonS
69274ef368 Fix visibility of gizmos on scene load
(cherry picked from commit 99d740c46e)
2018-02-27 00:02:01 +01:00
Paul Joannon
039fc750d5 only show information we have in stacktrace
do not show line number and/or file if not defined

(cherry picked from commit 3ee4ce51a9)
2018-02-26 23:55:27 +01:00
Paul Joannon
58a7d78c22 [mono] get stacktraces for all inner exceptions
(cherry picked from commit 89af6c2cd7)
2018-02-26 23:55:13 +01:00
Ignacio Etcheverry
c0386f0124 Mono: Fix bindings for parameters in vararg methods
(cherry picked from commit 0c82858121)
2018-02-26 23:54:32 +01:00
Nathan Warden
b6f958965b The marshalling in was also incorrect.
(cherry picked from commit 60daa9d718)
2018-02-26 22:45:53 +01:00
Ignacio Etcheverry
dde14e15c6 Mono: Better versioning and gracefully unloading of Godot API assemblies
(cherry picked from commit f37090ccf4)
2018-02-26 22:36:03 +01:00
Hein-Pieter van Braam
1ea805a4aa Add missing #endif for the main.cpp fix.
I forgot to amend my previous commit.
2018-02-26 21:02:03 +01:00
Hein-Pieter van Braam
3b96b3fd12 Allow running with a custom resource without a main scene
After 3f8a4cc719 trying to run an
individual scene on a project without a main scene fails. We move the
check until after we've determined whether or not we're trying to run an
individual scene.

We also stop trying to show the project manager if any game pack is
found at all, unless the user explicitly asks for the project manager to
be shown.

(cherry picked from commit b4215c991a)
2018-02-26 20:39:48 +01:00
Hein-Pieter van Braam
e499b9b4b6 Bump to version 3.0.2-devel 2018-02-26 20:36:43 +01:00
Hein-Pieter van Braam
8ea709a7a9 Update the changelog for 3.0.1 2018-02-26 20:35:13 +01:00
Hugo Locurcio
f2e19a26f5 Add a project changelog
(cherry picked from commit f00b2dfc55)
2018-02-25 15:32:08 +01:00
Rémi Verschelde
be771e7165 Fix version.txt validation logic for export templates .tpz
It assumed that the version would always be `x.y-status`,
with no dot possible in `status`, so:
- It would not work for 3.0.1-stable (nor 3.0.1.stable with new version logic)
- It would not support Mono templates when we provide them

The validation it did was not really useful anyway, so we just use the raw
string.

(cherry picked from commit eec9261a75)
2018-02-25 15:29:28 +01:00
Rémi Verschelde
cb65617897 Revert "Bump to version 3.0.2-devel"
This reverts commit bcbe7a8a6f.

Need to push a fix and retag 3.0.1-stable, sorry.
2018-02-25 14:09:38 +01:00
Hein-Pieter van Braam
bcbe7a8a6f Bump to version 3.0.2-devel
The start of the next patch release. Wooooooooooo
2018-02-24 20:08:32 +01:00
Hein-Pieter van Braam
ae540c2efe Bump version to 3.0.1-stable
Thanks everyone for all your amazing work getting our first stable patch
release out for the 3.0 series. I'd particularly like to thank @fales
and @fire for their work on the server platform.

Onwards to 3.0.2!
2018-02-24 19:21:52 +01:00
Hein-Pieter van Braam
5f15642fde Update doc version strings to 3.0.1 2018-02-24 18:59:38 +01:00
Hein-Pieter van Braam
17d7084780 Correct version number for 3.0.1 in the manpage 2018-02-24 18:37:01 +01:00
Poommetee Ketson
fe38b648b0 [DOCS] clarify that OS.get_user_data_dir needs project name
[ci skip]

(cherry picked from commit 2c22c9dcfb)
2018-02-24 18:33:43 +01:00
Rémi Verschelde
ad325be5a0 Add --quit option to help output and update manpage
(cherry picked from commit 95b8984d5f)
2018-02-24 18:32:22 +01:00
Hein-Pieter van Braam
d69d58deea Fix Windows file case changing
Windows APIs don't really provide a way to change a filename case. This
implements a little juggling to make this work. We first create a
guaranteed unique temporary file, we then replace the original file with
the temporary file and we finally rename it to the desired filename
case.
2018-02-24 17:37:07 +01:00
Gilles Roudiere
34591f9451 Fixes collisions shape selection
(cherry picked from commit c250a9a9f9)
2018-02-24 10:53:10 +01:00
Rémi Verschelde
d79a7a2773 Refactor version macros and fix related bugs
The previous logic with VERSION_MKSTRING was a bit unwieldy, so there were
several places hardcoding their own variant of the version string, potentially
with bugs (e.g. forgetting the patch number when defined).

The new logic defines:

- VERSION_BRANCH, the main 'major.minor' version (e.g. 3.1)
- VERSION_NUMBER, which can be 'major.minor' or 'major.minor.patch',
  depending on whether the latter is defined (e.g. 3.1.4)
- VERSION_FULL_CONFIG, which contains the version status (e.g. stable)
  and the module-specific suffix (e.g. mono)
- VERSION_FULL_BUILD, same as above but with build/reference name
  (e.g. official, custom_build, mageia, etc.)
  Note: Slight change here, as the previous format had the build name
  *before* the module-specific suffix; now it's after
- VERSION_FULL_NAME, same as before, so VERSION_FULL_BUILD prefixed
  with "Godot v" for readability

Bugs fixed thanks to that:

- Export templates version matching now properly takes VERSION_PATCH
  into account by relying on VERSION_FULL_CONFIG.
- ClassDB hash no longer takes the build name into account, but limits
  itself to VERSION_FULL_CONFIG (build name is cosmetic, not relevant
  for the API hash).
- Docs XML no longer hardcode the VERSION_STATUS, this was annoying.
- Small cleanup in Windows .rc file thanks to new macros.

(cherry picked from commit 23ebae01dc)
2018-02-24 01:34:34 +01:00
Rémi Verschelde
05fec82f31 Merge pull request #16934 from anakimluke/fix_space_around_args
Removed whitespaces around arguments of functions.
2018-02-24 01:32:59 +01:00
anakimluke
370f84f41c Removed whitespaces around arguments of functions.
Functions automatically generated by conneting
signals via GUI put whitespaces around the
arguments of the generated function. This is
inconsistent with the style guide.

This commit fixes that.
2018-02-22 19:41:37 -03:00
Rémi Verschelde
689dfcd9ec server: Add support for statically linking libgcc and libstdc++
(cherry picked from commit be7bfdfac3)
2018-02-22 19:06:36 +01:00
Rémi Verschelde
46b594054c doc: Sync classref with current source 2018-02-22 19:02:37 +01:00
Rémi Verschelde
07e2461995 i18n: Sync translation templates with current source 2018-02-22 18:47:07 +01:00
Rémi Verschelde
ca5f3b9f8d i18n: Sync translations with Weblate
(cherry picked from commit 661ab3c88e)
2018-02-22 18:42:25 +01:00
Rado'sPC\aRaGaR
3d804778fd Fix quotation in string
fix for #16404

(cherry picked from commit f38e819fc1)
2018-02-22 13:23:44 +01:00
Yan Pas
3e8c214a19 Delete all selected lines using the delete line shortcut in script editor
(cherry picked from commit 7368978a48)
2018-02-22 13:09:02 +01:00
Pieter-Jan Briers
e9d8dfbf0e Ignore tools CLI flags in non-tools builds.
Some flags were still parsed but either did nothing or broke everything.

No reason to parse them.

(cherry picked from commit dd19826277)
2018-02-22 13:08:03 +01:00
Pieter-Jan Briers
3687faa78f Enforce insert_final_newline in the editorconfig.
(cherry picked from commit 6861886f70)
2018-02-22 13:06:25 +01:00
Artem Varaksa
eacd66e784 Clean up some bad words from code comments
(cherry picked from commit d35e486228)
2018-02-22 12:22:41 +01:00
Poommetee Ketson
b5f8c1a53b Fix timer second not zero padded when < 10
Also RTR "Time Left:"

(cherry picked from commit d2e3607fa0)
2018-02-22 12:20:23 +01:00
Rémi Verschelde
f04cd405ac Fix loading project.binary from PCK file
Regression introduced in #16825.
My logic was correct, but not the error code I was expecting.
The error reporting in FileAccess likely needs a review too.

(cherry picked from commit 57d562b394)
2018-02-22 12:19:43 +01:00
Rémi Verschelde
f55b376d78 Improve error reporting of ProjectSettings::setup()
And use it to better report errors in the console and project manager
when a project.godot file is corrupted.

Fixes #14963.

(cherry picked from commit 7839076f95)
2018-02-22 12:19:28 +01:00
Michael Alexsander Silva Dias
fdac09a0aa Made the Debugger's Stack Frames items reselectable.
(cherry picked from commit 32e3f257ac)
2018-02-22 12:18:45 +01:00
luz.paz
751806b5c7 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```

(cherry picked from commit 612ab4bbc6)
2018-02-22 12:17:06 +01:00
Poommetee Ketson
40018e995c Color:fix setting V switch S to old V value
(cherry picked from commit f4f92b55e1)
2018-02-22 12:07:07 +01:00
BastiaanOlij
be6323d848 Added documentation for VehicleBody
(cherry picked from commit 234b86e6b2)
2018-02-22 12:03:10 +01:00
Artem Varaksa
29089b715d Insert proper copy icon to debugger
(cherry picked from commit db2a1544c0)
2018-02-22 12:02:41 +01:00
Daniel J. Ramirez
7e89cc46dd Icons update
includes new enum, MeshInstance2D, Skeleton2D, Cut, Copy and Paste icons.

(cherry picked from commit cecf274364)
2018-02-22 12:02:02 +01:00
Chaosus
a86829211a Added missing shader functions
(cherry picked from commit 8f04a13c98)
2018-02-22 00:02:52 +01:00
isaacremnant
f01821b60a Force controls to save rect_clip_content since they do not all default to false.
(cherry picked from commit cc902cf9ab)
2018-02-22 00:01:33 +01:00
hungrymonkey
245c11be08 Change function signature from float to double to match type get_doubleCloses #16160
(cherry picked from commit d2f1c87063)
2018-02-21 23:59:15 +01:00
Bernhard Liebl
fa98637aca Fixes wrong vertical font layout in RichTextLabel
(cherry picked from commit 77b1320fb4)
2018-02-21 23:52:49 +01:00
Ian
723613dbc3 TextEdit folding over unindented comments
(cherry picked from commit d327f75392)
2018-02-21 23:51:45 +01:00
Hein-Pieter van Braam
99efa7ce62 Revert "Fix wrong return type of xform functions"
As this will change bindings API this will have to wait for 3.1

This reverts commit 187c40d64d.
2018-02-21 23:47:04 +01:00
AndreaCatania
c7040f3218 Fixed sky reflection rendering when transparent BG
(cherry picked from commit c34f18acce)
2018-02-21 23:40:59 +01:00
Neil Moore
5975b44ded Fixes gravity calculation for kinematic bodies in Bullet
(cherry picked from commit 5fb8a6a6c2)
2018-02-21 23:38:30 +01:00
Hein-Pieter van Braam
8efb9c8cdd Actually fix the db/dc renaming mess
Local builds save lives :)
2018-02-21 23:21:21 +01:00
Hein-Pieter van Braam
75289b4017 revert the renaming _tree_db_selected function 2018-02-21 22:57:50 +01:00
Rémi Verschelde
ccf27376a6 Update warning about C# support
(cherry picked from commit 24cf4fe062)
2018-02-21 22:55:46 +01:00
Michael Alexsander Silva Dias
23b9f09c58 Fixed "Open" button being enabled when nothing is selected in a FileDialog while in "Open folder" mode.
(cherry picked from commit db80d56388)
2018-02-21 22:23:24 +01:00
Florian Zwoch
e1fc7776f6 gltf: improve embedded data discovery
Some editors seems to use the image resource's mime type (e.g. "image/png") for data embedded uris instead of "application/octet-stream".

(cherry picked from commit 1abf464b59)
2018-02-21 22:17:09 +01:00
Chaosus
c6a96fc360 Enable snapping when control key pressed
(cherry picked from commit 24c170555d)
2018-02-21 22:16:20 +01:00
Max
4383fae5a4 Fixed disappearing text on filedialog buttons
(cherry picked from commit 6a48f952ca)
2018-02-21 22:15:05 +01:00
Nathan Warden
9cfcf102a0 [Mono] Fixed "expression did not evaluate to a constant" compiler error for visual studio.
(cherry picked from commit 72fe70272d)
2018-02-21 22:12:57 +01:00
Bojidar Marinov
8dc946c89c Fix a rendering bug with screen_texture
(cherry picked from commit ea57a19b34)
2018-02-21 22:11:47 +01:00
karroffel
327fea741a using TIME in light shader enables uses_fragment_time
The GLES3 shader compiler performs certain checks to enable or disable
the usage of certain uniform variables (and with that the set-up of UBOs).

If the `TIME` variable gets used inside the `vertex` function then the
renderer knows that it has to insert that value into the UBO.
The same applies to the `fragment` function.

The `light` function gets executed inside the fragment shader for every
light source that is relevant to the current pixel. If the `TIME` variable
gets used in that function then it needs to be present in the fragment-UBO.
The check for this was missing, so if a shader uses `TIME` inside `light`
but not inside `fragment` then the uniform will not actually be set up.

(cherry picked from commit bb655856e2)
2018-02-21 22:10:28 +01:00
volzhs
317cb336eb Keep to show current script when closing all docs
also fix error when removing multiple tabs from TabContainer at same frame.
like closing multiple docs at once.

Fix #16403

(cherry picked from commit df84290a7e)
2018-02-21 22:09:23 +01:00
Nathan Warden
83b76a8171 Added an auto quit and auto build flag to the command line options.
(cherry picked from commit 4bfb504c2f)
2018-02-21 21:56:37 +01:00
K. S. Ernest (iFire) Lee
70b082c0d9 Create and return LightmapCapture.
(cherry picked from commit 2e66730061)
2018-02-21 21:49:16 +01:00
K. S. Ernest (iFire) Lee
bbfec2a7cc Add dummy audio driver, fix dummy rasterizer
(cherry picked from commit 4e1923a931)
2018-02-21 21:49:10 +01:00
Fabio Alessandrelli
8849377f6d Fixes to OS_Server and DummyRasterizer to match new signatures
(cherry picked from commit 2de10aa467)
2018-02-21 21:48:58 +01:00
Fabio Alessandrelli
149ffcb1a4 server platform now compiles and run on linux.
Seems to also be able to do exports of some demos I tried.

(cherry picked from commit 6784d743f7)
2018-02-21 21:48:46 +01:00
Fabio Alessandrelli
fb4a784319 Add dummy Texture handling
(cherry picked from commit 72ef766dfa)
2018-02-21 21:48:33 +01:00
Fabio Alessandrelli
8f231d82bb Disable GLES builders and source from server compilation
(cherry picked from commit 8699f643c9)
2018-02-21 21:48:21 +01:00
Fabio Alessandrelli
cc280545dc Add dummy resterizer driver
(cherry picked from commit c0dce6e480)
2018-02-21 21:47:38 +01:00
George Marques
fa02b58b46 Remove unused variable from plugin settings update
Fix #16199

(cherry picked from commit 9f0cce840d)
2018-02-19 23:15:56 +01:00
Stephen Traskal
000caef623 Fixing folder/file case sensitive renaming issue
Example:
Could not rename "Objects" to "objects" or vice versa

(cherry picked from commit e790ca084d)
2018-02-19 22:47:39 +01:00
x1212
b7faa76485 fix spurious error messages during autocomplete and validate
_parse() caused resets on members like validating and
for_completion by calling clear().

(cherry picked from commit 48c9ed4545)
2018-02-19 22:46:49 +01:00
Konrad Nowakowski
a76dfe9c72 Fix 2d collision body update on shape remove
(cherry picked from commit 3659df6624)
2018-02-19 22:43:33 +01:00
Leon Krause
a423adbee6 Flush HTTPClient response data only on request/close in HTML5 platform
(cherry picked from commit 98039909f2)
2018-02-19 22:42:38 +01:00
Leon Krause
c5b5fd61d4 Warn when polling HTTPClient synchronously in HTML5 platform
(cherry picked from commit ca9fa9cca8)
2018-02-19 22:42:31 +01:00
Leon Krause
5bb269d01d Disable insecure HTTP methods CONNECT and TRACE in HTML5 platform
(cherry picked from commit 2cd7bc04ea)
2018-02-19 22:42:22 +01:00
Leon Krause
d5535d9357 Fix HTML5 HTTPClient response header retrieval
(cherry picked from commit 8a21f27f54)
2018-02-19 22:42:08 +01:00
Leon Krause
2714b851bf Fix HTML5 HTTPClient failure detection
(cherry picked from commit 9ea4452d21)
2018-02-19 22:42:01 +01:00
Ignacio Etcheverry
2abbdcaa20 Mono: Fix build status icons
(cherry picked from commit 8bd05f0c71)
2018-02-19 22:40:21 +01:00
Paul Joannon
9cba5ef772 implement signal related methods in csharp_script so signals can be used with emit
(cherry picked from commit cfbd7fd21e)
2018-02-19 22:39:51 +01:00
Paul Joannon
416cd9c8b8 add a [Signal] attribute to CSharpScripts
(cherry picked from commit efd52cd172)
2018-02-19 22:39:44 +01:00
Benjamin Stammen
7a20495a80 Direct to InputEventJoypadButton for using buttons
(cherry picked from commit 6af7dafd6c)
2018-02-19 22:37:09 +01:00
Pedro J. Estébanez
bafbd73b51 Remove window decorations for fullscreen on X11
(cherry picked from commit 935a99e758)
2018-02-19 22:36:20 +01:00
Anish
ac6811c4fa Gridmap editor now lists plane instead of floor when not horizontal.
Instead of gridmap editor calling grid as floor irrespective of the
orientation, it now calls the grid plane if it's vertical and floor
if horizontal.

Resolves: #14611
(cherry picked from commit 7c356a9c05)
2018-02-19 22:34:16 +01:00
Rémi Verschelde
8372a404bb X11: Link libgcc statically with use_static_cpp option
We were already linking libstdc++ statically for official binaries,
protecting us against most portability issues. But apparently since
we started using GCC 7 for official builds, we also need to link
libgcc statically for at least 32-bit builds to be portable.

Fixes #16409.

(cherry picked from commit b526088ae2)
2018-02-19 22:33:29 +01:00
Rémi Verschelde
5b04dcfabd Update CA certificates to latest Mozilla bundle
Copied from an up-to-date Fedora 27 install (ca-certificates-2018.2.22-1.0.fc27).

(cherry picked from commit 294af5617a)
2018-02-19 22:32:53 +01:00
Pieter-Jan Briers
4b581104e7 Makes project manager never initialize mono debug.
The heuristic whether we're in the project manager inside GDMono
didn't work if the project manager was launched by not having any path
to run.

This is fixed now by making a Main::is_project_manager().

(cherry picked from commit 1099838079)
2018-02-19 22:32:17 +01:00
Pieter-Jan Briers
f49601a934 Give C# NodePath a ToString().
It already had an implicit cast operator to string,
but this doesn't get used in say string formatting.

So now something like $"path: {GetPath()}" works.

(cherry picked from commit 3c1f8efd9e)
2018-02-19 22:31:33 +01:00
Pieter-Jan Briers
3e6ab9f3d5 Makes NodePath and RID follow PascalCase in C#.
Fixes #15685

(cherry picked from commit b1a81374d4)
2018-02-19 22:30:45 +01:00
damarindra
9f9731da3a fix crash autotile edit mode
(cherry picked from commit cceb176be3)
2018-02-19 22:30:13 +01:00
Alexander Alekseev
18735ff6f2 Fixes OptionButton selection index being reset to zero at instanciation
Bug: engine tries to set selected item before items were added during save scene/run project, because of wrong properties order.
Fixes #10213.

(cherry picked from commit 66c39b1426)
2018-02-19 22:29:36 +01:00
Michael Alexsander Silva Dias
237cf72f89 Made modifications to the RigidBody(2D) descriptions.
(cherry picked from commit 50e6b3c005)
2018-02-19 22:28:47 +01:00
Anish
5c2b2ca95b Documentation tool does not add escapes to code and codeblocks
Instead of adding the escapes to all * and _ the tool now excludes
the characters inside [code] and [codeblock].

Resolves: #15156
(cherry picked from commit 84e8c49f5d)
2018-02-19 22:28:03 +01:00
Rémi Verschelde
57f707f951 Add locale renames for Hebrew and Indonesian on Windows
Windows does not fully respect ISO 639-1 like other systems,
so we have to override its locale values for those languages.

Also added comments to document the locale provenance.

(cherry picked from commit 0c7bed45c4)
2018-02-19 22:27:19 +01:00
ianb96
2f87e7ffe9 option to disable sort in script list
(cherry picked from commit e1778fb921)
2018-02-19 22:26:29 +01:00
BTaskaya
12da8dcdeb PEP3101 applied with changing old type string formatting as new ones
(cherry picked from commit 78dba05fc0)
2018-02-19 22:25:41 +01:00
Marcelo Fernandez
c5388fb0cf Fix for a possible compile error under OS X
(cherry picked from commit 621d28adef)
2018-02-19 22:24:57 +01:00
Michael Alexsander Silva Dias
02e910275c Fixed small typos in the SConstruct file.
(cherry picked from commit b92c5669de)
2018-02-19 22:23:38 +01:00
Andrea Catania
285f47f037 Added return true o collide when no rusult is NULL
(cherry picked from commit f48845428d)
2018-02-19 22:21:58 +01:00
Michael Alexsander Silva Dias
9fb843db06 Added "allow_reselect" property to ItemList and enabled it for the method/help lists.
(cherry picked from commit 4dbf6ac1b8)
2018-02-19 22:21:14 +01:00
Iskustvo
4bdcee2b9d [X11] Improving error detection in move_to_trash
(cherry picked from commit 268d7c7c5b)
2018-02-19 22:20:06 +01:00
Rémi Verschelde
fd033473c7 Fix broken APK expansion due to missed option renames
Command line options were refactored for 3.0 to follow the common usage
of double-dashed long options, but `--main-pack` went through the cracks.

Fixes #16533.

(cherry picked from commit e3658a6464)
2018-02-19 22:19:08 +01:00
George Marques
a39930c5b9 Add a function to remove controls from containers
Closes #5968

(cherry picked from commit da69a06253)
2018-02-19 22:18:22 +01:00
Artem Varaksa
c94d8e6577 Fix #16543 (add button to copy error from debugger)
(cherry picked from commit b169b16f98)
2018-02-19 22:17:26 +01:00
George Marques
eb5e5200cc Fix infinite recursion with editor import plugins
(cherry picked from commit 95f7879923)
2018-02-19 22:16:33 +01:00
George Marques
d54ac732ae Expose priority and order for custom import plugins
(cherry picked from commit c68948fdfa)
2018-02-19 22:16:13 +01:00
Brandon DeRosier
62fcd772be Add Xbox One Elite and Xbox 360 Afterglow pads
(cherry picked from commit ae579a256e)
2018-02-19 22:15:05 +01:00
Marcelo Fernandez
150423203b Added OS::center_window to center the window precisely on desktop platforms
(cherry picked from commit ea1d726a46)
2018-02-19 22:14:05 +01:00
ShyRed
ef60123938 Add import option "scale_mesh" to obj file importer
The new import option "scale_mesh" allows setting a scale that is applied to the mesh's vertices during import.

(cherry picked from commit 291c1d0f45)
2018-02-19 22:13:46 +01:00
Jonathan Tinkham
0d03b5f162 Add and use mono build variables with cloned environment.
(cherry picked from commit 70d281b946)
2018-02-19 22:13:46 +01:00
Paulb23
148e059940 Fixed members overview not scrolling to correct line
(cherry picked from commit 4d92c5e1c3)
2018-02-19 22:13:46 +01:00
Artem Varaksa
7af43c4ca3 Fix #16479 (deselect text when jumping to function)
(cherry picked from commit 3094e89782)
2018-02-19 22:13:46 +01:00
ronroniv
5b32be4701 Update an outdated method name in error message
set_enable_monitoring -> set_monitoring

(cherry picked from commit 5e8f7c9782)
2018-02-19 22:13:46 +01:00
Andrew Silver
47b49200b0 Fixed KinematicBody move_and_slide documentation naming
(cherry picked from commit da81d9f843)
2018-02-19 22:13:46 +01:00
Hugo Locurcio
a7d7f763d0 Remove debugging prints related to the asset library
(cherry picked from commit 5513e4e1f9)
2018-02-19 22:13:46 +01:00
Ovnuniarchos
eda94419df SpinBoxes calculate correctly their width before first redraw.
(cherry picked from commit fe1ca3c6e6)
2018-02-19 22:13:46 +01:00
Marcin Zawiejski
e6252bda5e download templates to a file using separate thread
(cherry picked from commit b4f1a035e3)
2018-02-19 22:13:46 +01:00
Federico Frenguelli
069658f1be Fixed #15082: line edit emits two "text_changed" signals when pasting while text is selected
(cherry picked from commit 9cd3ed4ace)
2018-02-19 22:13:46 +01:00
Nicolas Silva
a0e59a7259 Fix polygon triangulation failure.
The ear clipping algorithm used to triangulate polygons has a slightly too conservative point-in-triangle test which can, in some configurations prevent it from finding a possible tessellation. Relaxing the test by considering that points exactly on edges don't belong the triangle fixes the issue. Changing the semantic of the test is safe because no other code makes use of it. A more detailed explanation can be found in issue #16395.

Fixes #16395.

(cherry picked from commit 91215e1919)
2018-02-19 22:13:46 +01:00
Paolo Perkovic
82b9a13e0c Fix timeline track name overlapping keyframe area
(cherry picked from commit 398f5b74e3)
2018-02-19 22:13:46 +01:00
Hugo Locurcio
79ef5f92a9 Remove a few debugging prints
(cherry picked from commit 84267915f5)
2018-02-19 22:13:46 +01:00
Hugo Locurcio
5d7867082d Always detect and use hiDPI in the project manager if needed
This makes its hiDPI behavior consistent with the editor.

(cherry picked from commit 55a2bffac9)
2018-02-19 22:13:45 +01:00
Hugo Locurcio
fda35b3f42 Draw the Camera gizmo more accurately
The Camera gizmo no longer looks twice as wide as it actually is.
This fixes #16399.

(cherry picked from commit 0d7d293889)
2018-02-19 22:13:45 +01:00
Michael Alexsander Silva Dias
a0e9d751a3 Fixed wrong example in JSONParseResult.
(cherry picked from commit 24e87f97c6)
2018-02-19 22:13:45 +01:00
Marcin Zawiejski
d4a70c6c08 fix buffer write performance on Windows and Unix
(cherry picked from commit 8315aa40cc)
2018-02-19 22:13:45 +01:00
binbitten
65aa9063c4 Fix spaces and quotes in external editor flags
(cherry picked from commit fb8d2420b5)
2018-02-19 22:13:45 +01:00
ianb96
9eb546e7ff drop path text at mouse pos
(cherry picked from commit 06965f2770)
2018-02-19 22:13:45 +01:00
ianb96
f031e2f665 disable scene tree shortcuts when in a textfield
(cherry picked from commit 4e96e04389)
2018-02-19 22:13:45 +01:00
Poommetee Ketson
4bed14f69b Gradient: fix wrong property type
(cherry picked from commit 4f9ef96b54)
2018-02-19 22:13:45 +01:00
Chaosus
91692ce72a Fix gradient texture preview
(cherry picked from commit 3ba43ac975)
2018-02-19 22:13:45 +01:00
binbitten
05e97db6f2 Fix wrong property type for fixed icon size in ItemList
(cherry picked from commit 331cfc1d18)
2018-02-19 22:13:45 +01:00
Michael Alexsander Silva Dias
617bcd1b91 Capitalized "View" menu options.
(cherry picked from commit b507eeddcc)
2018-02-19 22:13:45 +01:00
Benjamin Dobell
34d8625d82 Fix pkgconfig detection of mono
(cherry picked from commit 5920bc6f72)
2018-02-19 22:13:45 +01:00
Paolo Perkovic
79b931d093 Fix UX with project settings search functionality
(cherry picked from commit e7b98119df)
2018-02-19 22:13:45 +01:00
Nathan Warden
9173819b71 [Mono] Basis values now marshalled in the correct order.
(cherry picked from commit 0cc4de1f24)
2018-02-19 22:13:45 +01:00
JFonS
8787850286 Fix gizmo solid box mesh being added twice
(cherry picked from commit d0a2931cd7)
2018-02-19 22:13:45 +01:00
Max Hilbrunner
2515d42a14 [DOCS] parse_json: Objects do not keep key order
Document JSON not guaranteeing key order.

(cherry picked from commit 82b8f1729d)
2018-02-19 22:13:44 +01:00
Guilherme Felipe
1a9a40fe31 Make parent folder selectable. Fix #16253
(cherry picked from commit 6e1c02b828)
2018-02-19 22:13:44 +01:00
Guilherme Felipe
eda3169cd1 Fixes open button not appearing with multiple selection
Fix #16231

(cherry picked from commit 09c277693e)
2018-02-19 22:13:44 +01:00
George Marques
d7f73031fb Show default values in docs for GDScript built-in functions
(cherry picked from commit dca2ae78dd)
2018-02-19 22:13:44 +01:00
Poommetee Ketson
ba36ef5465 3DEditor: fix selecting node in viewport not update inspector
(cherry picked from commit cfac160f9f)
2018-02-19 22:13:44 +01:00
Poommetee Ketson
41f9904e71 3DEditor: fix multiple node selection crash the editor
I'm not sure about this fix. This seems to also fixes the weird
selection bug where when selecting node 1 to 3 it focuses on
2nd node.

(cherry picked from commit 25dd1f0681)
2018-02-19 22:13:44 +01:00
Gilles Roudiere
a206d3d2fc Fixes a Gridcontainer wrong children fitting with expanded+non-zero minisize
(cherry picked from commit d1f32708b7)
2018-02-19 22:13:44 +01:00
Gilles Roudiere
a6ca62ac79 Fixes a bas resizing with SplitContainer
(cherry picked from commit 30e1e42175)
2018-02-19 22:13:44 +01:00
Rémi Verschelde
85dedc09a8 Readd VS.sync and VS.draw to keep compatibility
Those are deprecated as VS.force_sync and VS.force_draw do the same and more explicitly,
but we cannot remove them without marking them as deprecated before that.

Fixes issue introduced in #15892.

(cherry picked from commit fd92e571ac)
2018-02-19 22:13:44 +01:00
Marc Gilleron
9e7c3016d1 Added all missing VisualServer bindings
- Added bindings for multimesh, immediate, skeleton, light, reflection probe, gi probe, lightmap, particles, camera, environment, scenario, instance
- Removed draw and sync, were duplicates of force_* equivalents
- Bumped binders max arguments from 11 to 13
- Wrote some wrappers as not all methods were variant-friendly

(cherry picked from commit e415fd05bb)
2018-02-19 22:13:44 +01:00
Marcelo Fernandez
906cf28dae Improved WASAPI driver so that it always uses the default audio device
(cherry picked from commit d5afcf7ab1)
2018-02-19 22:13:44 +01:00
Rémi Verschelde
801b544ee1 Windows: Fix case of imm32 for case-sensitive MinGW build
Fixes #16713.

(cherry picked from commit 4fa8987494)
2018-02-19 22:13:44 +01:00
geequlim
097f95993f Windows: implement OS.get_unique_id and OS.set_ime_position
(cherry picked from commit 3be04f73f5)
2018-02-19 22:13:39 +01:00
Bernhard Liebl
c04d868476 Make KEY_ESCAPE close all output/debugger docks on bottom
(cherry picked from commit 2ae2735a7a)
2018-02-19 21:01:41 +01:00
Saracen
50674dbe15 Expose 'lightmap_unwrap' method to the scripting engine.
(cherry picked from commit e3fdacdf90)
2018-02-19 20:57:40 +01:00
Paul Joannon
71607d9198 Fix bug when launching a game with no main scene
Check for a main scene after loading project settings and exit if there's none (except if launching in editor mode).

(cherry picked from commit 3f8a4cc719)
2018-02-19 20:56:54 +01:00
Julian Murgia
3548f71cc4 Display path to preloaded res + button to open it
(cherry picked from commit b766a849ad)
2018-02-19 20:56:16 +01:00
Paul Joannon
a1455f6a03 Change 'Build Project' button style in Mono panel
Address #15208

(cherry picked from commit 484f664331)
2018-02-19 20:50:39 +01:00
Jerome67000
f64b68d870 Change primitive meshes acccuracy value
(cherry picked from commit b72c9b85d0)
2018-02-19 20:49:41 +01:00
Michael Alexsander Silva Dias
f1d26c1c72 Re-enabled type icons.
(cherry picked from commit f7547a7f28)
2018-02-19 20:48:36 +01:00
Vincenzo Greco
7f5fde6459 Select root node if search_box is empty in create_dialog
(cherry picked from commit 586e735125)
2018-02-19 20:47:44 +01:00
Colin Kinloch
611caa06a5 Fixed android arm64v8
(cherry picked from commit 853b1daa49)
2018-02-19 20:46:49 +01:00
Nathan Warden
3f6e8d70cf Added async and await as C# keywords.
(cherry picked from commit 3dcf0567a1)
2018-02-05 09:33:01 +01:00
Ignacio Etcheverry
40c779fb70 Mono: Remove automatic script multilevel calls
(cherry picked from commit 84437b4864)
2018-02-05 09:32:29 +01:00
Phil Jones
532abf228c Fix texture import spelling
(cherry picked from commit d1a471f909)
2018-02-04 20:11:13 +01:00
Michael Alexsander Silva Dias
248fea2a79 Small fixes for the Control description in the docs.
(cherry picked from commit 5e0821e867)
2018-02-04 20:10:45 +01:00
Paolo Perkovic
7de47fbabb Fix inconsistencies and typos in argument names
(cherry picked from commit 08d4bfacaf)
2018-02-04 20:10:13 +01:00
volzhs
62dc7ba82f Expand project root directory on editor start
close #16232
Option for expanding all directories on start up is a bit tricky and buggy.

(cherry picked from commit 127d1241bd)
2018-02-04 20:09:26 +01:00
Nathan Warden
4a3a597377 Fix an infinite recursion in the Mathf.Decimals method when using floats.
(cherry picked from commit 2109bd3f97)
2018-02-04 20:08:26 +01:00
Guilherme Felipe
501880e9ba Hide button tree when file system dock isn't in split mode
(cherry picked from commit bb936b5503)
2018-02-04 20:07:56 +01:00
Profesor Tartelett
bd02969263 Errata fix on Image get_format() description
The description of this function seems to be duplicated from the preceding description.

(cherry picked from commit 9d735ffacb)
2018-02-04 20:07:19 +01:00
binbitten
0fa4325153 Fix TextEdit current line highlight horizontal offset
(cherry picked from commit ba8c5bff69)
2018-02-04 20:06:46 +01:00
George Marques
acf01c955f Expose a few GraphEdit methods to script languages
(cherry picked from commit b80bc73a17)
2018-02-04 20:05:47 +01:00
George Marques
0a75a38db4 Add interface for plugins to enable/disable other plugins
(cherry picked from commit 87be0bc110)
2018-02-04 20:05:12 +01:00
Andreas Haas
845f44b976 ProjectSettings: Disallow adding properties without name.
(cherry picked from commit d664d6e634)
2018-02-04 20:04:31 +01:00
Poommetee Ketson
77ee4ced30 AudioEffectReverb: max predelay_feedback to 0.98
(cherry picked from commit 5a26e0786c)
2018-02-04 20:03:16 +01:00
Chaosus
780a7a281b Viewport doc improvements
(cherry picked from commit ffcbb0c358)
2018-02-04 20:02:38 +01:00
Marlon Henry Schweigert
5481ece976 Display set_nodelay to GDScript
Pass enabled arg

Rename set_nodelay to set_no_delay

Add description to the method

Change description

(cherry picked from commit 87adf9cfba)
2018-02-04 20:02:04 +01:00
Hein-Pieter van Braam
ef49c166f6 Allow focus on disabled buttons
This behavior better matches other gui toolkits. A selected disabled
button still can't be interacted with but it can now be selected. This
seems to be what QT and GTK do also.

This fixes #16131

(cherry picked from commit 713f190a30)
2018-02-04 20:00:23 +01:00
Mariano Suligoy
77cc0a023b attemp to fix #15870
(cherry picked from commit 517ff5c8d7)
2018-02-04 19:59:34 +01:00
robfram
1036a76bc5 Fix issue 15895, audio streams don't signalling finished after the first one
if the audio player is set to play again due to the order of calls in
_notification. First it emits the signal, and later it disable the internal
processing regardless what the callback did.

Changed to emit the signal at the end to ensure the changes done at callback
remains.

(cherry picked from commit d588fe2740)
2018-02-04 19:56:37 +01:00
Rémi Verschelde
e44bef4404 Update DONORS list
[ci skip]

(cherry picked from commit f13d034485)
2018-02-02 10:07:40 +01:00
Juan Linietsky
c77047d6a3 Ability to import .escn files, which is just a .tscn but with forced import.
This works together with the new Blender to Godot exporter.

(cherry picked from commit 1322ca6fb2)
2018-01-31 01:15:00 +01:00
Hein-Pieter van Braam
a34afa3820 Implement OS::get_processor_count() for Windows
Current this is hardcoded as '1' for any platform except Unix. The
little is_wow64() dance is required to get correct output on a 32bit
compiled godot running on 64bit Windows according to MSDN.

This code should be UWP safe but I have no way to test that so it's not
implemented for UWP yet.

(cherry picked from commit b4d369c887)
2018-01-30 20:56:53 +01:00
bruvzg
77d27053c3 [macOS] Strip executable when separate_debug_symbols is set to yes
(cherry picked from commit 9ef0315b06)
2018-01-30 20:56:16 +01:00
Poommetee Ketson
187c40d64d Fix wrong return type of xform functions
(cherry picked from commit ebe2337515)
2018-01-30 20:55:41 +01:00
Hein-Pieter van Braam
e69b30b276 Fix Copy/Paste problems on X11
The target of the TARGETS type should be XA_ATOM and not XA_TARGETS when
requested. Since we are sending a number of ATOMS the size should be set
to the integer size and not the char size.

The size field of the atoms is also the number of atoms and not the size
of the array. This caused some clients to wrongly interpret the data and
read garbage in the X11 packet.

I also add the more modern representation for UTF-8 and clarify the
error message if a client attempts to request a type we don't know
about.

This fixes #10431

(cherry picked from commit fb60f2dbe6)
2018-01-30 20:55:11 +01:00
Geequlim
99e72894a2 Remote debugger send the real instance of WeakRef referenced to
(cherry picked from commit 10f0451cc2)
2018-01-30 20:54:25 +01:00
MrCdK
258119a9cf Expose audio streams get_length()
(cherry picked from commit 8a9f1c2a5d)
2018-01-30 20:53:37 +01:00
Hein-Pieter van Braam
3f6694b894 Bump version to 3.0.1-devel
Onwards, but slowly, towards stability. And the stars.
2018-01-30 20:51:06 +01:00
1055 changed files with 48922 additions and 22526 deletions

View File

@@ -17,7 +17,8 @@ cache:
install:
- SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- pip install --egg scons # it will fail on AppVeyor without --egg flag
- pip install -U wheel # needed for pip install scons to work, otherwise a flag is missing
- pip install scons
- if defined VS call "%VS%" %ARCH% # if defined - so we can also use mingw
before_build:

View File

@@ -4,6 +4,7 @@ root = true
charset = utf-8
end_of_line = lf
indent_style = tab
insert_final_newline = true
[*.{cpp,hpp,c,h,mm}]
trim_trailing_whitespace = true

3
.gitignore vendored
View File

@@ -17,6 +17,8 @@ platform/android/java/build.gradle
platform/android/java/AndroidManifest.xml
platform/android/java/libs/*
platform/android/java/assets
platform/android/java/.idea/*
platform/android/java/*.iml
# General c++ generated files
*.lib
@@ -44,6 +46,7 @@ gmon.out
# QT project files
*.config
*.creator
*.creator.*
*.files
*.includes

View File

@@ -36,6 +36,9 @@ matrix:
#- env: GODOT_TARGET=iphone TOOLS=no CACHE_NAME=${GODOT_TARGET}-clang
# os: osx
# compiler: clang
- env: GODOT_TARGET=server TOOLS=no CACHE_NAME=${GODOT_TARGET}-clang"
os: linux
compiler: clang
addons:
apt:

View File

@@ -38,6 +38,7 @@ name is available.
Ariel Manzur (punto-)
Bastiaan Olij (BastiaanOlij)
Ben Brookshire (sheepandshepherd)
Benjamin (Nallebeorn)
Bernard Liebl (poke1024)
Bojidar Marinov (bojidar-bg)
Błażej Szczygieł (zaps166)
@@ -61,6 +62,7 @@ name is available.
Hubert Jarosz (Marqin)
Hugo Locurcio (Calinou)
Ian Bishop (ianb96)
Ibrahn Sahir (ibrahn)
Ignacio Etcheverry (neikeq)
Indah Sylvia (ISylvox)
J08nY
@@ -70,12 +72,15 @@ name is available.
Joshua Grams (JoshuaGrams)
Juan Linietsky (reduz)
Julian Murgia (StraToN)
Justo Delgado (mrcdk)
Kelly Thomas (KellyThomas)
Kostadin Damyanov (Max-Might)
Leon Krause (eska014)
Marc Gilleron (Zylann)
Marcelo Fernandez (marcelofg55)
Mariano Javier Suligoy (MarianoGnu)
Mario Schlack (hurikhan)
Martin Sjursen (binbitten)
Masoud BH (masoudbh3)
Matthias Hölzl (hoelzl)
Max Hilbrunner (mhilbrunner)
@@ -83,16 +88,20 @@ name is available.
Nathan Warden (NathanWarden)
Nuno Donato (nunodonato)
Ovnuniarchos
Pascal Richter (ShyRed)
Patrick (firefly2442)
Paul Batty (Paulb23)
Paul Joannon (paulloz)
Pawel Kowal (pkowal1982)
Pedro J. Estébanez (RandomShaper)
Pieter-Jan Briers (PJB3005)
Poommetee Ketson (Noshyaar)
Przemysław Gołąb (n-pigeon)
Ralf Hölzemer (rollenrolm)
Ramesh Ravone (RameshRavone)
Ray Koopa (RayKoopa)
Rémi Verschelde (akien-mga)
Roberto F. Arroyo (robfram)
Ruslan Mustakov (endragor)
Saniko (sanikoyes)
SaracenOne
@@ -104,6 +113,7 @@ name is available.
Wilhem Barbier (nounoursheureux)
Will Nations (willnationsdev)
Wilson E. Alvarez (Rubonnek)
Xavier Cho (mysticfall)
Yuri Roubinski (Chaosus)
Zher Huei Lee (leezh)
ZuBsPaCe
@@ -113,7 +123,7 @@ name is available.
m4nu3lf
marynate
mrezai
rraallvv
romulox-x
rraallvv
sersoong
yg2f (SuperUserNameMan)

243
CHANGELOG.md Normal file
View File

@@ -0,0 +1,243 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
## [3.0.3] - 2018-07-13
### Added
- C# projects can now be exported for Windows, Linux, and MacOS targets.
- Universal translation of touch to mouse.
- Dynamic fonts can now have a hinting mode set.
- print_tree_pretty() was added allowing a graphical view of the scene tree.
- Restore purchases feature for iOS.
- AudioStreamPlayer, AudioStreamPlayer2D, and AudioStreamPlayer3D now have a pitch scale property.
- Show origin and Show viewport setting in 2D editor.
- You can now set Godot windows as 'always on top'.
- --print-fps options to print FPS to stdout.
### Fixed
- Mono: Signal parameters no longer crash the engine.
- Asset library thread usage, this makes the asset library more responsive.
- Several GLTF import fixes.
- Several memory leaks.
- iPhone X support.
- Several fixes to audio drivers (WASAPI and PulseAudio).
- Several crashes.
- Export PCK/ZIP now works again.
## [3.0.2] - 2018-03-03
### Added
- Mono: We now display stack traces for inner exceptions.
- Mono: Bundle mscorlib.dll with Godot to improve portability.
### Fixed
- Running a scene from a project with a main scene now works again (regression in 3.0.1).
- Correct line spacing in RichTextLabel (regression in 3.0.1).
- TextureProgress now correctly displays when progress > 62 (regression in 3.0.1).
- The editor no longer complains about using an enum from an autoloaded resource (regression in 3.0.1).
- Pressing Escape no longer closes unexpected subwindows (regression in 3.0.1).
- Fix spelling of `apply_torque_impulse()` and deprecate the misspelled method.
- Gizmos are now properly hidden on scene load if the object they control is hidden.
- Remove spurious errors when using a PanoramaSky without textures.
- Show tooltips in the editor when physics object picking is disabled.
- Fix a serialization bug that could cause tscn files to grow very large.
- Do not show the project manager unless no project was found at all.
- The animation editor time offset indicator no longer 'walks' when resizing the editor.
- Allow creation of an in-tscn file GDScript function even if the filename suggested already exists.
- Mono: Godot no longer crashes when opening a project created with an older release.
- Mono: Fix builds of tools=no builds.
- Mono: Fix transformation regression since 3.0.1
- Android: We now require GLESv3 support in the manifest.
- Android: Fix intermittent audio driver crash.
## [3.0.1] - 2018-02-25
### Added
- The 'server' platform is back as it was in Godot 2.1.
- It is now again possible to run a headless Godot on Linux.
- New CLI options
- --build-solutions: build C# solutions without starting the editor.
- --quit: quit the engine after the first main loop iteration.
- It is now possible to scale an .obj mesh when importing.
- Type icons can now be enabled in the editor again.
- New GLSL built-in functions in the shader language
- radians
- degrees
- asinh
- acosh
- atanh
- exp2
- log2
- roundEven
- New GDScript features
- `OS.center_window()`.
- `StreamPeerTCP.set_no_delay()`.
- `EditorPlugin.remove_control_from_container()`.
- A button has been added to the debugger to copy the error messages.
- The Ctrl toggles snapping in the 3D viewport.
- Support has been added for a new .escn, for use with the new Blender exporter.
- CA certificates have been updated to the latest Mozilla bundle.
### Fixed
- Copy/pasting from the editor on X11 will now work more reliably.
- The lightmap baker will now use all available cores on Windows.
- Fixed missing text in some FileDialog buttons.
- Fixes to HTTP requests on the HTML5 platform.
- Many, many fixes and improvements to C# support (including a [Signal] attribute).
- Static linking of `libgcc_s` as well as `libstdc++` for better Linux binary portability.
- Fix broken APK expansion on Android.
- Several crashes in the editor have been fixed.
- Many documentation fixes.
- Several hiDPI fixes.
## Changed
- Bullet physics now correctly calculates effective gravity on KinematicBodies.
- Setting the color `v` member now correctly sets the `s` member.
- RichTextLabels now correctly determine the baseline for all fonts.
- SpinBoxes now correctly calculate their initial size.
- OGG streams now correctly signal the end of playback.
## [3.0] - 2018-01-29
### Added
- Physically-based renderer using OpenGL ES 3.0.
- Uses the Disney PBR model, with clearcoat, sheen and anisotropy parameters available.
- Uses a forward renderer, supporting multi-sample anti-aliasing (MSAA).
- Parallax occlusion mapping.
- Reflection probes.
- Screen-space reflections.
- Real-time global illumination using voxel cone tracing (GIProbe).
- Proximity fade and distance fade (useful for creating soft particles and various effects).
- [Lightmapper](https://godotengine.org/article/introducing-new-last-minute-lightmapper) for lower-end desktop and mobile platforms, as an alternative to GIProbe.
- New SpatialMaterial resource, replacing FixedMaterial.
- Multiple passes can now be specified (with an optional "grow" property), allowing for effects such as cel shading.
- Brand new 3D post-processing system.
- Depth of field (near and far).
- Fog, supporting light transmittance, sun-oriented fog, depth fog and height fog.
- Tonemapping and Auto-exposure.
- Screen-space ambient occlusion.
- Multi-stage glow and bloom, supporting optional bicubic upscaling for better quality.
- Color grading and various adjustments.
- Rewritten audio engine from scratch.
- Supports audio routing with arbitrary number of channels, including Area-based audio redirection ([video](https://youtu.be/K2XOBaJ5OQ0)).
- More than a dozen of audio effects included.
- Rewritten 3D physics using [Bullet](http://bulletphysics.org/).
- UDP-based high-level networking API using [ENet](http://enet.bespin.org/).
- IPv6 support for all of the engine's networking APIs.
- Visual scripting.
- Rewritten import system.
- Assets are now referenced with their source files, then imported in a transparent manner by the engine.
- Imported assets are now cached in a `.import` directory, making distribution and versioning easier.
- Support for ETC2 compression.
- Support for uncompressed Targa (.tga) textures, allowing for faster importing.
- Rewritten export system.
- GPU-based texture compression can now be tweaked per-target.
- Support for exporting resource packs to build DLC / content addons.
- Improved GDScript.
- Pattern matching using the `match` keyword.
- `$` shorthand for `get_node()`.
- Setters and getters for node properties.
- Underscores in number literals are now allowed for improved readability (for example,`1_000_000`).
- Improved performance (+20% to +40%, based on various benchmarks).
- [Feature tags](http://docs.godotengine.org/en/latest/learning/workflow/export/feature_tags.html) in the Project Settings, for custom per-platform settings.
- Full support for the [glTF 2.0](https://www.khronos.org/gltf/) 3D interchange format.
- Freelook and fly navigation to the 3D editor.
- Built-in editor logging (logging standard output to a file), disabled by default.
- Improved, more intuitive file chooser in the editor.
- Smoothed out 3D editor zooming, panning and movement.
- Toggleable rendering information box in the 3D editor viewport.
- FPS display can also be enabled in the editor viewport.
- Ability to render the 3D editor viewport at half resolution to achieve better performance.
- GDNative for binding languages like C++ to Godot as dynamic libraries.
- Community bindings for [D](https://github.com/GodotNativeTools/godot-d), [Nim](https://github.com/pragmagic/godot-nim) and [Python](https://github.com/touilleMan/godot-python) are available.
- Editor settings and export templates are now versioned, making it easier to use several Godot versions on the same system.
- Optional soft shadows for 2D rendering.
- HDR sky support.
- Ability to toggle V-Sync while the project is running.
- Panorama sky support (sphere maps).
- Support for WebM videos (VP8/VP9 with Vorbis/Opus).
- Exporting to HTML5 using WebAssembly.
- C# support using Mono.
- The Mono module is disabled by default, and needs to be compiled in at build-time.
- The latest Mono version (5.4) can be used, fully supporting C# 7.0.
- Support for rasterizing SVG to images on-the-fly, using the nanosvg library.
- Editor icons are now in SVG format, making them better-looking at non-integer scales.
- Due to the library used, only simpler SVGs are well-supported, more complex SVGs may not render correctly.
- Support for oversampling DynamicFonts, keeping them sharp when scaled to high resolutions.
- Improved StyleBoxFlat.
- Border widths can now be set per-corner.
- Support for anti-aliased rounded and beveled corners.
- Support for soft drop shadows.
- VeryLoDPI (75%) and MiDPI (150%) scaling modes for the editor.
- Improved internationalization support for projects.
- Language changes are now effective without reloading the current scene.
- Implemented missing features in the HTML5 platform.
- Cursor style changes.
- Cursor capturing and hiding.
- Improved styling and presentation of HTML5 exports.
- A spinner is now displayed during loading.
- Rewritten the 2D and 3D particle systems.
- Particles are now GPU-based, allowing their use in much higher quantities than before.
- Meshes can now be used as particles.
- Particles can now be emitted from a mesh's shape.
- Properties can now be modified over time using an editable curve.
- Custom particle shaders can now be used.
- New editor theme, with customizable base color, highlight color and contrast.
- A light editor theme option is now available, with icons suited to light backgrounds.
- Alternative dark gray and Arc colors are available out of the box.
- New adaptive text editor theme, adjusting automatically based on the editor colors.
- Support for macOS trackpad gestures in the editor.
- Exporting to macOS now creates a `.dmg` disk image if exporting from an editor running on macOS.
- Signing the macOS export now is possible if running macOS (requires a valid code signing certificate).
- Exporting to Windows now changes the exported project's icon using `rcedit` (requires WINE if exporting from Linux or macOS).
- Improved build system.
- Support for compiling using Visual Studio 2017.
- [SCons](http://scons.org/) 3.0 and Python 3 are now supported (SCons 2.5 and Python 2.7 still work).
- Link-time optimization can now be enabled by passing `use_lto=yes` to the SCons command line.
- Produces faster and sometimes smaller binaries.
- Currently only supported with GCC and MSVC.
- Added a progress percentage when compiling Godot.
- `.zip` archives are automatically created when compiling HTML5 export templates.
- Easier and more powerful way to create editor plugins with EditorPlugin and related APIs.
### Changed
- Increased the default low-processor-usage mode FPS limit (60 → 125).
- This makes the editor smoother and more responsive.
- Increased the default 3D editor camera's field of view (55 → 70).
- Increased the default 3D Camera node's field of view (65 → 70).
- Changed the default editor font (Droid Sans → [Noto Sans](https://www.google.com/get/noto/)).
- Changed the default script editor font (Source Code Pro → [Hack](http://sourcefoundry.org/hack/))
- Renamed `engine.cfg` to `project.godot`.
- This allows users to open a project by double-clicking the file if Godot is associated to `.godot` files.
- Some methods from the `OS` singleton were moved to the new `Engine` singleton.
- Switched from [GLEW](http://glew.sourceforge.net/) to [GLAD](http://glad.dav1d.de/) for OpenGL wrapping.
- Changed the SCons build flag for simple logs (`colored=yes``verbose=no`).
- The HTML5 platform now uses WebGL 2.0 (instead of 1.0).
- Redesigned the Godot logo to be more legible at small sizes.
### Deprecated
- `opacity` and `self_opacity` are replaced by `modulate` and `self_modulate` in all 2D nodes, allowing for full color changes in addition to opacity changes.
### Removed
- Skybox support.
- Replaced with panorama skies, which are easier to import.
- Opus audio codec support.
- This is due to the way the new audio engine is designed.
- HTML5 export using asm.js.
- Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly.
[3.0]: https://github.com/godotengine/godot/compare/2.1-stable...3.0-stable

View File

@@ -157,7 +157,7 @@ License: OFL-1.1
Files: ./thirdparty/fonts/Hack_Regular.ttf
Comment: Hack font
Copyright: 2017, Source Foundry Authors
Copyright: 2018, Source Foundry Authors
2003, Bitstream Inc.
License: Expat and Bitstream Vera Fonts Copyright

172
DONORS.md
View File

@@ -18,25 +18,32 @@ generous deed immortalized in the next stable release of Godot Engine.
Gamblify <https://www.gamblify.com>
GameDev.TV <https://www.gamedev.tv>
Skirmish <https://skirmish.io>
## Mini sponsors
Andreas
Brandon Lamb
Christian Uldall Pedersen
Christopher Igoe
Christoph Woinke
Claudiu Dumitru
E Hewert
Hein-Pieter van Braam
Igors Vaitkus
Jamal Alyafei
Jordan M Lucas
Jay Sistar
Matthieu Huvé
Mike King
Nathan Warden
Neal Gompa (Conan Kudo)
Pascal Julien
Ruslan Mustakov
Sébastien Manin
Slobodan Milnovic
Stephan Lanfermann
Stoney Meyerhoeffer
Thomas Mathews
VilliHaukka
## Gold donors
@@ -44,169 +51,240 @@ generous deed immortalized in the next stable release of Godot Engine.
Alexander Otto
Asdf
cheese65536
Jake Bo
K9Kraken
Kris Michael
Manuele Finocchiaro
Nathanael Beisiegel
Officine Pixel S.n.c.
Rémi Verschelde
Zaven Muradyan
Allen Schade
Andreas Schüle
Austen McRae
Benjamin Botwin
Bernhard Liebl
Cody Brocious
Gerald E Butler
Jahn Johansen
Catalin Moldovan
DeepSquid
Fidget Sinner
Florian Breisch
Gary Oberbrunner
Johannes Wuensch
Kris Michael
Josep G. Camarasa
Joshua Lesperance
Libre-Dépanne
Matthew Bennett
Olafur Gislason
Paul LaMotte
Ranoller
Svenne Krap
Timothy Hagberg
BanjoNode2D
Beliar
Chris Serino
Conrad Curry
Craig Smith
Daniel Egger
David Churchill
Dean Harmon
Dexter Miguel
Guilherme Felipe de C. G. da Silva
Henrique Alves
John
Justo Delgado Baudí
KTL
Laurence Bannister
Przemysław Gołąb (n-pigeon)
Rami
Robert Willes
Robin Arys
Ronnie Ashlock
Rufus Xavier Sarsaparilla
ScottMakesGames
summerblind
Testus Maximus
Thomas Bjarnelöf
William Connell
Wojciech Chojnacki
Xavier Tan
Zaq Poi
Alessandra Pereyra
Alexey Dyadchenko
Amanda Haldy
Andreas Haas
Arnaud Verstuyf
Chris Brown
Chris Petrich
Chris Wilson
Cody Parker
Corey Auger
D
Daniel Eliasinski
Daniel Langegger
E.G.
Eric Monson
Ezra Theunissen
flesk
François Cantin
G Barnes
GGGames.org
Giovanni Solimeno
Hasen Judy
Heath Hayes
Jay Horton
Jeppe Zapp
joe513
Jordan M Lucas
Juraj Móza
Justin Arnold
Justo Delgado Baudí
Leandro Voltolino
Lucien Boudy
Lisandro Lorea
Markus Wiesner
Marvin
Mohammad Taleb
Nick Nikitin
Pablo Cholaky
Patrick Schnorbus
Pete Goodwin
Ryan Estes
Phyronnaz
Ruben Soares Luis
Sofox
Stoned Xander
Ted
Travis Womack
Tim Dalporto
Trent McPheron
Vladimir
## Silver donors
1D_Inc
Adam Carr
Adam Smeltzer
Alder Stefano
Alessandro Senese
Alex Barsukov
Álvaro Domínguez López
Andres Cuevas
Anders Jensen-Urstad
Anthony Bongiovanni
Arda Erol
Arthur S. Muszynski
Aubrey Falconer
Avencherus
Bailey
Bastian Böhm
Benedikt
Benjamin Beshara
Ben Vercammen
Blair Allen
Bryanna M
Brandon
Bryan Stevenson
Carwyn Edwards
Casey Foote
Chris Chapin
Christian Baune
Christian Winter
Christopher Schmitt
Collin Shooltz
Daniel Egger
Daniel Delgado Corona
Daniel Johnson
Daniel Kaplan
DanielMaximiano
Daniel Mircea
David
David Cravens
David May
Diego Moreira Guimarães
Dominik Wetzel
Duy Kevin Nguyen
Edward Herbert
Eric Martini
Fabian Becker
fengjiongmax
Francesco Lisi
Fredy Romero Sam
G3Dev sàrl
Geequlim
Gerrit Großkopf
Gerrit Procee
Gilberto K. Otubo
Guldoman
HardRound
HeartBeast
Gumichan01
Heribert Hirth
hubert jenkins
Hunter Jones
ialex32x
Ivan Vodopiviz
Jahn Johansen
Jaime Ruiz-Borau Vizárraga
Jed
Jeff Hungerford
Jerry Chen
Jesse Liles
Joel Fivat
Johan Lindberg
Jonas Rudlang
Jonas Yamazaki
Jonathan Martin
Jonathan Nieto
Jonathon
Josh 'Cheeseness' Bush
Juan Negrier
JuDelCo
Judd
Julian Murgia
Juraj Móza
Karonis
Justin Luk
KC Chan
Kevin Boyer
Kevin Kamper Meejach Petersen
Klavdij Voncina
Krzysztof Jankowski
Lars pfeffer
Linus Lind Lundgren
Lisandro Lorea
Luis Moraes
Macil
magodev
Martin Novák
Martin Eigel
Martins Odabi
Matthew Fitzpatrick
Matthias Hölzl
Max R.R. Collada
memoryruins
Maxwell
mhilbrunner
Michael Dürwald
Michael Gringauz
Michael Labbe
Mikael Olsson
MoM
monokrome
Moritz Laass
Natrim
nee
Neil Blakey-Milner
Nik Lee
Nick Pavlica
Niclas Eriksen
Nicolas SAN AGUSTIN
Niko Leopold
nivardus
Noi Sek
Oleg Tyshchenko
Oleksandr Yemets
Pablo Seibelt
Pan Ip
Pat LaBine
Patrick Nafarrete
Patric Vormstein
Paul Mason
Paweł Kowal
Pierre-Igor Berthet
Pietro Vertechi
Piotr Kaczmarski
Rea
Rémi Verschelde
Richman Stewart
Rodolfo Baeza
Roger Burgess
Roger Smith
Roman Tinkov
Ryan Whited
Samuel El-Borai
Sasori Olkof
Scott D. Yelich
Sootstone
Stephen Traskal
Stefan Butucea
Theo Cranmore
Thomas Norman
Thibault Barbaroux
Thomas Bell
Thomas Kurz
Tomasz Wacławek
Tom Larrow
Tyler Stafos
UltyX
Victor
Victor Gonzalez Fernandez
Viktor Ferenczi
werner mendizabal
Wout Standaert
Xananax & karroffel
Yu He
## Bronze donors

View File

@@ -161,11 +161,11 @@ opts.Add(BoolVariable('xml', "XML format support for resources", True))
# Advanced options
opts.Add(BoolVariable('disable_3d', "Disable 3D nodes for smaller executable", False))
opts.Add(BoolVariable('disable_advanced_gui', "Disable advance 3D gui nodes and behaviors", False))
opts.Add(BoolVariable('disable_advanced_gui', "Disable advanced 3D gui nodes and behaviors", False))
opts.Add('extra_suffix', "Custom extra suffix added to the base filename of all generated binary files", '')
opts.Add('unix_global_settings_path', "UNIX-specific path to system-wide settings. Currently only used for templates", '')
opts.Add(BoolVariable('verbose', "Enable verbose output for the compilation", False))
opts.Add(BoolVariable('vsproj', "Generate Visual Studio Project.", False))
opts.Add(BoolVariable('vsproj', "Generate Visual Studio Project", False))
opts.Add(EnumVariable('warnings', "Set the level of warnings emitted during compilation", 'no', ('extra', 'all', 'moderate', 'no')))
opts.Add(BoolVariable('progress', "Show a progress indicator during build", True))
opts.Add(BoolVariable('dev', "If yes, alias for verbose=yes warnings=all", False))
@@ -353,6 +353,7 @@ if selected_platform in platform_list:
env.Append(CCFLAGS=['-Wall', '-Wno-unused'])
else: # 'no'
env.Append(CCFLAGS=['-w'])
env.Append(CCFLAGS=['-Werror=return-type'])
#env['platform_libsuffix'] = env['LIBSUFFIX']
@@ -445,7 +446,7 @@ if selected_platform in platform_list:
if not env['verbose']:
methods.no_verbose(sys, env)
if (True): # FIXME: detect GLES3
if (not env["platform"] == "server"): # FIXME: detect GLES3
env.Append( BUILDERS = { 'GLES3_GLSL' : env.Builder(action = methods.build_gles3_headers, suffix = 'glsl.gen.h',src_suffix = '.glsl') } )
scons_cache_path = os.environ.get("SCONS_CACHE")
@@ -494,127 +495,118 @@ else:
print("\nPlease run scons again with argument: platform=<string>")
screen = sys.stdout
node_count = 0
node_count_max = 0
node_count_interval = 1
node_pruning = 8 # Number of nodes to process before prunning the cache
if ('env' in locals()):
# The following only makes sense when the env is defined, and assumes it is
if 'env' in locals():
screen = sys.stdout
# Progress reporting is not available in non-TTY environments since it
# messes with the output (for example, when writing to a file)
show_progress = (env['progress'] and sys.stdout.isatty())
node_count = 0
node_count_max = 0
node_count_interval = 1
node_count_fname = str(env.Dir('#')) + '/.scons_node_count'
# Progress reporting is not available in non-TTY environments since it
# messes with the output (for example, when writing to a file)
if sys.stdout.isatty():
show_progress = env['progress']
else:
show_progress = False
import time, math
import time, math
class cache_progress:
# The default is 1 GB cache and 12 hours half life
def __init__(self, path = None, limit = 1073741824, half_life = 43200):
global node_pruning
self.path = path
self.limit = limit
self.exponent_scale = math.log(2) / half_life
if env['verbose'] and path != None:
screen.write('Current cache limit is ' + self.convert_size(limit) + ' (used: ' + self.convert_size(self.get_size(path)) + ')\n')
self.pruning = node_pruning
self.delete(self.file_list())
def __call__(self, node, *args, **kw):
global node_count, node_count_max, node_count_interval, node_count_fname, node_pruning, show_progress
if show_progress:
# Print the progress percentage
node_count += node_count_interval
if (node_count_max > 0 and node_count <= node_count_max):
screen.write('\r[%3d%%] ' % (node_count * 100 / node_count_max))
screen.flush()
elif (node_count_max > 0 and node_count > node_count_max):
screen.write('\r[100%] ')
screen.flush()
else:
screen.write('\r[Initial build] ')
screen.flush()
# Prune if the number of nodes processed is 'node_pruning' or bigger
self.pruning -= node_count_interval
if self.pruning <= 0:
self.pruning = node_pruning
class cache_progress:
# The default is 1 GB cache and 12 hours half life
def __init__(self, path = None, limit = 1073741824, half_life = 43200):
self.path = path
self.limit = limit
self.exponent_scale = math.log(2) / half_life
if env['verbose'] and path != None:
screen.write('Current cache limit is ' + self.convert_size(limit) + ' (used: ' + self.convert_size(self.get_size(path)) + ')\n')
self.delete(self.file_list())
def delete(self, files):
if len(files) == 0:
return
if env['verbose']:
# Utter something
screen.write('\rPurging %d %s from cache...\n' % (len(files), len(files) > 1 and 'files' or 'file'))
map(os.remove, files)
def __call__(self, node, *args, **kw):
global node_count, node_count_max, node_count_interval, node_count_fname, show_progress
if show_progress:
# Print the progress percentage
node_count += node_count_interval
if (node_count_max > 0 and node_count <= node_count_max):
screen.write('\r[%3d%%] ' % (node_count * 100 / node_count_max))
screen.flush()
elif (node_count_max > 0 and node_count > node_count_max):
screen.write('\r[100%] ')
screen.flush()
else:
screen.write('\r[Initial build] ')
screen.flush()
def file_list(self):
if self.path == None:
# Nothing to do
return []
# Gather a list of (filename, (size, atime)) within the
# cache directory
file_stat = [(x, os.stat(x)[6:8]) for x in glob.glob(os.path.join(self.path, '*', '*'))]
if file_stat == []:
# Nothing to do
return []
# Weight the cache files by size (assumed to be roughly
# proportional to the recompilation time) times an exponential
# decay since the ctime, and return a list with the entries
# (filename, size, weight).
current_time = time.time()
file_stat = [(x[0], x[1][0], (current_time - x[1][1])) for x in file_stat]
# Sort by the most resently accessed files (most sensible to keep) first
file_stat.sort(key=lambda x: x[2])
# Search for the first entry where the storage limit is
# reached
sum, mark = 0, None
for i,x in enumerate(file_stat):
sum += x[1]
if sum > self.limit:
mark = i
break
if mark == None:
return []
else:
return [x[0] for x in file_stat[mark:]]
def delete(self, files):
if len(files) == 0:
return
if env['verbose']:
# Utter something
screen.write('\rPurging %d %s from cache...\n' % (len(files), len(files) > 1 and 'files' or 'file'))
[os.remove(f) for f in files]
def convert_size(self, size_bytes):
if size_bytes == 0:
return "0 bytes"
size_name = ("bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
i = int(math.floor(math.log(size_bytes, 1024)))
p = math.pow(1024, i)
s = round(size_bytes / p, 2)
return "%s %s" % (int(s) if i == 0 else s, size_name[i])
def file_list(self):
if self.path == None:
# Nothing to do
return []
# Gather a list of (filename, (size, atime)) within the
# cache directory
file_stat = [(x, os.stat(x)[6:8]) for x in glob.glob(os.path.join(self.path, '*', '*'))]
if file_stat == []:
# Nothing to do
return []
# Weight the cache files by size (assumed to be roughly
# proportional to the recompilation time) times an exponential
# decay since the ctime, and return a list with the entries
# (filename, size, weight).
current_time = time.time()
file_stat = [(x[0], x[1][0], (current_time - x[1][1])) for x in file_stat]
# Sort by the most resently accessed files (most sensible to keep) first
file_stat.sort(key=lambda x: x[2])
# Search for the first entry where the storage limit is
# reached
sum, mark = 0, None
for i,x in enumerate(file_stat):
sum += x[1]
if sum > self.limit:
mark = i
break
if mark == None:
return []
else:
return [x[0] for x in file_stat[mark:]]
def get_size(self, start_path = '.'):
total_size = 0
for dirpath, dirnames, filenames in os.walk(start_path):
for f in filenames:
fp = os.path.join(dirpath, f)
total_size += os.path.getsize(fp)
return total_size
def convert_size(self, size_bytes):
if size_bytes == 0:
return "0 bytes"
size_name = ("bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
i = int(math.floor(math.log(size_bytes, 1024)))
p = math.pow(1024, i)
s = round(size_bytes / p, 2)
return "%s %s" % (int(s) if i == 0 else s, size_name[i])
def progress_finish(target, source, env):
global node_count, progressor
with open(node_count_fname, 'w') as f:
f.write('%d\n' % node_count)
progressor.delete(progressor.file_list())
def get_size(self, start_path = '.'):
total_size = 0
for dirpath, dirnames, filenames in os.walk(start_path):
for f in filenames:
fp = os.path.join(dirpath, f)
total_size += os.path.getsize(fp)
return total_size
try:
with open(node_count_fname) as f:
node_count_max = int(f.readline())
except:
pass
cache_directory = os.environ.get("SCONS_CACHE")
# Simple cache pruning, attached to SCons' progress callback. Trim the
# cache directory to a size not larger than cache_limit.
cache_limit = float(os.getenv("SCONS_CACHE_LIMIT", 1024)) * 1024 * 1024
progressor = cache_progress(cache_directory, cache_limit)
Progress(progressor, interval = node_count_interval)
def progress_finish(target, source, env):
global node_count, progressor
with open(node_count_fname, 'w') as f:
f.write('%d\n' % node_count)
progressor.delete(progressor.file_list())
progress_finish_command = Command('progress_finish', [], progress_finish)
AlwaysBuild(progress_finish_command)
try:
with open(node_count_fname) as f:
node_count_max = int(f.readline())
except:
pass
cache_directory = os.environ.get("SCONS_CACHE")
# Simple cache pruning, attached to SCons' progress callback. Trim the
# cache directory to a size not larger than cache_limit.
cache_limit = float(os.getenv("SCONS_CACHE_LIMIT", 1024)) * 1024 * 1024
progressor = cache_progress(cache_directory, cache_limit)
Progress(progressor, interval = node_count_interval)
progress_finish_command = Command('progress_finish', [], progress_finish)
AlwaysBuild(progress_finish_command)

View File

@@ -264,10 +264,18 @@ Size2 _OS::get_window_size() const {
return OS::get_singleton()->get_window_size();
}
Size2 _OS::get_real_window_size() const {
return OS::get_singleton()->get_real_window_size();
}
void _OS::set_window_size(const Size2 &p_size) {
OS::get_singleton()->set_window_size(p_size);
}
Rect2 _OS::get_window_safe_area() const {
return OS::get_singleton()->get_window_safe_area();
}
void _OS::set_window_fullscreen(bool p_enabled) {
OS::get_singleton()->set_window_fullscreen(p_enabled);
}
@@ -300,6 +308,14 @@ bool _OS::is_window_maximized() const {
return OS::get_singleton()->is_window_maximized();
}
void _OS::set_window_always_on_top(bool p_enabled) {
OS::get_singleton()->set_window_always_on_top(p_enabled);
}
bool _OS::is_window_always_on_top() const {
return OS::get_singleton()->is_window_always_on_top();
}
void _OS::set_borderless_window(bool p_borderless) {
OS::get_singleton()->set_borderless_window(p_borderless);
}
@@ -607,8 +623,8 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
unsigned int second = ((datetime.has(SECOND_KEY)) ? static_cast<unsigned int>(datetime[SECOND_KEY]) : 0);
unsigned int minute = ((datetime.has(MINUTE_KEY)) ? static_cast<unsigned int>(datetime[MINUTE_KEY]) : 0);
unsigned int hour = ((datetime.has(HOUR_KEY)) ? static_cast<unsigned int>(datetime[HOUR_KEY]) : 0);
unsigned int day = ((datetime.has(DAY_KEY)) ? static_cast<unsigned int>(datetime[DAY_KEY]) : 0);
unsigned int month = ((datetime.has(MONTH_KEY)) ? static_cast<unsigned int>(datetime[MONTH_KEY]) - 1 : 0);
unsigned int day = ((datetime.has(DAY_KEY)) ? static_cast<unsigned int>(datetime[DAY_KEY]) : 1);
unsigned int month = ((datetime.has(MONTH_KEY)) ? static_cast<unsigned int>(datetime[MONTH_KEY]) : 1);
unsigned int year = ((datetime.has(YEAR_KEY)) ? static_cast<unsigned int>(datetime[YEAR_KEY]) : 0);
/// How many days come before each month (0-12)
@@ -628,15 +644,15 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
ERR_EXPLAIN("Invalid hour value of: " + itos(hour));
ERR_FAIL_COND_V(hour > 23, 0);
ERR_EXPLAIN("Invalid month value of: " + itos(month + 1));
ERR_FAIL_COND_V(month + 1 > 12, 0);
ERR_EXPLAIN("Invalid month value of: " + itos(month));
ERR_FAIL_COND_V(month > 12 || month == 0, 0);
// Do this check after month is tested as valid
ERR_EXPLAIN("Invalid day value of: " + itos(day) + " which is larger than " + itos(MONTH_DAYS_TABLE[LEAPYEAR(year)][month]));
ERR_FAIL_COND_V(day > MONTH_DAYS_TABLE[LEAPYEAR(year)][month], 0);
ERR_EXPLAIN("Invalid day value of: " + itos(day) + " which is larger than " + itos(MONTH_DAYS_TABLE[LEAPYEAR(year)][month - 1]) + " or 0");
ERR_FAIL_COND_V(day > MONTH_DAYS_TABLE[LEAPYEAR(year)][month - 1] || day == 0, 0);
// Calculate all the seconds from months past in this year
uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR = DAYS_PAST_THIS_YEAR_TABLE[LEAPYEAR(year)][month] * SECONDS_PER_DAY;
uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR = DAYS_PAST_THIS_YEAR_TABLE[LEAPYEAR(year)][month - 1] * SECONDS_PER_DAY;
uint64_t SECONDS_FROM_YEARS_PAST = 0;
for (unsigned int iyear = EPOCH_YR; iyear < year; iyear++) {
@@ -929,6 +945,11 @@ void _OS::request_attention() {
OS::get_singleton()->request_attention();
}
void _OS::center_window() {
OS::get_singleton()->center_window();
}
bool _OS::is_debug_build() const {
#ifdef DEBUG_ENABLED
@@ -1008,6 +1029,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_window_position", "position"), &_OS::set_window_position);
ClassDB::bind_method(D_METHOD("get_window_size"), &_OS::get_window_size);
ClassDB::bind_method(D_METHOD("set_window_size", "size"), &_OS::set_window_size);
ClassDB::bind_method(D_METHOD("get_window_safe_area"), &_OS::get_window_safe_area);
ClassDB::bind_method(D_METHOD("set_window_fullscreen", "enabled"), &_OS::set_window_fullscreen);
ClassDB::bind_method(D_METHOD("is_window_fullscreen"), &_OS::is_window_fullscreen);
ClassDB::bind_method(D_METHOD("set_window_resizable", "enabled"), &_OS::set_window_resizable);
@@ -1016,7 +1038,11 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_window_minimized"), &_OS::is_window_minimized);
ClassDB::bind_method(D_METHOD("set_window_maximized", "enabled"), &_OS::set_window_maximized);
ClassDB::bind_method(D_METHOD("is_window_maximized"), &_OS::is_window_maximized);
ClassDB::bind_method(D_METHOD("set_window_always_on_top", "enabled"), &_OS::set_window_always_on_top);
ClassDB::bind_method(D_METHOD("is_window_always_on_top"), &_OS::is_window_always_on_top);
ClassDB::bind_method(D_METHOD("request_attention"), &_OS::request_attention);
ClassDB::bind_method(D_METHOD("get_real_window_size"), &_OS::get_real_window_size);
ClassDB::bind_method(D_METHOD("center_window"), &_OS::center_window);
ClassDB::bind_method(D_METHOD("set_borderless_window", "borderless"), &_OS::set_borderless_window);
ClassDB::bind_method(D_METHOD("get_borderless_window"), &_OS::get_borderless_window);
@@ -1493,6 +1519,17 @@ bool _File::is_open() const {
return f != NULL;
}
String _File::get_path() const {
ERR_FAIL_COND_V(!f, "");
return f->get_path();
}
String _File::get_path_absolute() const {
ERR_FAIL_COND_V(!f, "");
return f->get_path_absolute();
}
void _File::seek(int64_t p_position) {
@@ -1782,6 +1819,8 @@ void _File::_bind_methods() {
ClassDB::bind_method(D_METHOD("open", "path", "flags"), &_File::open);
ClassDB::bind_method(D_METHOD("close"), &_File::close);
ClassDB::bind_method(D_METHOD("get_path"), &_File::get_path);
ClassDB::bind_method(D_METHOD("get_path_absolute"), &_File::get_path_absolute);
ClassDB::bind_method(D_METHOD("is_open"), &_File::is_open);
ClassDB::bind_method(D_METHOD("seek", "position"), &_File::seek);
ClassDB::bind_method(D_METHOD("seek_end", "position"), &_File::seek_end, DEFVAL(0));
@@ -2353,7 +2392,7 @@ _Thread::_Thread() {
_Thread::~_Thread() {
if (active) {
ERR_EXPLAIN("Reference to a Thread object object was lost while the thread is still running..");
ERR_EXPLAIN("Reference to a Thread object object was lost while the thread is still running...");
}
ERR_FAIL_COND(active == true);
}

View File

@@ -155,6 +155,8 @@ public:
virtual Point2 get_window_position() const;
virtual void set_window_position(const Point2 &p_position);
virtual Size2 get_window_size() const;
virtual Size2 get_real_window_size() const;
virtual Rect2 get_window_safe_area() const;
virtual void set_window_size(const Size2 &p_size);
virtual void set_window_fullscreen(bool p_enabled);
virtual bool is_window_fullscreen() const;
@@ -164,7 +166,10 @@ public:
virtual bool is_window_minimized() const;
virtual void set_window_maximized(bool p_enabled);
virtual bool is_window_maximized() const;
virtual void set_window_always_on_top(bool p_enabled);
virtual bool is_window_always_on_top() const;
virtual void request_attention();
virtual void center_window();
virtual void set_borderless_window(bool p_borderless);
virtual bool get_borderless_window() const;
@@ -405,6 +410,9 @@ public:
void close(); ///< close a file
bool is_open() const; ///< true when file is open
String get_path() const; /// returns the path for the current open file
String get_path_absolute() const; /// returns the absolute path for the current open file
void seek(int64_t p_position); ///< seek to a given position
void seek_end(int64_t p_position = 0); ///< seek from the end of file
int64_t get_position() const; ///< get position in the file

View File

@@ -207,6 +207,47 @@ MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_
return md;
}
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12) {
MethodDefinition md;
md.name = StaticCString::create(p_name);
md.args.resize(12);
md.args[0] = StaticCString::create(p_arg1);
md.args[1] = StaticCString::create(p_arg2);
md.args[2] = StaticCString::create(p_arg3);
md.args[3] = StaticCString::create(p_arg4);
md.args[4] = StaticCString::create(p_arg5);
md.args[5] = StaticCString::create(p_arg6);
md.args[6] = StaticCString::create(p_arg7);
md.args[7] = StaticCString::create(p_arg8);
md.args[8] = StaticCString::create(p_arg9);
md.args[9] = StaticCString::create(p_arg10);
md.args[10] = StaticCString::create(p_arg11);
md.args[11] = StaticCString::create(p_arg12);
return md;
}
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12, const char *p_arg13) {
MethodDefinition md;
md.name = StaticCString::create(p_name);
md.args.resize(13);
md.args[0] = StaticCString::create(p_arg1);
md.args[1] = StaticCString::create(p_arg2);
md.args[2] = StaticCString::create(p_arg3);
md.args[3] = StaticCString::create(p_arg4);
md.args[4] = StaticCString::create(p_arg5);
md.args[5] = StaticCString::create(p_arg6);
md.args[6] = StaticCString::create(p_arg7);
md.args[7] = StaticCString::create(p_arg8);
md.args[8] = StaticCString::create(p_arg9);
md.args[9] = StaticCString::create(p_arg10);
md.args[10] = StaticCString::create(p_arg11);
md.args[11] = StaticCString::create(p_arg12);
md.args[12] = StaticCString::create(p_arg13);
return md;
}
#endif
ClassDB::APIType ClassDB::current_api = API_CORE;
@@ -306,7 +347,7 @@ uint64_t ClassDB::get_api_hash(APIType p_api) {
OBJTYPE_RLOCK;
#ifdef DEBUG_METHODS_ENABLED
uint64_t hash = hash_djb2_one_64(HashMapHasherDefault::hash(VERSION_FULL_NAME));
uint64_t hash = hash_djb2_one_64(HashMapHasherDefault::hash(VERSION_FULL_CONFIG));
List<StringName> names;
@@ -323,7 +364,7 @@ uint64_t ClassDB::get_api_hash(APIType p_api) {
ClassInfo *t = classes.getptr(E->get());
ERR_FAIL_COND_V(!t, 0);
if (t->api != p_api)
if (t->api != p_api || !t->exposed)
continue;
hash = hash_djb2_one_64(t->name.hash(), hash);
hash = hash_djb2_one_64(t->inherits.hash(), hash);

View File

@@ -68,6 +68,8 @@ MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9);
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10);
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11);
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12);
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12, const char *p_arg13);
#else

View File

@@ -55,7 +55,7 @@
#define _COMMA_11 ,
#define _COMMA_12 ,
// 1-based comma separed list of ITEMs
// 1-based comma separated list of ITEMs
#define COMMA_SEP_LIST(ITEM, LENGTH) _COMMA_SEP_LIST_##LENGTH(ITEM)
#define _COMMA_SEP_LIST_12(ITEM) \
_COMMA_SEP_LIST_11(ITEM) \
@@ -95,7 +95,7 @@
ITEM(1)
#define _COMMA_SEP_LIST_0(ITEM)
// 1-based semicolon separed list of ITEMs
// 1-based semicolon separated list of ITEMs
#define SEMIC_SEP_LIST(ITEM, LENGTH) _SEMIC_SEP_LIST_##LENGTH(ITEM)
#define _SEMIC_SEP_LIST_12(ITEM) \
_SEMIC_SEP_LIST_11(ITEM); \
@@ -135,7 +135,7 @@
ITEM(1)
#define _SEMIC_SEP_LIST_0(ITEM)
// 1-based space separed list of ITEMs
// 1-based space separated list of ITEMs
#define SPACE_SEP_LIST(ITEM, LENGTH) _SPACE_SEP_LIST_##LENGTH(ITEM)
#define _SPACE_SEP_LIST_12(ITEM) \
_SPACE_SEP_LIST_11(ITEM) \
@@ -309,9 +309,9 @@ class CommandQueueMT {
};
uint8_t command_mem[COMMAND_MEM_SIZE];
uint32_t read_ptr;
uint32_t write_ptr;
uint32_t dealloc_ptr;
uint32_t read_ptr = 0;
uint32_t write_ptr = 0;
uint32_t dealloc_ptr = 0;
SyncSemaphore sync_sems[SYNC_SEMAPHORES];
Mutex *mutex;
Semaphore *sync;

View File

@@ -38,7 +38,7 @@ class PHashTranslation : public Translation {
GDCLASS(PHashTranslation, Translation);
//this translation uses a sort of modified perfect hash algorithm
//it requieres hashing strings twice and then does a binary search,
//it requires hashing strings twice and then does a binary search,
//so it's slower, but at the same time it has an extreemly high chance
//of catching untranslated strings

View File

@@ -33,7 +33,7 @@
#include "typedefs.h"
/**
* Error macros. Unlike exceptions and asserts, these macros try to mantain consistency and stability
* Error macros. Unlike exceptions and asserts, these macros try to maintain consistency and stability
* inside the code. It is recommended to always return processable data, so in case of an error, the
* engine can stay working well.
* In most cases, bugs and/or invalid data are not fatal and should never allow a perfectly running application

View File

@@ -580,7 +580,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
//comparation
//comparison
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_EQUAL", Variant::OP_EQUAL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_NOT_EQUAL", Variant::OP_NOT_EQUAL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_LESS", Variant::OP_LESS);

View File

@@ -1166,6 +1166,9 @@ PoolVector<uint8_t> Image::get_data() const {
void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_format) {
ERR_FAIL_INDEX(p_width - 1, MAX_WIDTH);
ERR_FAIL_INDEX(p_height - 1, MAX_HEIGHT);
int mm = 0;
int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0);
data.resize(size);

View File

@@ -83,7 +83,7 @@ int64_t FileAccessNetworkClient::get_64() {
void FileAccessNetworkClient::_thread_func() {
client->set_nodelay(true);
client->set_no_delay(true);
while (!quit) {
DEBUG_PRINT("SEM WAIT - " + itos(sem->get()));
@@ -418,8 +418,6 @@ int FileAccessNetwork::get_buffer(uint8_t *p_dst, int p_length) const {
if (page != last_page) {
buffer_mutex->lock();
if (pages[page].buffer.empty()) {
//fuck
waiting_on_page = page;
for (int j = 0; j < read_ahead; j++) {

View File

@@ -88,7 +88,11 @@ void PackedData::add_path(const String &pkg_path, const String &path, uint64_t o
}
}
}
cd->files.insert(path.get_file());
String filename = path.get_file();
// Don't add as a file if the path points to a directoryy
if (!filename.empty()) {
cd->files.insert(filename);
}
}
}

View File

@@ -298,7 +298,7 @@ Error HTTPClient::poll() {
case StreamPeerTCP::STATUS_CONNECTED: {
if (ssl) {
Ref<StreamPeerSSL> ssl = StreamPeerSSL::create();
Error err = ssl->connect_to_stream(tcp_connection, ssl_verify_host, ssl_verify_host ? conn_host : String());
Error err = ssl->connect_to_stream(tcp_connection, ssl_verify_host, conn_host);
if (err != OK) {
close();
status = STATUS_SSL_HANDSHAKE_ERROR;
@@ -618,7 +618,27 @@ String HTTPClient::query_string_from_dict(const Dictionary &p_dict) {
String query = "";
Array keys = p_dict.keys();
for (int i = 0; i < keys.size(); ++i) {
query += "&" + String(keys[i]).http_escape() + "=" + String(p_dict[keys[i]]).http_escape();
String encoded_key = String(keys[i]).http_escape();
Variant value = p_dict[keys[i]];
switch (value.get_type()) {
case Variant::ARRAY: {
// Repeat the key with every values
Array values = value;
for (int j = 0; j < values.size(); ++j) {
query += "&" + encoded_key + "=" + String(values[j]).http_escape();
}
break;
}
case Variant::NIL: {
// Add the key with no value
query += "&" + encoded_key;
break;
}
default: {
// Add the key-value pair
query += "&" + encoded_key + "=" + String(value).http_escape();
}
}
}
query.erase(0, 1);
return query;

View File

@@ -37,7 +37,7 @@ bool ImageFormatLoader::recognize(const String &p_extension) const {
get_recognized_extensions(&extensions);
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
if (E->get().nocasecmp_to(p_extension.get_extension()) == 0)
if (E->get().nocasecmp_to(p_extension) == 0)
return true;
}

View File

@@ -211,7 +211,7 @@ IP_Address::IP_Address(const String &p_string) {
clear();
if (p_string == "*") {
// Wildcard (not a vaild IP)
// Wildcard (not a valid IP)
wildcard = true;
} else if (p_string.find(":") >= 0) {

View File

@@ -813,7 +813,7 @@ static void _encode_string(const String &p_string, uint8_t *&buf, int &r_len) {
while (r_len % 4) {
r_len++; //pad
if (buf) {
buf++;
*(buf++) = 0;
}
}
}

View File

@@ -29,8 +29,8 @@
/*************************************************************************/
#include "pck_packer.h"
#include "core/os/file_access.h"
#include "version.h"
static uint64_t _align(uint64_t p_n, int p_alignment) {
@@ -70,9 +70,9 @@ Error PCKPacker::pck_start(const String &p_file, int p_alignment) {
alignment = p_alignment;
file->store_32(0x43504447); // MAGIC
file->store_32(0); // # version
file->store_32(0); // # major
file->store_32(0); // # minor
file->store_32(1); // # version
file->store_32(VERSION_MAJOR); // # major
file->store_32(VERSION_MINOR); // # minor
file->store_32(0); // # revision
for (int i = 0; i < 16; i++) {

View File

@@ -1124,7 +1124,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
da->remove(p_path + ".depren");
memdelete(da);
//fuck it, use the old approach;
//use the old approach
WARN_PRINT(("This file is old, so it can't refactor dependencies, opening and resaving: " + p_path).utf8().get_data());

View File

@@ -56,7 +56,7 @@ Error ResourceSaver::save(const String &p_path, const RES &p_resource, uint32_t
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
if (E->get().nocasecmp_to(extension.get_extension()) == 0)
if (E->get().nocasecmp_to(extension) == 0)
recognized = true;
}

View File

@@ -310,7 +310,7 @@ float StreamPeer::get_float() {
return decode_float(buf);
}
float StreamPeer::get_double() {
double StreamPeer::get_double() {
uint8_t buf[8];
get_data(buf, 8);

View File

@@ -83,7 +83,7 @@ public:
uint64_t get_u64();
int64_t get_64();
float get_float();
float get_double();
double get_double();
String get_string(int p_bytes);
String get_utf8_string(int p_bytes);
Variant get_var();

View File

@@ -55,6 +55,7 @@ void StreamPeerTCP::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_connected_host"), &StreamPeerTCP::get_connected_host);
ClassDB::bind_method(D_METHOD("get_connected_port"), &StreamPeerTCP::get_connected_port);
ClassDB::bind_method(D_METHOD("disconnect_from_host"), &StreamPeerTCP::disconnect_from_host);
ClassDB::bind_method(D_METHOD("set_no_delay", "enabled"), &StreamPeerTCP::set_no_delay);
BIND_ENUM_CONSTANT(STATUS_NONE);
BIND_ENUM_CONSTANT(STATUS_CONNECTING);

View File

@@ -65,7 +65,7 @@ public:
virtual void disconnect_from_host() = 0;
virtual IP_Address get_connected_host() const = 0;
virtual uint16_t get_connected_port() const = 0;
virtual void set_nodelay(bool p_enabled) = 0;
virtual void set_no_delay(bool p_enabled) = 0;
static Ref<StreamPeerTCP> create_ref();
static StreamPeerTCP *create();

View File

@@ -244,7 +244,7 @@ def make_version(template, nargs, argmax, const, ret):
def run(target, source, env):
versions = 11
versions = 13
versions_ext = 6
text = ""
text_ext = ""

View File

@@ -197,7 +197,7 @@ private:
if (node->right != _data._nil) {
node = node->right;
while (node->left != _data._nil) { /* returns the minium of the right subtree of node */
while (node->left != _data._nil) { /* returns the minimum of the right subtree of node */
node = node->left;
}
return node;
@@ -219,7 +219,7 @@ private:
if (node->left != _data._nil) {
node = node->left;
while (node->right != _data._nil) { /* returns the minium of the left subtree of node */
while (node->right != _data._nil) { /* returns the minimum of the left subtree of node */
node = node->right;
}
return node;

View File

@@ -108,6 +108,16 @@ Vector2 Vector2::floor() const {
return Vector2(Math::floor(x), Math::floor(y));
}
Vector2 Vector2::ceil() const {
return Vector2(Math::ceil(x), Math::ceil(y));
}
Vector2 Vector2::round() const {
return Vector2(Math::round(x), Math::round(y));
}
Vector2 Vector2::rotated(real_t p_by) const {
Vector2 v;

View File

@@ -163,6 +163,8 @@ struct Vector2 {
}
Vector2 floor() const;
Vector2 ceil() const;
Vector2 round() const;
Vector2 snapped(const Vector2 &p_by) const;
real_t aspect() const { return width / height; }
@@ -304,7 +306,7 @@ struct Rect2 {
inline real_t distance_to(const Vector2 &p_point) const {
real_t dist;
real_t dist = 0.0;
bool inside = true;
if (p_point.x < position.x) {

View File

@@ -89,7 +89,7 @@ void Quat::set_euler_yxz(const Vector3 &p_euler) {
set(sin_a1 * cos_a2 * sin_a3 + cos_a1 * sin_a2 * cos_a3,
sin_a1 * cos_a2 * cos_a3 - cos_a1 * sin_a2 * sin_a3,
-sin_a1 * sin_a2 * cos_a3 + cos_a1 * sin_a2 * sin_a3,
-sin_a1 * sin_a2 * cos_a3 + cos_a1 * cos_a2 * sin_a3,
sin_a1 * sin_a2 * sin_a3 + cos_a1 * cos_a2 * cos_a3);
}

View File

@@ -51,7 +51,8 @@ real_t Triangulate::get_area(const Vector<Vector2> &contour) {
bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
real_t Bx, real_t By,
real_t Cx, real_t Cy,
real_t Px, real_t Py)
real_t Px, real_t Py,
bool include_edges)
{
real_t ax, ay, bx, by, cx, cy, apx, apy, bpx, bpy, cpx, cpy;
@@ -74,10 +75,14 @@ bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
cCROSSap = cx * apy - cy * apx;
bCROSScp = bx * cpy - by * cpx;
return ((aCROSSbp >= 0.0) && (bCROSScp >= 0.0) && (cCROSSap >= 0.0));
if (include_edges) {
return ((aCROSSbp > 0.0) && (bCROSScp > 0.0) && (cCROSSap > 0.0));
} else {
return ((aCROSSbp >= 0.0) && (bCROSScp >= 0.0) && (cCROSSap >= 0.0));
}
};
bool Triangulate::snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V) {
bool Triangulate::snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V, bool relaxed) {
int p;
real_t Ax, Ay, Bx, By, Cx, Cy, Px, Py;
const Vector2 *contour = &p_contour[0];
@@ -91,13 +96,20 @@ bool Triangulate::snip(const Vector<Vector2> &p_contour, int u, int v, int w, in
Cx = contour[V[w]].x;
Cy = contour[V[w]].y;
if (CMP_EPSILON > (((Bx - Ax) * (Cy - Ay)) - ((By - Ay) * (Cx - Ax)))) return false;
// It can happen that the triangulation ends up with three aligned vertices to deal with.
// In this scenario, making the check below strict may reject the possibility of
// forming a last triangle with these aligned vertices, preventing the triangulatiom
// from completing.
// To avoid that we allow zero-area triangles if all else failed.
float threshold = relaxed ? -CMP_EPSILON : CMP_EPSILON;
if (threshold > (((Bx - Ax) * (Cy - Ay)) - ((By - Ay) * (Cx - Ax)))) return false;
for (p = 0; p < n; p++) {
if ((p == u) || (p == v) || (p == w)) continue;
Px = contour[V[p]].x;
Py = contour[V[p]].y;
if (is_inside_triangle(Ax, Ay, Bx, By, Cx, Cy, Px, Py)) return false;
if (is_inside_triangle(Ax, Ay, Bx, By, Cx, Cy, Px, Py, relaxed)) return false;
}
return true;
@@ -121,6 +133,8 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour, Vector<int> &resul
for (int v = 0; v < n; v++)
V[v] = (n - 1) - v;
bool relaxed = false;
int nv = n;
/* remove nv-2 Vertices, creating 1 triangle every time */
@@ -129,8 +143,20 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour, Vector<int> &resul
for (int v = nv - 1; nv > 2;) {
/* if we loop, it is probably a non-simple polygon */
if (0 >= (count--)) {
//** Triangulate: ERROR - probable bad polygon!
return false;
if (relaxed) {
//** Triangulate: ERROR - probable bad polygon!
return false;
} else {
// There may be aligned vertices that the strict
// checks prevent from triangulating. In this situation
// we are better off adding flat triangles than
// failing, so we relax the checks and try one last
// round.
// Only relaxing the constraints as a last resort avoids
// degenerate triangles when they aren't necessary.
count = 2 * nv;
relaxed = true;
}
}
/* three consecutive vertices in current polygon, <u,v,w> */
@@ -141,7 +167,7 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour, Vector<int> &resul
int w = v + 1;
if (nv <= w) w = 0; /* next */
if (snip(contour, u, v, w, nv, V)) {
if (snip(contour, u, v, w, nv, V, relaxed)) {
int a, b, c, s, t;
/* true names of the vertices */

View File

@@ -51,10 +51,11 @@ public:
static bool is_inside_triangle(real_t Ax, real_t Ay,
real_t Bx, real_t By,
real_t Cx, real_t Cy,
real_t Px, real_t Py);
real_t Px, real_t Py,
bool include_edges);
private:
static bool snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V);
static bool snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V, bool relaxed);
};
#endif

View File

@@ -103,6 +103,7 @@ struct Vector3 {
_FORCE_INLINE_ Vector3 floor() const;
_FORCE_INLINE_ Vector3 sign() const;
_FORCE_INLINE_ Vector3 ceil() const;
_FORCE_INLINE_ Vector3 round() const;
_FORCE_INLINE_ real_t distance_to(const Vector3 &p_b) const;
_FORCE_INLINE_ real_t distance_squared_to(const Vector3 &p_b) const;
@@ -204,6 +205,11 @@ Vector3 Vector3::ceil() const {
return Vector3(Math::ceil(x), Math::ceil(y), Math::ceil(z));
}
Vector3 Vector3::round() const {
return Vector3(Math::round(x), Math::round(y), Math::round(z));
}
Vector3 Vector3::linear_interpolate(const Vector3 &p_b, real_t p_t) const {
return Vector3(

View File

@@ -278,7 +278,7 @@ void MessageQueue::flush() {
while (read_pos < buffer_end) {
//lock on each interation, so a call can re-add itself to the message queue
//lock on each iteration, so a call can re-add itself to the message queue
Message *message = (Message *)&buffer[read_pos];

View File

@@ -301,8 +301,8 @@ Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) {
FileAccess *fsrc = FileAccess::open(p_from, FileAccess::READ, &err);
if (err) {
ERR_FAIL_COND_V(err, err);
ERR_PRINTS("Failed to open " + p_from);
return err;
}
FileAccess *fdst = FileAccess::open(p_to, FileAccess::WRITE, &err);
@@ -310,7 +310,8 @@ Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) {
fsrc->close();
memdelete(fsrc);
ERR_FAIL_COND_V(err, err);
ERR_PRINTS("Failed to open " + p_to);
return err;
}
fsrc->seek_end(0);

View File

@@ -479,6 +479,9 @@ void FileAccess::store_double(double p_dest) {
uint64_t FileAccess::get_modified_time(const String &p_file) {
if (PackedData::get_singleton() && !PackedData::get_singleton()->is_disabled() && PackedData::get_singleton()->has_path(p_file))
return 0;
FileAccess *fa = create_for_path(p_file);
ERR_FAIL_COND_V(!fa, 0);

View File

@@ -89,6 +89,9 @@ public:
virtual void close() = 0; ///< close a file
virtual bool is_open() const = 0; ///< true when file is open
virtual String get_path() const { return ""; } /// returns the path for the current open file
virtual String get_path_absolute() const { return ""; } /// returns the absolute path for the current open file
virtual void seek(size_t p_position) = 0; ///< seek to a given position
virtual void seek_end(int64_t p_position = 0) = 0; ///< seek from the end of file
virtual size_t get_position() const = 0; ///< get position in the file

View File

@@ -118,6 +118,7 @@ public:
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
virtual bool is_emulating_touchscreen() const = 0;
virtual bool is_emulating_mouse_from_touch() 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;

View File

@@ -962,6 +962,11 @@ Ref<InputEvent> InputEventMagnifyGesture::xformed_by(const Transform2D &p_xform,
return ev;
}
String InputEventMagnifyGesture::as_text() const {
return "InputEventMagnifyGesture : factor=" + rtos(get_factor()) + ", position=(" + String(get_position()) + ")";
}
void InputEventMagnifyGesture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_factor", "factor"), &InputEventMagnifyGesture::set_factor);
@@ -999,6 +1004,11 @@ Ref<InputEvent> InputEventPanGesture::xformed_by(const Transform2D &p_xform, con
return ev;
}
String InputEventPanGesture::as_text() const {
return "InputEventPanGesture : delta=(" + String(get_delta()) + "), position=(" + String(get_position()) + ")";
}
void InputEventPanGesture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_delta", "delta"), &InputEventPanGesture::set_delta);

View File

@@ -494,6 +494,7 @@ public:
real_t get_factor() const;
virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
virtual String as_text() const;
InputEventMagnifyGesture();
};
@@ -511,6 +512,7 @@ public:
Vector2 get_delta() const;
virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
virtual String as_text() const;
InputEventPanGesture();
};

View File

@@ -616,6 +616,17 @@ bool OS::has_feature(const String &p_feature) {
return false;
}
void OS::center_window() {
if (is_window_fullscreen()) return;
Size2 scr = get_screen_size(get_current_screen());
Size2 wnd = get_real_window_size();
int x = scr.width / 2 - wnd.width / 2;
int y = scr.height / 2 - wnd.height / 2;
set_window_position(Vector2(x, y));
}
OS::OS() {
void *volatile stack_bottom;

View File

@@ -94,15 +94,17 @@ public:
bool resizable;
bool borderless_window;
bool maximized;
bool always_on_top;
bool use_vsync;
float get_aspect() const { return (float)width / (float)height; }
VideoMode(int p_width = 1024, int p_height = 600, bool p_fullscreen = false, bool p_resizable = true, bool p_borderless_window = false, bool p_maximized = false, bool p_use_vsync = false) {
VideoMode(int p_width = 1024, int p_height = 600, bool p_fullscreen = false, bool p_resizable = true, bool p_borderless_window = false, bool p_maximized = false, bool p_always_on_top = false, bool p_use_vsync = false) {
width = p_width;
height = p_height;
fullscreen = p_fullscreen;
resizable = p_resizable;
borderless_window = p_borderless_window;
maximized = p_maximized;
always_on_top = p_always_on_top;
use_vsync = p_use_vsync;
}
};
@@ -182,6 +184,7 @@ public:
virtual Point2 get_window_position() const { return Vector2(); }
virtual void set_window_position(const Point2 &p_position) {}
virtual Size2 get_window_size() const = 0;
virtual Size2 get_real_window_size() const { return get_window_size(); }
virtual void set_window_size(const Size2 p_size) {}
virtual void set_window_fullscreen(bool p_enabled) {}
virtual bool is_window_fullscreen() const { return true; }
@@ -191,7 +194,22 @@ public:
virtual bool is_window_minimized() const { return false; }
virtual void set_window_maximized(bool p_enabled) {}
virtual bool is_window_maximized() const { return true; }
virtual void set_window_always_on_top(bool p_enabled) {}
virtual bool is_window_always_on_top() const { return false; }
virtual void request_attention() {}
virtual void center_window();
// Returns window area free of hardware controls and other obstacles.
// The application should use this to determine where to place UI elements.
//
// Keep in mind the area returned is in window coordinates rather than
// viewport coordinates - you should perform the conversion on your own.
//
// The maximum size of the area is Rect2(0, 0, window_size.width, window_size.height).
virtual Rect2 get_window_safe_area() const {
Size2 window_size = get_window_size();
return Rect2(0, 0, window_size.width, window_size.height);
}
virtual void set_borderless_window(bool p_borderless) {}
virtual bool get_borderless_window() { return 0; }

View File

@@ -90,7 +90,7 @@ bool PoolAllocator::find_hole(EntryArrayPos *p_pos, int p_for_size) {
int hole_size = entry.pos - prev_entry_end_pos;
/* detemine if what we want fits in that hole */
/* determine if what we want fits in that hole */
if (hole_size >= p_for_size) {
*p_pos = i;
return true;
@@ -100,7 +100,7 @@ bool PoolAllocator::find_hole(EntryArrayPos *p_pos, int p_for_size) {
prev_entry_end_pos = entry_end(entry);
}
/* No holes between entrys, check at the end..*/
/* No holes between entries, check at the end..*/
if ((pool_size - prev_entry_end_pos) >= p_for_size) {
*p_pos = entry_count;

View File

@@ -268,12 +268,12 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
if (FileAccessNetworkClient::get_singleton()) {
if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
_load_settings("res://override.cfg");
Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
if (err == OK) {
// Optional, we don't mind if it fails
_load_settings_text("res://override.cfg");
}
return OK;
return err;
}
String exec_path = OS::get_singleton()->get_executable_path();
@@ -285,12 +285,13 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
bool ok = _load_resource_pack(p_main_pack);
ERR_FAIL_COND_V(!ok, ERR_CANT_OPEN);
if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
//load override from location of the main pack
_load_settings(p_main_pack.get_base_dir().plus_file("override.cfg"));
Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
if (err == OK) {
// Load override from location of the main pack
// Optional, we don't mind if it fails
_load_settings_text(p_main_pack.get_base_dir().plus_file("override.cfg"));
}
return OK;
return err;
}
//Attempt with execname.pck
@@ -313,12 +314,13 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
// if we opened our package, try and load our project...
if (found) {
if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
// load override from location of executable
_load_settings(exec_path.get_base_dir().plus_file("override.cfg"));
Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
if (err == OK) {
// Load override from location of executable
// Optional, we don't mind if it fails
_load_settings_text(exec_path.get_base_dir().plus_file("override.cfg"));
}
return OK;
return err;
}
}
@@ -334,11 +336,13 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
// data.pck and data.zip are deprecated and no longer supported, apologies.
// make sure this is loaded from the resource path
if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
_load_settings("res://override.cfg");
Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
if (err == OK) {
// Optional, we don't mind if it fails
_load_settings_text("res://override.cfg");
}
return OK;
return err;
}
//Nothing was found, try to find a project.godot somewhere!
@@ -350,20 +354,23 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
String candidate = d->get_current_dir();
String current_dir = d->get_current_dir();
bool found = false;
Error err;
while (true) {
//try to load settings in ascending through dirs shape!
if (_load_settings(current_dir + "/project.godot") == OK || _load_settings_binary(current_dir + "/project.binary") == OK) {
_load_settings(current_dir + "/override.cfg");
err = _load_settings_text_or_binary(current_dir.plus_file("project.godot"), current_dir.plus_file("project.binary"));
if (err == OK) {
// Optional, we don't mind if it fails
_load_settings_text(current_dir.plus_file("override.cfg"));
candidate = current_dir;
found = true;
break;
}
if (p_upwards) {
// Try to load settings ascending through dirs shape!
d->change_dir("..");
if (d->get_current_dir() == current_dir)
break; //not doing anything useful
@@ -378,7 +385,7 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
memdelete(d);
if (!found)
return ERR_FILE_NOT_FOUND;
return err;
if (resource_path.length() && resource_path[resource_path.length() - 1] == '/')
resource_path = resource_path.substr(0, resource_path.length() - 1); // chop end
@@ -440,13 +447,17 @@ Error ProjectSettings::_load_settings_binary(const String p_path) {
return OK;
}
Error ProjectSettings::_load_settings(const String p_path) {
Error ProjectSettings::_load_settings_text(const String p_path) {
Error err;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
if (!f)
return ERR_CANT_OPEN;
if (!f) {
// FIXME: Above 'err' error code is ERR_FILE_CANT_OPEN if the file is missing
// This needs to be streamlined if we want decent error reporting
return ERR_FILE_NOT_FOUND;
}
VariantParser::StreamFile stream;
stream.f = f;
@@ -471,7 +482,7 @@ Error ProjectSettings::_load_settings(const String p_path) {
memdelete(f);
return OK;
} else if (err != OK) {
ERR_PRINTS("ProjectSettings::load - " + p_path + ":" + itos(lines) + " error: " + error_text);
ERR_PRINTS("Error parsing " + p_path + " at line " + itos(lines) + ": " + error_text + " File might be corrupted.");
memdelete(f);
return err;
}
@@ -497,6 +508,23 @@ Error ProjectSettings::_load_settings(const String p_path) {
return OK;
}
Error ProjectSettings::_load_settings_text_or_binary(const String p_text_path, const String p_bin_path) {
// Attempt first to load the text-based project.godot file
Error err_text = _load_settings_text(p_text_path);
if (err_text == OK) {
return OK;
} else if (err_text != ERR_FILE_NOT_FOUND) {
// If the text-based file exists but can't be loaded, we want to know it
ERR_PRINTS("Couldn't load file '" + p_text_path + "', error code " + itos(err_text) + ".");
return err_text;
}
// Fallback to binary project.binary file if text-based was not found
Error err_bin = _load_settings_binary(p_bin_path);
return err_bin;
}
int ProjectSettings::get_order(const String &p_name) const {
ERR_FAIL_COND_V(!props.has(p_name), -1);
@@ -525,7 +553,7 @@ void ProjectSettings::clear(const String &p_name) {
Error ProjectSettings::save() {
return save_custom(get_resource_path() + "/project.godot");
return save_custom(get_resource_path().plus_file("project.godot"));
}
Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom, const String &p_custom_features) {
@@ -664,7 +692,10 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin
String vstr;
VariantWriter::write_to_string(value, vstr);
file->store_string(F->get() + "=" + vstr + "\n");
if (F->get().find(" ") != -1)
file->store_string(F->get().quote() + "=" + vstr + "\n");
else
file->store_string(F->get() + "=" + vstr + "\n");
}
}

View File

@@ -93,8 +93,9 @@ protected:
static ProjectSettings *singleton;
Error _load_settings(const String p_path);
Error _load_settings_text(const String p_path);
Error _load_settings_binary(const String p_path);
Error _load_settings_text_or_binary(const String p_text_path, const String p_bin_path);
Error _save_settings_text(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
Error _save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());

View File

@@ -119,8 +119,8 @@ _ALWAYS_INLINE_ uint64_t _atomic_exchange_if_greater_impl(register uint64_t *pw,
// The actual advertised functions; they'll call the right implementation
uint32_t atomic_conditional_increment(register uint32_t *counter) {
return _atomic_conditional_increment_impl(counter);
uint32_t atomic_conditional_increment(register uint32_t *pw) {
return _atomic_conditional_increment_impl(pw);
}
uint32_t atomic_decrement(register uint32_t *pw) {
@@ -143,8 +143,8 @@ uint32_t atomic_exchange_if_greater(register uint32_t *pw, register uint32_t val
return _atomic_exchange_if_greater_impl(pw, val);
}
uint64_t atomic_conditional_increment(register uint64_t *counter) {
return _atomic_conditional_increment_impl(counter);
uint64_t atomic_conditional_increment(register uint64_t *pw) {
return _atomic_conditional_increment_impl(pw);
}
uint64_t atomic_decrement(register uint64_t *pw) {

View File

@@ -598,7 +598,13 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) {
Array send_props;
for (int i = 0; i < properties.size(); i++) {
const PropertyInfo &pi = properties[i].first;
const Variant &var = properties[i].second;
Variant &var = properties[i].second;
WeakRef *ref = Object::cast_to<WeakRef>(var);
if (ref) {
var = ref->get_ref();
}
RES res = var;
Array prop;
@@ -1010,11 +1016,11 @@ void ScriptDebuggerRemote::add_profiling_frame_data(const StringName &p_name, co
}
void ScriptDebuggerRemote::profiling_start() {
//ignores this, uses it via connnection
//ignores this, uses it via connection
}
void ScriptDebuggerRemote::profiling_end() {
//ignores this, uses it via connnection
//ignores this, uses it via connection
}
void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {

View File

@@ -203,6 +203,7 @@ public:
virtual void make_template(const String &p_class_name, const String &p_base_class_name, Ref<Script> &p_script) {}
virtual bool is_using_templates() { return false; }
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = NULL) const = 0;
virtual String validate_path(const String &p_path) const { return ""; }
virtual Script *create_script() const = 0;
virtual bool has_named_classes() const = 0;
virtual bool supports_builtin_mode() const = 0;

View File

@@ -185,7 +185,7 @@ private:
if (node->right != _data._nil) {
node = node->right;
while (node->left != _data._nil) { /* returns the minium of the right subtree of node */
while (node->left != _data._nil) { /* returns the minimum of the right subtree of node */
node = node->left;
}
return node;
@@ -207,7 +207,7 @@ private:
if (node->left != _data._nil) {
node = node->left;
while (node->right != _data._nil) { /* returns the minium of the left subtree of node */
while (node->right != _data._nil) { /* returns the minimum of the left subtree of node */
node = node->right;
}
return node;

View File

@@ -34,6 +34,14 @@
#include "os/os.h"
#include "project_settings.h"
// ISO 639-1 language codes, with the addition of glibc locales with their
// regional identifiers. This list must match the language names (in English)
// of locale_names.
//
// References:
// - https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
// - https://lh.2xlibre.net/locales/
static const char *locale_list[] = {
"aa", // Afar
"aa_DJ", // Afar (Djibouti)
@@ -756,8 +764,17 @@ static const char *locale_names[] = {
0
};
// Windows has some weird locale identifiers which do not honor the ISO 639-1
// standardized nomenclature. Whenever those don't conflict with existing ISO
// identifiers, we override them.
//
// Reference:
// - https://msdn.microsoft.com/en-us/library/windows/desktop/ms693062(v=vs.85).aspx
static const char *locale_renames[][2] = {
{ "no", "nb" },
{ "in", "id" }, // Indonesian
{ "iw", "he" }, // Hebrew
{ "no", "nb" }, // Norwegian Bokmål
{ NULL, NULL }
};

View File

@@ -1135,6 +1135,36 @@ String String::num_int64(int64_t p_num, int base, bool capitalize_hex) {
return s;
}
String String::num_uint64(uint64_t p_num, int base, bool capitalize_hex) {
uint64_t n = p_num;
int chars = 0;
do {
n /= base;
chars++;
} while (n);
String s;
s.resize(chars + 1);
CharType *c = s.ptrw();
c[chars] = 0;
n = p_num;
do {
int mod = ABS(n % base);
if (mod >= 10) {
char a = (capitalize_hex ? 'A' : 'a');
c[--chars] = a + (mod - 10);
} else {
c[--chars] = '0' + mod;
}
n /= base;
} while (n);
return s;
}
String String::num_real(double p_num) {
String s;
@@ -3138,8 +3168,8 @@ String String::word_wrap(int p_chars_per_line) const {
String String::http_escape() const {
const CharString temp = utf8();
String res;
for (int i = 0; i < length(); ++i) {
CharType ord = temp[i];
for (int i = 0; i < temp.length(); ++i) {
char ord = temp[i];
if (ord == '.' || ord == '-' || ord == '_' || ord == '~' ||
(ord >= 'a' && ord <= 'z') ||
(ord >= 'A' && ord <= 'Z') ||
@@ -3148,9 +3178,9 @@ String String::http_escape() const {
} else {
char h_Val[3];
#if defined(__GNUC__) || defined(_MSC_VER)
snprintf(h_Val, 3, "%.2X", ord);
snprintf(h_Val, 3, "%hhX", ord);
#else
sprintf(h_Val, "%.2X", ord);
sprintf(h_Val, "%hhX", ord);
#endif
res += "%";
res += h_Val;
@@ -3683,8 +3713,8 @@ String String::get_file() const {
String String::get_extension() const {
int pos = find_last(".");
if (pos < 0)
return *this;
if (pos < 0 || pos < MAX(find_last("/"), find_last("\\")))
return "";
return substr(pos + 1, length());
}
@@ -3762,7 +3792,7 @@ String String::percent_decode() const {
String String::get_basename() const {
int pos = find_last(".");
if (pos < 0)
if (pos < 0 || pos < MAX(find_last("/"), find_last("\\")))
return *this;
return substr(0, pos);

View File

@@ -146,6 +146,7 @@ public:
static String num_scientific(double p_num);
static String num_real(double p_num);
static String num_int64(int64_t p_num, int base = 10, bool capitalize_hex = false);
static String num_uint64(uint64_t p_num, int base = 10, bool capitalize_hex = false);
static String chr(CharType p_char);
static String md5(const uint8_t *p_md5);
static String hex_encode_buffer(const uint8_t *p_buffer, int p_len);

View File

@@ -293,7 +293,7 @@ public:
// If this changes the table in variant_op must be updated
enum Operator {
//comparation
//comparison
OP_EQUAL,
OP_NOT_EQUAL,
OP_LESS,

View File

@@ -153,9 +153,9 @@ struct _VariantCall {
funcdata.func = p_func;
funcdata.default_args = p_defaultarg;
funcdata._const = p_const;
funcdata.returns = p_has_return;
#ifdef DEBUG_ENABLED
funcdata.return_type = p_return;
funcdata.returns = p_has_return;
#endif
if (p_argtype1.name) {
@@ -340,6 +340,8 @@ struct _VariantCall {
VCALL_LOCALMEM1R(Vector2, rotated);
VCALL_LOCALMEM0R(Vector2, tangent);
VCALL_LOCALMEM0R(Vector2, floor);
VCALL_LOCALMEM0R(Vector2, ceil);
VCALL_LOCALMEM0R(Vector2, round);
VCALL_LOCALMEM1R(Vector2, snapped);
VCALL_LOCALMEM0R(Vector2, aspect);
VCALL_LOCALMEM1R(Vector2, dot);
@@ -382,6 +384,7 @@ struct _VariantCall {
VCALL_LOCALMEM0R(Vector3, abs);
VCALL_LOCALMEM0R(Vector3, floor);
VCALL_LOCALMEM0R(Vector3, ceil);
VCALL_LOCALMEM0R(Vector3, round);
VCALL_LOCALMEM1R(Vector3, distance_to);
VCALL_LOCALMEM1R(Vector3, distance_squared_to);
VCALL_LOCALMEM1R(Vector3, angle_to);
@@ -1509,6 +1512,8 @@ void register_variant_methods() {
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, REAL, "phi", varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, tangent, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, floor, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, ceil, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, round, varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, snapped, VECTOR2, "by", varray());
ADDFUNC0R(VECTOR2, REAL, Vector2, aspect, varray());
ADDFUNC1R(VECTOR2, REAL, Vector2, dot, VECTOR2, "with", varray());
@@ -1550,6 +1555,7 @@ void register_variant_methods() {
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, abs, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, floor, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, ceil, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, round, varray());
ADDFUNC1R(VECTOR3, REAL, Vector3, distance_to, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, REAL, Vector3, distance_squared_to, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, REAL, Vector3, angle_to, VECTOR3, "to", varray());

View File

@@ -147,7 +147,7 @@ Variant::operator bool() const {
return booleanize();
}
// We consider all unitialized or empty types to be false based on the type's
// We consider all uninitialized or empty types to be false based on the type's
// zeroiness.
bool Variant::booleanize() const {
return !is_zero();
@@ -177,7 +177,7 @@ bool Variant::booleanize() const {
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \
if (p_b.type == NIL) _RETURN(!p_b.type m_op NIL); \
if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
\
_RETURN_FAIL \
};
@@ -252,7 +252,7 @@ bool Variant::booleanize() const {
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \
if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \
if (p_b.type == NIL) _RETURN(!p_b.type m_op NIL); \
if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
\
_RETURN_FAIL \
};
@@ -278,7 +278,7 @@ bool Variant::booleanize() const {
if (p_b.type == m_name) \
_RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const m_type *>(p_b._data._mem)); \
if (p_b.type == NIL) \
_RETURN(!p_b.type m_op NIL); \
_RETURN(!(p_b.type m_op NIL)); \
\
_RETURN_FAIL \
};
@@ -323,7 +323,7 @@ bool Variant::booleanize() const {
if (p_b.type == m_name) \
_RETURN(*p_a._data.m_sub m_op *p_b._data.m_sub); \
if (p_b.type == NIL) \
_RETURN(!p_b.type m_op NIL); \
_RETURN(!(p_b.type m_op NIL)); \
\
_RETURN_FAIL \
}
@@ -1501,7 +1501,7 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->set_hsv(v->get_h(), p_value._data._real, v->get_v());
valid = true;
} else if (p_index == CoreStringNames::singleton->v) {
v->set_hsv(v->get_h(), v->get_v(), p_value._data._real);
v->set_hsv(v->get_h(), v->get_s(), p_value._data._real);
valid = true;
}
}
@@ -3715,8 +3715,9 @@ static const char *_op_names[Variant::OP_MAX] = {
"*",
"/",
"- (negation)",
"+ (positive)",
"%",
"..",
"+ (concatenation)",
"<<",
">>",
"&",

View File

@@ -30,9 +30,32 @@
#include "version_generated.gen.h"
// Godot versions are of the form <major>.<minor> for the initial release,
// and then <major>.<minor>.<patch> for subsequent bugfix releases where <patch> != 0
// That's arbitrary, but we find it pretty and it's the current policy.
// Defines the main "branch" version. Patch versions in this branch should be
// forward-compatible.
// Example: "3.1"
#define VERSION_BRANCH "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR)
#ifdef VERSION_PATCH
#define VERSION_MKSTRING "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) "." _MKSTR(VERSION_PATCH) "." VERSION_STATUS "." VERSION_BUILD VERSION_MODULE_CONFIG
// Example: "3.1.4"
#define VERSION_NUMBER "" VERSION_BRANCH "." _MKSTR(VERSION_PATCH)
#else
#define VERSION_MKSTRING "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) "." VERSION_STATUS "." VERSION_BUILD VERSION_MODULE_CONFIG
// Example: "3.1"
#define VERSION_NUMBER "" VERSION_BRANCH
#endif // VERSION_PATCH
#define VERSION_FULL_NAME "" VERSION_NAME " v" VERSION_MKSTRING
// Describes the full configuration of that Godot version, including the version number,
// the status (beta, stable, etc.) and potential module-specific features (e.g. mono).
// Example: "3.1.4.stable.mono"
#define VERSION_FULL_CONFIG "" VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG
// Similar to VERSION_FULL_CONFIG, but also includes the (potentially custom) VERSION_BUILD
// description (e.g. official, custom_build, etc.).
// Example: "3.1.4.stable.mono.official"
#define VERSION_FULL_BUILD "" VERSION_FULL_CONFIG "." VERSION_BUILD
// Same as above, but prepended with Godot's name and a cosmetic "v" for "version".
// Example: "Godot v3.1.4.stable.official.mono"
#define VERSION_FULL_NAME "" VERSION_NAME " v" VERSION_FULL_BUILD

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="@GDScript" category="Core" version="3.0-stable">
<class name="@GDScript" category="Core" version="3.0.3">
<brief_description>
Built-in GDScript functions.
</brief_description>
@@ -20,7 +20,7 @@
</argument>
<argument index="2" name="b8" type="int">
</argument>
<argument index="3" name="a8" type="int">
<argument index="3" name="a8" type="int" default="255">
</argument>
<description>
Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8 bits of information ranging from 0 to 255.
@@ -38,7 +38,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="alpha" type="float">
<argument index="1" name="alpha" type="float" default="1.0">
</argument>
<description>
Returns a color according to the standardised [code]name[/code] with [code]alpha[/code] ranging from 0 to 1.
@@ -326,7 +326,8 @@
<argument index="0" name="s" type="float">
</argument>
<description>
Raises the Euler's constant [b]e[/b] to the power of [code]s[/code] and returns it. [b]e[/b] has an approximate value of 2.71828.
The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]s[/code] and returns it.
[b]e[/b] has an approximate value of 2.71828.
[codeblock]
a = exp(2) # approximately 7.39
[/codeblock]
@@ -608,6 +609,7 @@
<description>
Parse JSON text to a Variant (use [method typeof] to check if it is what you expect).
Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
Note that JSON objects do not preserve key order like Godot dictionaries, thus you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:
[codeblock]
p = parse_json('["a", "b", "c"]')
if typeof(p) == TYPE_ARRAY:
@@ -1130,9 +1132,9 @@
<method name="yield">
<return type="GDScriptFunctionState">
</return>
<argument index="0" name="object" type="Object">
<argument index="0" name="object" type="Object" default="null">
</argument>
<argument index="1" name="signal" type="String">
<argument index="1" name="signal" type="String" default="&quot;&quot;">
</argument>
<description>
Stops the function execution and returns the current state. Call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="@GlobalScope" category="Core" version="3.0-stable">
<class name="@GlobalScope" category="Core" version="3.0.3">
<brief_description>
Global scope constants and variables.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="@NativeScript" category="Core" version="3.0-stable">
<class name="@NativeScript" category="Core" version="3.0.3">
<brief_description>
</brief_description>
<description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="@VisualScript" category="Core" version="3.0-stable">
<class name="@VisualScript" category="Core" version="3.0.3">
<brief_description>
Built-in visual script functions.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AABB" category="Built-In Types" version="3.0-stable">
<class name="AABB" category="Built-In Types" version="3.0.3">
<brief_description>
Axis-Aligned Bounding Box.
</brief_description>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.0-stable">
<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.0.3">
<brief_description>
Anchor point in AR Space
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.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRCamera" inherits="Camera" category="Core" version="3.0-stable">
<class name="ARVRCamera" inherits="Camera" category="Core" version="3.0.3">
<brief_description>
A camera node with a few overrules for AR/VR applied such as location tracking.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRController" inherits="Spatial" category="Core" version="3.0-stable">
<class name="ARVRController" inherits="Spatial" category="Core" version="3.0.3">
<brief_description>
A spatial node representing a spatially tracked controller.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRInterface" inherits="Reference" category="Core" version="3.0-stable">
<class name="ARVRInterface" inherits="Reference" category="Core" version="3.0.3">
<brief_description>
Base class for ARVR interface implementation.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.0-stable">
<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.0.3">
<brief_description>
Our origin point in AR/VR.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.0-stable">
<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.0.3">
<brief_description>
A tracked object
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRServer" inherits="Object" category="Core" version="3.0-stable">
<class name="ARVRServer" inherits="Object" category="Core" version="3.0.3">
<brief_description>
This is our AR/VR Server.
</brief_description>
@@ -36,6 +36,12 @@
Find an interface by its name. Say that you're making a game that uses specific capabilities of an AR/VR platform you can find the interface for that platform by name and initialize it.
</description>
</method>
<method name="get_hmd_transform">
<return type="Transform">
</return>
<description>
</description>
</method>
<method name="get_interface" qualifiers="const">
<return type="ARVRInterface">
</return>
@@ -59,6 +65,30 @@
Returns a list of available interfaces with both id and name of the interface.
</description>
</method>
<method name="get_last_commit_usec">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_last_frame_usec">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_last_process_usec">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_primary_interface" qualifiers="const">
<return type="ARVRInterface">
</return>
<description>
</description>
</method>
<method name="get_reference_frame" qualifiers="const">
<return type="Transform">
</return>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar" inherits="Reference" category="Core" version="3.0-stable">
<class name="AStar" inherits="Reference" category="Core" version="3.0.3">
<brief_description>
AStar class representation that uses vectors as edges.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.0-stable">
<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.0.3">
<brief_description>
Base dialog for user notification.
</brief_description>
@@ -21,7 +21,7 @@
<argument index="2" name="action" type="String" default="&quot;&quot;">
</argument>
<description>
Adds a button with label [i]text[/i] and a custom [i]action[/i] to the dialog and returns the created button. [i]action[/i] will be passed to the [custom_action] signal when pressed.
Adds a button with label [i]text[/i] and a custom [i]action[/i] to the dialog and returns the created button. [i]action[/i] will be passed to the [signal custom_action] signal when pressed.
If [code]true[/code], [i]right[/i] will place the button to the right of any sibling buttons. Default value: [code]false[/code].
</description>
</method>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.0-stable">
<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.0.3">
<brief_description>
Sprite node that can use multiple textures for animation.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.0-stable">
<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.0.3">
<brief_description>
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Animation" inherits="Resource" category="Core" version="3.0-stable">
<class name="Animation" inherits="Resource" category="Core" version="3.0.3">
<brief_description>
Contains data used to animate everything in the engine.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationPlayer" inherits="Node" category="Core" version="3.0-stable">
<class name="AnimationPlayer" inherits="Node" category="Core" version="3.0.3">
<brief_description>
Container and player of [Animation] resources.
</brief_description>
@@ -8,7 +8,7 @@
</description>
<tutorials>
http://docs.godotengine.org/en/3.0/getting_started/step_by_step/animations.html
http://docs.godotengine.org/en/3.0/tutorials/animation/index.html
http://docs.godotengine.org/en/3.0/tutorials/animation/index.html
</tutorials>
<demos>
</demos>
@@ -131,8 +131,7 @@
<argument index="3" name="from_end" type="bool" default="false">
</argument>
<description>
Play the animation with key [code]name[/code]. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the
animation backwards.
Play the animation with key [code]name[/code]. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
</description>
</method>
<method name="play_backwards">

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.0-stable">
<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.0.3">
<brief_description>
Animation Player that uses a node graph for blending Animations.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Area" inherits="CollisionObject" category="Core" version="3.0-stable">
<class name="Area" inherits="CollisionObject" category="Core" version="3.0.3">
<brief_description>
General purpose area node for detection and 3D physics influence.
</brief_description>
@@ -192,7 +192,7 @@
<argument index="0" name="body" type="Object">
</argument>
<description>
Emitted when a [PhysicsBody2D] object exits.
Emitted when a [PhysicsBody] object exits.
</description>
</signal>
<signal name="body_shape_entered">
@@ -205,7 +205,7 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
Emitted when a [PhysicsBody2D] object enters, reporting which shapes overlapped.
Emitted when a [PhysicsBody] object enters, reporting which shapes overlapped.
</description>
</signal>
<signal name="body_shape_exited">
@@ -218,7 +218,7 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
Emitted when a [PhysicsBody2D] object exits, reporting which shapes were overlapping.
Emitted when a [PhysicsBody] object exits, reporting which shapes were overlapping.
</description>
</signal>
</signals>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.0-stable">
<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.0.3">
<brief_description>
2D area for detection and 2D physics influence.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Array" category="Built-In Types" version="3.0-stable">
<class name="Array" category="Built-In Types" version="3.0.3">
<brief_description>
Generic array datatype.
</brief_description>
@@ -274,7 +274,7 @@
</method>
<method name="sort">
<description>
Sort the array using natural order and return reference to the array.
Sort the array using natural order.
</description>
</method>
<method name="sort_custom">
@@ -283,7 +283,7 @@
<argument index="1" name="func" type="String">
</argument>
<description>
Sort the array using a custom method and return reference to the array. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblock]
class MyCustomSorter:
static func sort(a, b):

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.0-stable">
<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.0.3">
<brief_description>
</brief_description>
<description>
@@ -29,8 +29,11 @@
<argument index="3" name="compress_flags" type="int" default="97792">
</argument>
<description>
Create a new surface ([method get_surface_count] that will become surf_idx for this.
Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles).
Creates a new surface.
Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See [Mesh] for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). [method get_surface_count] will become the surf_idx for this new surface.
The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [code]ARRAY_INDEX[/code] if it is used.
Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
Godot uses clockwise winding order for front faces of triangle primitive modes.
</description>
</method>
<method name="center_geometry">
@@ -66,6 +69,16 @@
Return the amount of surfaces that the [code]ArrayMesh[/code] holds.
</description>
</method>
<method name="lightmap_unwrap">
<return type="int" enum="Error">
</return>
<argument index="0" name="arg0" type="Transform">
</argument>
<argument index="1" name="arg1" type="float">
</argument>
<description>
</description>
</method>
<method name="regen_normalmaps">
<return type="void">
</return>
@@ -78,7 +91,7 @@
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
Return the length in indices of the index array in the requested surface (see [method add_surface]).
Return the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_array_len" qualifiers="const">
@@ -87,7 +100,7 @@
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
Return the length in vertices of the vertex array in the requested surface (see [method add_surface]).
Return the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_arrays" qualifiers="const">
@@ -112,7 +125,7 @@
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
Return the format mask of the requested surface (see [method add_surface]).
Return the format mask of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_material" qualifiers="const">
@@ -138,7 +151,7 @@
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
Return the primitive type of the requested surface (see [method add_surface]).
Return the primitive type of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_remove">
@@ -222,7 +235,8 @@
Array of bone weights, as a float array. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size.
[Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
</constant>
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
</constant>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AtlasTexture" inherits="Texture" category="Core" version="3.0-stable">
<class name="AtlasTexture" inherits="Texture" category="Core" version="3.0.3">
<brief_description>
Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.0-stable">
<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.0.3">
<brief_description>
Stores information about the audiobusses.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffect" inherits="Resource" category="Core" version="3.0-stable">
<class name="AudioEffect" inherits="Resource" category="Core" version="3.0.3">
<brief_description>
Audio Effect For Audio.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.0-stable">
<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.0.3">
<brief_description>
Adds a Amplify audio effect to an Audio bus.
Increases or decreases the volume of the selected audio bus.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.0.3">
<brief_description>
Adds a band limit filter to the Audio Bus.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0.3">
<brief_description>
Adds a band pass filter to the Audio Bus.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.0-stable">
<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.0.3">
<brief_description>
Adds a chorus audio effect.
</brief_description>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.0-stable">
<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.0.3">
<brief_description>
Adds a Compressor audio effect to an Audio bus.
Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.0-stable">
<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.0.3">
<brief_description>
Adds a Delay audio effect to an Audio bus. Plays input signal back after a period of time.
Two tap delay and feedback options.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.0-stable">
<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.0.3">
<brief_description>
Adds a Distortion audio effect to an Audio bus.
Modify the sound to make it dirty.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.0-stable">
<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.0.3">
<brief_description>
Base class for audio equalizers. Gives you control over frequencies.
Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.0-stable">
<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.0.3">
<brief_description>
Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz.
Each frequency can be modulated between -60/+24 dB.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.0-stable">
<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.0.3">
<brief_description>
Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz.
Each frequency can be modulated between -60/+24 dB.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.0-stable">
<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.0.3">
<brief_description>
Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
Each frequency can be modulated between -60/+24 dB.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.0-stable">
<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.0.3">
<brief_description>
Adds a filter to the Audio Bus.
</brief_description>

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