Commit graph

2676 commits

Author SHA1 Message Date
Furkan Türkal 7d8d337b2c fix some crashes 2019-07-01 14:28:29 +03:00
qarmin 3c154eb93b Remove unnecessary code and add some error explanations 2019-07-01 12:59:42 +02:00
Rémi Verschelde d17eac735c
Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
Rémi Verschelde 0db138a621 doc: Enforce default values for OS properties
Otherwise we end up fetching values from the current OS instance
when running doctool, so they would change based on the system or
even simply due to changes to the system clipboard.
2019-06-30 13:58:07 +02:00
Rémi Verschelde 850a54a2a5 Fix uninitialized variables in Line2D, JSONParseResult and TileMap 2019-06-30 13:58:07 +02:00
Rémi Verschelde b4aba3ae7c
Merge pull request #30177 from hbina/use_FALLTHROUGH_macro
Applied some of FALLTHROUGH macro usage from #30122
2019-06-29 23:40:08 +02:00
hbina085 9f0c6a6009 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended. 2019-06-29 16:08:48 -04:00
Bojidar Marinov 55234d62b0
Remove bogus nulls from generated default values
Also, fix crash in PluginScript destructor.
2019-06-29 15:51:33 +03:00
Rémi Verschelde 1df38f2372
Merge pull request #30112 from AgentEnder/master
AStar get_current_point enabled consideration
2019-06-29 13:45:17 +02:00
Rémi Verschelde 52355c638b
Merge pull request #29380 from bojidar-bg/16086-docs-default-value
Add default values to the editor help, docs, and generated RST
2019-06-29 12:28:30 +02:00
Craigory V Coppola dc9659a9bf AStar get_closest_point/get_closest_position_in_segment enabled consideration 2019-06-29 02:04:13 -05:00
Rémi Verschelde a5bd40aa48
Merge pull request #30121 from DrMoriarty/encrypted_configfile
Add encrypted files support to ConfigFile
2019-06-28 12:06:44 +02:00
Rémi Verschelde 3942c939e3
Merge pull request #30135 from qarmin/fix_memory_leak_os
Fix small memory leak in OS.cpp
2019-06-27 22:06:52 +02:00
qarmin d408c254a2 Fix small memory leak in OS.cpp 2019-06-27 21:35:27 +02:00
Bojidar Marinov 0c4c36d823
Add default values to the editor help, docs, and generated RST
Also, make spacing of "=" in the editor help a bit more consistent.
Closes #16086
2019-06-27 18:29:35 +03:00
Vasiliy Makarov fcd8faf2f4 Add encrypted files support to ConfigFile
Fix #26477
Add in ConfigFile this methods:
load_encrypted(path, key)
load_encrypted_pass(path, password)
save_encrypted(path, key)
save_encrypted_pass(path, password)
2019-06-27 16:43:44 +03:00
Rémi Verschelde 1bf448dd87 Properly expose all Error constants to scripting languages 2019-06-27 12:48:26 +02:00
Rémi Verschelde 755b589384
Merge pull request #30096 from akien-mga/doc-misc-updates
doc: Proofread and complete various nodes
2019-06-27 08:12:34 +02:00
Rémi Verschelde eaaff9da31
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
2019-06-27 01:05:18 +02:00
Andrii Doroshenko (Xrayez) 6f2233d13a Bind is_point_in_polygon in Geometry singleton 2019-06-27 00:20:22 +03:00
Rémi Verschelde 867dda1124 doc: Proofread and complete various nodes
All 100% completed: MainLoop, Node, Object, Path, Performance,
Reference, Resource, SceneState, SceneTree, UndoRedo.

Also fixed some en_GB occurrences as the reference spelling is en_US.
2019-06-26 23:05:51 +02:00
Alexander Holland 8f23f4b44e UndoRedo add version changed signal
added some functions to manage undo buttons
2019-06-26 16:32:34 +02:00
qarmin 4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Rémi Verschelde a9cff880d6 doc: Document EncodedObjectAsID, expose its property 2019-06-26 10:50:45 +02:00
Fabio Alessandrelli 679bb882fc Fix PoolVector resize and subarray.
The first used to accept negative values, the second would crash if out
of bound.
2019-06-24 09:24:09 +02:00
Nils ANDRÉ-CHANG d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
Rémi Verschelde 05a0a68c72
Merge pull request #24448 from lukad/toggle-system-console
Add option to toggle console window
2019-06-21 23:43:16 +02:00
Rémi Verschelde 1e833cadbc
Merge pull request #29935 from Faless/net/get_if_multicast_pr
Multicast, more network interfaces info
2019-06-21 10:21:01 +02:00
Fabio Alessandrelli e5e3f86648 Multicast support in NetSocket/PacketPeerUDP 2019-06-21 00:14:42 +02:00
Fabio Alessandrelli b574e476ec Implement IP.get_local_interfaces.
Allow getting interfaces names and assigned names.

On UWP this is not supported, and the function will return one interface
for each local address (with interface name the local address itself).
2019-06-21 00:14:42 +02:00
Rémi Verschelde 5c66771e3e
Merge pull request #29283 from qarmin/fix_some_always_same_values
Remove always true/false values
2019-06-20 21:10:10 +02:00
qarmin 072e40368e Fix always true/false values 2019-06-20 16:59:48 +02:00
Luka Dornhecker ad504b926f Add option to toggle console window on Windows
This is an editor setting and its value can also be toggled
using an entry in the Editor toolbar. The console will still
appear briefly when starting the project manager or editor,
as it's still compiled as console application.

Does not impact exported games, which will still run without
console in release and with console in debug mode.

A project setting or export option could be added to disable
it in debug mode if there's demand for it, but that would
greatly reduce the usefulness of debug builds if Windows users
can no longer report error and crash messages.

Fixes #17889.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2019-06-20 16:55:52 +02:00
JohnJLight 38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Rémi Verschelde 43a9b8c76c
Merge pull request #27237 from Chaosus/astar_2d
Added 2D functions to AStar
2019-06-19 15:07:59 +02:00
Rémi Verschelde 2b52cd3e5c
Merge pull request #28648 from KoBeWi/substr-1
Make second parameter of substr optional
2019-06-19 12:43:46 +02:00
Rémi Verschelde 22afebcad7
Merge pull request #29598 from GodotExplorer/uri-encode
Expose String.http_escape and String.http_unescape
2019-06-19 10:47:34 +02:00
Rémi Verschelde d6176db271 Unexpose subclasses of ResourceFormatLoader and -Saver
ResourceFormatLoader and ResourceFormatSaver are meant to be overridden
to add support for different formats in ResourceLoader and ResourceSaver.
Those should be exposed as they can be overridden in plugins.

On the other hand, all predefined subclasses of those two base classes
are only meant to register support for new file and resource types, but
should not and cannot be used directly from script, so they should not
be exposed.

Also unexposed ResourceImporterOGGVorbis (and thus its base class
ResourceImporter) which are editor-only.
2019-06-18 17:56:23 +02:00
Yuri Roubinsky 3caed76eda
Merge pull request #29862 from Chaosus/fix_astar_crash
Fix AStar set/is_point_disabled crash
2019-06-18 08:18:23 +03:00
Chaosus cc94a95fc9 Fix AStar set/is_point_disabled crash 2019-06-18 08:02:41 +03:00
Rémi Verschelde 0d61fc2c0f
Merge pull request #29752 from bruvzg/window_size_limits
Add ability to limit maximum/minimum window size.
2019-06-17 11:58:00 +02:00
Rémi Verschelde e864237f1a i18n: Fix extract.py support for new TTRC
Also make compatible with Python 3.
2019-06-16 22:02:44 +02:00
bruvzg b924fb97d6
Add ability to limit maximum/minimum window size. 2019-06-15 09:49:11 +03:00
Rémi Verschelde 2f0f7db42b
Merge pull request #29735 from sparkart/master
Limit Physics Process FPS above 0
2019-06-14 15:16:53 +02:00
Rémi Verschelde bd937ea397
Merge pull request #29488 from Daw11/astar-remove-node
Fix the performance of remove_point of AStar
2019-06-13 20:36:25 +02:00
Emmanuel Barroga 2cce5699ea Limit Physics Process FPS above 0
Resolves: #19734
2019-06-13 08:53:48 -07:00
Bastiaan Olij a9581d2b3f Added constants for the main buttons and axis used in VR 2019-06-13 22:54:08 +10:00
Rémi Verschelde b44488d823
Merge pull request #29702 from KoBeWi/fix_random_crash
Validate parameters of randi_range()
2019-06-12 23:07:39 +02:00
Tomasz Chabora d89478975f Validate parameters of randi_range() 2019-06-12 19:46:07 +02:00
Rémi Verschelde f410e7a8a9
Merge pull request #29616 from Calinou/humanize-size-clearer-rounding
Make humanized size rounding clearer by padding decimals with zeroes
2019-06-12 16:25:10 +02:00
Rémi Verschelde 73960e585b
Merge pull request #27193 from toasteater/fix/pcg-randf
Improved uniformity of RandomPCG::randf.
2019-06-12 15:21:58 +02:00
Rémi Verschelde 704f2c5d85
Merge pull request #29615 from Calinou/fix-editor-monitor-large-sizes
Fix display of large sizes in the editor monitors
2019-06-12 15:21:37 +02:00
Rémi Verschelde 4db4b7a605
Merge pull request #29583 from Toshiwoz/master
Fix Vector3 slerp method by normalizing cross product
2019-06-12 14:34:28 +02:00
Rémi Verschelde 0e6cac8ab8
Merge pull request #29465 from bruvzg/per_pixel_transp_impr
Removes redundant "splash" setting, improves per pixel transparency documentation.
2019-06-12 12:50:17 +02:00
Rémi Verschelde 971b5160c6
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
2019-06-12 12:49:21 +02:00
Rémi Verschelde 6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Rémi Verschelde f0bacf360d
Merge pull request #29467 from zaksnet/patch-1
replaced "divisor" with "delimiter" for methods split,rsplit and split_floats.
2019-06-11 13:31:41 +02:00
Zak 1a397f46e6 Improved documentation of rsplit Method for String class.
Improved documentation of rsplit Method for String class.

Removed "divisor" (i will also change variants_call.cpp) and added "delimiter" in its place. Also moved the example at the bottom of the description.
2019-06-11 13:39:18 +03:00
Hugo Locurcio 463d0988dd
Make humanized size rounding clearer by padding decimals with zeroes
For example, "5 MB" will now be displayed as "5.00 MB" to make the
rounding precision clear, regardless of the value being rounded.

This closes #29611.
2019-06-08 22:17:57 +02:00
Hugo Locurcio 746bfc3662
Fix display of large sizes in the editor monitors
Unlike the old custom method, the `String::humanize_size()`
method works well with file sizes above 2 GB.

This also tweaks the suffixes for spacing consistency and
uses the correct acronym for exabytes (EB).

This closes #29610.
2019-06-08 22:05:57 +02:00
geequlim ae839bd0d8 Expose String.http_escape and String.http_unescape 2019-06-08 16:33:12 +08:00
Toshiwo 416a7d06de Fix Vector3 slerp method normalizing cross product 2019-06-07 11:28:50 -05:00
Hein-Pieter van Braam-Stewart 64626f682e Fix a random SSL crash I saw once.
I don't know why this happened, I was debugging another issue. This
should take care of it though.
2019-06-06 13:46:54 +00:00
Daw11 605c5c71f4 Save inside the Points of AStar the neighbours that aren't connected
Improve the performance of remove_point because it doesn't have to search every neighbour of every node
2019-06-04 21:39:44 +02:00
bruvzg 54863b20e6
Removes redundant "display/window/per_pixel_transparency/splash" setting, improves per pixel transparency documentation. 2019-06-04 11:21:29 +03:00
Dawid Kurek 923aaf970f Remove unnecessary assignment 2019-06-03 23:25:07 +02:00
qarmin 8245db869f Small fixes to unrechable code, possibly overflows, using NULL pointers 2019-06-03 21:52:50 +02:00
Rémi Verschelde 85a3382958
Merge pull request #29431 from Calinou/fix-unix-permissions-errors
Fix errors when attempting to set UNIX permissions when unavailable
2019-06-03 20:54:09 +02:00
Hugo Locurcio cbd31d9f0b
Fix errors when attempting to set UNIX permissions when unavailable
This makes exporting from Windows to Linux work again.

This closes #29416.
2019-06-03 14:35:33 +02:00
Rémi Verschelde b9dc2e7e4d
Merge pull request #28099 from lupoDharkael/fix-completion
Fix code completion not working with class_name
2019-06-03 14:01:07 +02:00
Gilles Roudiere f247832832 Add configurable strength value to InputEventAction 2019-06-02 14:31:34 +02:00
Rémi Verschelde 3c4fab295b
Merge pull request #27789 from Giacom/move_towards
Added move_toward functions for float, Vector2 and Vector3
2019-06-01 12:05:18 +02:00
Rémi Verschelde e9be875007
Merge pull request #29340 from qarmin/fix_array_overflow
Fix array overflow when saving scene preview
2019-05-31 21:22:18 +02:00
Rémi Verschelde af2c742f53 Fix and expose String::strip_escapes(), use it in LineEdit paste
Supersedes #27736.
2019-05-31 15:49:14 +02:00
qarmin 2b4e828b55 Fix array overflow when saving scene preview 2019-05-31 13:22:22 +02:00
Rémi Verschelde 9ad9d1f3b3 Don't localize paths that contain but are not in the resource path
This issue could be triggered if you try to access a path which contains
the resource path string in its absolute path, while pointing to a directory
which is *not* in the resource path.

It's clearer with an example: with `/my/project` as resource path, the
previous logic would also localize `/my/project_data` to `res://data`, which
is incorrect and would lead to a cryptic error.

Fixes #24761.

Co-authored-by: volzhs <volzhs@gmail.com>
2019-05-30 16:03:12 +02:00
Rémi Verschelde 0411ab56f5
Merge pull request #25148 from capnm/capnm-print-corrupt-image-path
Print the path of a corrupt image
2019-05-30 14:52:55 +02:00
qarmin a32f020b53 Properly unlock mutex 2019-05-30 10:28:03 +02:00
Chaosus 0bc37de744 Added 2D functions to AStar 2019-05-30 07:10:07 +03:00
Rémi Verschelde 02bac239d9 FileAccessEncrypted: Be more explicit on decryption failure
Fixes #24505.
Supersedes #25278.
2019-05-29 17:57:37 +02:00
Rémi Verschelde 62c9af4072
Merge pull request #25647 from QbieShay/fix_25440
Added a setting for files in which the editor should search (project specific)
2019-05-29 16:58:28 +02:00
Rémi Verschelde 36591b1ae8
Merge pull request #28416 from JellyWX/binary-literals
Support for binary literals in GDScript
2019-05-29 08:41:05 +02:00
Rémi Verschelde 06633a8074
Merge pull request #26462 from SubSage/master
Fixes OS.execute; stderr was silenced; adds missing quote from exe args (windows)
2019-05-28 14:26:57 +02:00
Giacom c00427add3 Added move_toward functions for float, Vector2 and Vector3 2019-05-28 11:39:35 +01:00
Rémi Verschelde 7487d2f852
Merge pull request #28957 from aaronfranke/basis-optimize
Optimize Basis constructor for Axis Angle
2019-05-27 17:42:43 +02:00
Rémi Verschelde 86f9d1bf5e
Merge pull request #29001 from ibrahn/message-arg-destroy
MessageQueue::flush now always destroys parameters of a spent message
2019-05-27 13:29:06 +02:00
Rémi Verschelde e8fbb28e20
Merge pull request #29119 from bruvzg/native_icon_support
Add native window/taskbar icon support for Windows and macOS.
2019-05-27 12:09:42 +02:00
John Gabriel 58279eda27 Add "transparent" to named color list 2019-05-24 20:37:40 +01:00
bruvzg 2b9ed68d6a
Add native window/taskbar icon support for Windows and macOS.
Co-authored-by: Markus Törnqvist <mjt@nysv.org>
2019-05-24 14:23:57 +03:00
Andrii Doroshenko (Xrayez) 24e9a881c0 Expose 2D Delaunay triangulation in Geometry singleton
Can be used via scripting as `Geometry.triangulate_delaunay_2d(points)`

The interface is the same as in `Triangulate` library, returning indices
into triangulated points.
2019-05-24 13:10:13 +03:00
Andrii Doroshenko (Xrayez) 883ef8570a Expose 2D polygon boolean operations in Geometry singleton
Clipper 6.4.2 is used internally to perform polypaths clipping, as well
as inflating/deflating polypaths. The following methods were added:

```
Geometry.merge_polygons_2d(poly_a, poly_b) # union
Geometry.clip_polygons_2d(poly_a, poly_b) # difference
Geometry.intersect_polygons_2d(poly_a, poly_b) # intersection
Geometry.exclude_polygons_2d(poly_a, poly_b) # xor

Geometry.clip_polyline_with_polygon_2d(poly_a, poly_b)
Geometry.intersect_polyline_with_polygon_2d(poly_a, poly_b)

Geometry.offset_polygon_2d(polygon, delta) # inflate/deflate
Geometry.offset_polyline_2d(polyline, delta) # returns polygons

// This one helps to implement CSG-like behaviour:
Geometry.transform_points_2d(points, transform)
```

All the methods return an array of polygons/polylines. The resulting
polygons could possibly be holes which could be checked with
`Geometry.is_polygon_clockwise()` which was exposed to scripting as well.
2019-05-22 17:12:39 +03:00
Andrii Doroshenko (Xrayez) 9bf48db891 Build Clipper with tools=no and patch it to auto-disable exceptions
Reverts "Build polygon clipper only in tools builds" (see #17319)
which allows to build Clipper with tools disabled (release) and because
of that, Clipper has to be patched to optionally disable exceptions in
order to be built on some platforms.

Patched Clipper 6.4.2 to be compiled with exceptions enabled/disabled.
and ensure that Clipper-specific exception macros are defined: don't use
exceptions by default unless exception handling is detected.

Compilation with exceptions will be determined by various
C++ exceptions defines:

* ` __cpp_exceptions` is part of C++ feature testing macros (since C++98);
* `__EXCEPTIONS` is used by some GNU compilers;
* `_CPPUNWIND` is used by MSVC.

The user can override specific exceptions behavior via corresponding
`*_USER` macros (i.e. compiling for embedded systems).
2019-05-22 13:12:21 +03:00
Rémi Verschelde 26e0cc7aa3
Merge pull request #29041 from hbina/add_const
add const to methods that return literals
2019-05-21 15:16:41 +02:00
Rémi Verschelde 9065cc2402
Merge pull request #29011 from zann1x/master
Initialize padding on PoolByteArray serialization
2019-05-21 10:07:26 +02:00
hbina085 f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
Rémi Verschelde defd960276
Merge pull request #27886 from LeonardMeagher2/obj_to_string
Allow overriding how scripted objects are converted to strings
2019-05-20 22:37:01 +02:00
Rémi Verschelde 6920c82742 Style: Fix issues with clang-format 8.0 2019-05-20 13:51:51 +02:00
Lukas Zanner c35f4e8808 Initialize padding on PoolByteArray serialization 2019-05-19 19:09:16 +02:00
Ibrahn Sahir 5626a1ec20 MessageQueue::flush now always destroys parameters of a spent message
Previously, destructors of Variant parameters were not called if the
target of the message was not found.
2019-05-19 14:05:15 +01:00
Rémi Verschelde e0574e1d98 Fix typos with codespell
Using codespell 1.15.0.

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

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00