Commit graph

2556 commits

Author SHA1 Message Date
Dawid Kurek 923aaf970f Remove unnecessary assignment 2019-06-03 23:25:07 +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
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
Max Hilbrunner 33897d9b58
Merge pull request #28925 from Daw11/astar-sorted-array
Improve the performance of AStar
2019-05-18 23:20:02 +02:00
Aaron Franke 9ff708f008
Optimize Basis constructor for Axis Angle 2019-05-17 05:11:12 -04:00
Max Hilbrunner 2809d86156
Merge pull request #28944 from Faless/mix/object_get_indexed
Fix Object::get_indexed for simple properties.
2019-05-17 00:48:39 +02:00
Max Hilbrunner 05cb337f2d
Merge pull request #28587 from Daw11/lanczos
Implement Lanczos image filter
2019-05-16 23:25:48 +02:00
Fabio Alessandrelli d39ffc101b Fix Object::get_indexed for simple properties.
Object::get_indexed was not correctly reporting invalid keys if the name
was a direct property (not a subproperty), causing for example Tween to
not report correctly a bad interpolate_property key.
2019-05-16 23:22:52 +02:00
Daw11 cc7be6c643 Use a binary heap for the open list of Astar 2019-05-16 20:14:35 +02:00
Gilles Roudière 3bfa080c9c Fix NaN with get_action_strength 2019-05-15 11:21:10 +02:00
Fabio Alessandrelli 76f262d2f4 Better handle some self-RSET/RPC in MultiplayerAPI
Allow calling yourself via RPC/RSET if the mode allows it.
Better error messages when you are not allowed to call yourself.
2019-05-12 11:37:26 +02:00
Aaron Franke 702b539405
Change "ID" to lowercase "id"
Reasoning: ID is not an acronym, it is simply short for identification, so it logically should not be capitalized. But even if it was an acronym, other acronyms in Godot are not capitalized, like p_rid, p_ip, and p_json.
2019-05-09 06:25:32 -04:00
Fabio Alessandrelli bba77fe387 Avoid _can_call_mode resetting error message in MultiplayerAPI 2019-05-08 22:14:41 +02:00
Rémi Verschelde fcbadd4334
Merge pull request #28525 from MunWolf/func_ref_validation
Added an is_valid function to FuncRef
2019-05-06 14:23:16 +02:00
Daw11 28bff3d1ad Implement Lanczos image filter 2019-05-05 14:03:56 +02:00
Leonard Meagher f7eb426e2e Allow overriding how scripted objects are converted to strings
solves #26796

- ADD `String to_string()` method to Object which can be overriden by `String _to_string()` in scripts
- ADD `String to_string(r_valid)` method to ScriptInstance to allow langauges to control how scripted objects are converted to strings
- IMPLEMENT to_string for GDScriptInstance, VisualScriptInstance, and NativeScriptInstance
- ADD Documentation about `Object.to_string` and `Object._to_string`
- Changed `Variant::operator String` to use `obj->to_string()`
2019-05-03 15:06:05 -07:00
Rémi Verschelde 867b96eb71 Locales: Add some missing locale names 2019-05-02 09:22:40 +02:00
Rémi Verschelde ae41e35191
Merge pull request #27676 from qarmin/small_fixes_2
Small fixes to static analyzer bugs
2019-05-01 08:19:04 +02:00
Aaron Franke 620ec4703f
Make "decimal" functions more consistent
In GDScript, rename "decimals" to "step_decimals". In C#, add "StepDecimals", but keep the old functionality in a method called "DecimalCount".
2019-04-30 13:49:17 -04:00
Rémi Verschelde a7f00f3bac
Merge pull request #28530 from akien-mga/scons-prepend-cpppath
SCons: Always use env.Prepend for CPPPATH
2019-04-30 18:23:38 +02:00