Commit graph

2822 commits

Author SHA1 Message Date
jfons
8244f535cd Add network profiler 2019-09-05 09:48:36 +02:00
huisedenanhai
124e51fdde make core/Reference thread safe 2019-09-04 12:17:07 +08:00
iwek7
617797c47c Adds skip-breakpoints feature 2019-09-03 20:49:09 +02:00
Bhupendra Aole
073f625a91 Create a GDScript String function repeat
Fixes #30610
2019-09-03 13:06:13 -04:00
Rémi Verschelde
a00a9e868e
Merge pull request #31021 from willnationsdev/script-reflection
Expose Script reflection methods to scripting API.
2019-09-03 18:33:55 +02:00
Rémi Verschelde
726711d8c5
Merge pull request #31756 from raphael10241024/fast_aabb_transform
a faster function to transform aabb
2019-09-03 12:26:43 +02:00
Rémi Verschelde
00258684d3
Merge pull request #31915 from KoBeWi/xformers
Don't transform global position of mouse input
2019-09-03 12:05:27 +02:00
Tomasz Chabora
e21cc3cc8d Don't transform global position of mouse input 2019-09-03 00:58:10 +02:00
Aaron Franke
f8b4cf0fc4
Check for exact equality before approximate equality 2019-09-01 14:02:14 -04:00
Andrii Doroshenko (Xrayez)
08272585e9 Remove redundant transform method in Geometry singleton
Transform2D's xform method can be used instead which handles
`PoolVector2Array` now (as well as 3D version).
2019-09-01 14:34:51 +03:00
Rémi Verschelde
c693b5a5bd
Merge pull request #31761 from Xrayez/trans2d-vector2array
Add transform methods for PoolVector*Array
2019-09-01 13:07:25 +02:00
Rémi Verschelde
69de1eca01
Merge pull request #31667 from YeldhamDev/geometry_point_circle_cleanup
Add 'is_point_in_circle()' to Geometry class, and general file cleanup
2019-09-01 12:59:49 +02:00
Rémi Verschelde
c8ae8f2fb1
Revert "Add __atomic_* operators support for atomic operations" 2019-09-01 12:19:44 +02:00
qarmin
b244ab4acc Fix memory leak in ResourceFormatSaverBinary::save 2019-08-30 13:46:05 +02:00
Andrii Doroshenko (Xrayez)
07cff56f48 Add transform methods for PoolVector*Array
Similarly to `Vector2` and `Rect2` transforms in 2D and Vector3, Plane,
and AABB in 3D. PoolVector2Array and PoolVector3Array were the only
missing Variant types in both Transform2D and Transform respectively.
2019-08-29 14:47:33 +03:00
RaphaelHunter
e7febd72d6 a faster funtion to transform aabb 2019-08-29 14:17:08 +08:00
Hugo Locurcio
5bd01bf637
Add a project description setting
The description is displayed as a tooltip when hovering the project
in the Project Manager. It can span multiple lines.

This partially addresses #8167.
2019-08-28 22:34:29 +02:00
Aaron Franke
34ab6549b1
[Mono] Various Color improvements
I also slid in a fix to C++ Vector3 > and >=
2019-08-27 22:05:18 -04:00
Michael Alexsander Silva Dias
6cc54a5864 Add 'is_point_in_circle()' to Geometry class, and general file cleanup 2019-08-27 18:01:05 -03:00
Rémi Verschelde
6b7117ce3f
Merge pull request #31662 from profan/perf/astar-reserve
Allow to reserve space for nodes in A* and elements in OAHashMap explicitly.
2019-08-27 10:09:08 +02:00
Robin Hübner
1031833fb0
allow to reserve space in OAHashMap explicitly and also in AStar.
* also handle overflow occurring in _get_probe_length
2019-08-27 00:38:35 +02:00
Rémi Verschelde
2f63811c9a
Merge pull request #25656 from bruvzg/macos_multi_instances
[macOS] Add ability to open multiple editor instances and global/dock menu access
2019-08-26 22:04:37 +02:00
Andrii Doroshenko (Xrayez)
c362527cb5 Modify outdated comments and error messages regarding indexed images
Godot doesn't support indexed images anymore (FORMAT_INDEXED),
so those are removed to avoid any confusion.
2019-08-26 18:21:19 +03:00
bruvzg
db6d4352ea
[macOS] Add methods to modify global and dock menus. Add ability to open multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu. 2019-08-26 16:45:49 +03:00
qarmin
33c62db7af Add forgotten pointer checking 2019-08-24 13:34:14 +02:00
Rémi Verschelde
51d50e167d
Merge pull request #31094 from aaronfranke/vector-sign-mod-etc
Add Vector2/3 sign and posmod functions, axis, docs, misc additions
2019-08-23 09:07:47 +02:00
Rémi Verschelde
3a53e792ef
Merge pull request #31513 from qarmin/int_overflow
Prevent int overflow and underflow
2019-08-23 09:05:25 +02:00
Andrii Doroshenko (Xrayez)
f013596760 Allow to define and load script templates per project
Previously it was only possible to create custom script templates per
editor instance which could lead to certain name collisions, but now one
can create such templates per project tailored for specific use cases.

The default path to search for custom script templates is defined in
project settings via `editor/script_templates_search_path` setting as
`res://script_templates` path, yet this can be configured per project.

Templates have at most two origins now:

1. Project-specific, defined in `ProjectSettings`, for instance:
    - res://script_templates/
2. Editor script templates, for instance:
    - %APPDATA%/Godot/script_templates/

As script templates can have the same name over different paths,
the override mechanism was also added, enabling project-specific
templates over the editor ones.
2019-08-22 20:51:30 +03:00
qarmin
538405f9c7 Prevent int overflow and underflow 2019-08-22 17:22:35 +02:00
Rémi Verschelde
7402fd2c56 Revert "Feature: Add SHA256 for PoolByteArray"
This reverts commit e2c3bbabb0.

This was superseded by #29871 which adds more crypto features with a
dedicated interface.

Since this commit was never in a stable release (merged during 3.2 dev),
we revert it to avoid having to deprecate it in favor of the Crypto API.
See https://github.com/godotengine/godot/pull/31187#issuecomment-523377965
2019-08-22 13:44:57 +02:00
Rémi Verschelde
1a4dbd9ee2
Merge pull request #31437 from volzhs/vibrate-mobile
Support vibration for Android and iOS
2019-08-21 21:10:22 +02:00
Rémi Verschelde
99980d856b
Merge pull request #29871 from Faless/crypto/initial_pr
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21 18:03:03 +02:00
Fabio Alessandrelli
ce5a3f56a6 Rewrite StreamPeerSSL with SSLContext helper class
connect_to_stream now accepts optional parameter to specify which
certificates to trust.
Implement accept_stream (SSL server) with key/cert parameters to specify
the RSA key and X509 certificate resources.
2019-08-21 16:59:38 +02:00
Fabio Alessandrelli
cb31b8797e Add hashing context class 2019-08-21 16:59:38 +02:00
Fabio Alessandrelli
3495d1bfa0 Add hex_encode function to PoolByteArray 2019-08-21 16:59:38 +02:00
Fabio Alessandrelli
1b36aa662c Add Crypto custom class 2019-08-21 16:59:35 +02:00
volzhs
4061e5bb75 Support vibration for Android and iOS 2019-08-21 23:38:53 +09:00
Rémi Verschelde
05a4310899
Merge pull request #31402 from profan/perf/astar-improvements
A* performance improvements, use OAHashMap.
2019-08-21 11:27:12 +02:00
Rémi Verschelde
7b37321ae3
Merge pull request #31499 from nekomatata/fix-new-project-metadata
Setting project metadata doesn't fail when project_metadata.cfg doesn't exist
2019-08-21 08:54:32 +02:00
Robin Hübner
4bac393549
astar performance improvements, use oahashmap 2019-08-21 08:47:55 +02:00
PouleyKetchoupp
b49226e085 Support for file not found in ConfigFile::Load and handle a few specific cases
EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist
EditorPlugin::get_config: removed (not used)

Fixes #31444
2019-08-21 08:32:55 +02:00
Rémi Verschelde
a8db4c848d
Merge pull request #31395 from ptrojahn/floatsarenasty
Replace is_zero_approx(A.distance_to(B)) with A==B
2019-08-20 12:54:40 +02:00
Paul Trojahn
7c9c6df7e4 Replace is_zero_approx(A.distance_to(B)) with A==B
Related to #22988 (Fixes the holes in the shape of
the first comment)
2019-08-19 18:16:58 +02:00
Fabio Alessandrelli
c19871af6d Move CryptoCore to it's own folder.
Crypto classes will be placed in core/crypto.
2019-08-19 16:31:05 +02:00
Fabio Alessandrelli
5cb41faece Fix CryptoCore signatures, add SHA1 context.
Fix hash size in SHA256 signature
Fix source parameter in hash context update function to be const.
Add SHA1 hash context.
2019-08-19 16:29:37 +02:00
Rémi Verschelde
5c853a45e6
Merge pull request #31423 from Calinou/improve-node-signal-group-tooltip
Improve the scene tree signals/groups tooltip
2019-08-18 10:55:16 +02:00
Aaron Franke
092346d82b
Add Vector2/3 sign and posmod functions, misc additions
Also make the docs more consistent, add Axis enum to Vector2, add > and >=. and C# also gets % and an override for vector-vector mod.
2019-08-17 18:31:55 -04:00
Rémi Verschelde
ad8746e0de DirAccessPack: Fix dir_exists and file_exists for res:// paths
Both methods check against containers using relative paths as index,
so the `res://` part needs to be stripped.

Fixes #26009.
2019-08-17 19:03:28 +02:00
Hugo Locurcio
c62302a432
Improve the scene tree signals/groups tooltip
The tooltip now displays the number of connections and groups
that are assigned to the hovered node.
2019-08-17 14:20:16 +02:00
Rémi Verschelde
d3153c28f0 Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'
The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is
(conditionally defines the error message).

There are a few ERR_EXPLAINC calls for C-strings where String is not included
which can stay as is to avoid adding additional _MSGC macros just for that.

Part of #31244.
2019-08-17 13:31:22 +02:00
Braden Bodily
71d71d55b5 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages

Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-17 12:33:15 +02:00
Davide Busterna
5ba632a73b Fix image offset when upscaling with Lanczos 2019-08-15 10:54:38 +02:00
Rémi Verschelde
b030834b63
Merge pull request #31321 from julianaito/master
Add __atomic_* operators support for atomic operations
2019-08-15 02:55:39 +02:00
Charlène
3185a1b274 Replace legacy __sync atomic operations with newer __atomic ones 2019-08-14 15:56:02 +02:00
Rémi Verschelde
6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Robin Hübner
7092dd9d58
remove unused self list include from astar 2019-08-13 18:28:56 +02:00
Rémi Verschelde
e7d484982e
Merge pull request #31292 from iwek7/fixDebuggerInspectionForNodes
Fixes issue with debug inspecing of nodes that are not in the scene tree
2019-08-13 08:24:01 +02:00
miwanczuk
98a3b2e5f4 Fixes issue when inspecting nodes that are not in the tree 2019-08-12 17:06:44 +02:00
Rémi Verschelde
37a16fee05 Export: Remove temp files from cache after export
So far we left most temporary files lying around, so this attempts to
fix that.

I added a helper method to DirAccess to factor out the boilerplate of
creating a DirAccess, checking if the file exists, remove it or print
an error on failure.
2019-08-12 13:31:59 +02:00
Rémi Verschelde
5441aaf768
Merge pull request #31228 from aaronfranke/identity-constants
Add Basis constants and format Transform constants
2019-08-12 12:42:30 +02:00
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
IAmActuallyCthulhu
a940ed781c
Remove old doc comments in image_loader header 2019-08-10 08:13:44 -05:00
Aaron Franke
85f13a0d24
Add Basis constants and format Transform constants 2019-08-09 11:34:54 -07:00
Rémi Verschelde
22b42c3315
Merge pull request #30893 from profan/fix/err-explain
Implement error macros that come with an error message, replacing ERR_EXPLAIN.
2019-08-08 16:28:06 +02:00
Robin Hübner
8affda0916 implement accompanying error macros that come with an error message, to replace ERR_EXPLAIN usage. 2019-08-08 15:05:59 +02:00
Rémi Verschelde
274bac2783
Merge pull request #30934 from santouits/debugg
Hopefully fix the random crashes with threads
2019-08-08 14:50:47 +02:00
Rémi Verschelde
e578c1fef8
Merge pull request #31195 from bojidar-bg/31143-funcref-call_funcv
Add FuncRef.call_funcv
2019-08-08 11:24:27 +02:00
Bojidar Marinov
7123fab771
Add FuncRef.call_funcv
Closes #31143
2019-08-08 11:58:57 +03:00
Rémi Verschelde
b33042507b Translation: Fix logic bug finding match for regional locales
The  match test was inverted. The rest of the changes
are documentation and cleanup.

Fixes #26346 and fixes #31192.
2019-08-08 10:15:55 +02:00
Rémi Verschelde
1d5ae6da5b
Merge pull request #31047 from Zylann/save_exr
Add Image.save_exr()
2019-08-08 08:53:02 +02:00
Marc Gilleron
cd2de77b04 Add Image.save_exr() 2019-08-07 21:17:47 +01:00
Rémi Verschelde
ba541bceca
Merge pull request #31077 from qarmin/coverity_bugs
Change some code proposed by Coverity and Cppcheck
2019-08-07 13:49:33 +02:00
qarmin
e0b5b21863 Add some code changes/fixes proposed by Coverity and Clang Tidy 2019-08-07 12:54:30 +02:00
Rémi Verschelde
365994a630
Merge pull request #30998 from Calinou/cap-warnings-errors-per-second
Cap the number of warnings/errors per second rather than per frame
2019-08-06 15:21:20 +02:00
TGRCDev
c6f7015bca Fixed EOF flag not resetting on seek back 2019-08-05 18:20:18 -07:00
Aaron Franke
a9c10450bd
[Core] [Mono] Optimize Wrap functions
Use is_zero_approx(), avoid a negative, and also rename "rng" to "range".
2019-08-04 20:38:38 -07:00
willnationsdev
88f79802f6 Expose Script reflection methods to scripting API. 2019-08-01 14:13:40 -05:00
Hugo Locurcio
47c615caf3
Cap the number of warnings/errors per second rather than per frame
This reproduces the behavior used for printing when using the remote
debugger. The default limit is 100 errors and 100 warnings per second,
which makes it possible to display much more GDScript warnings
before overflowing.

This also adds a "Too many warnings" message, so that warnings
don't look like errors when overflowing anymore.

This closes #21896.
2019-07-31 17:29:26 +02:00
santouits
13efc1bb06 Hopefully fix the random crashes with threads 2019-07-30 19:08:33 +03:00
Aaron Franke
7dbbb5eac7
[Mono] Deprecate Set methods
These silently fail, so they should be removed. I accidentally added most of these last year, trying to make everything else consistent with Quat, sorry!

Also, a few tiny nitpicking changes are included, like whitespace and misspellings.
2019-07-28 17:49:22 -04:00
Cameron Reikes
b3cb58e7b3 Some resources are freed before they are saved
- PackedScenes freed before saved, so their path cache is lost
 - Solution is to move data to persistent static map
 - This patch will fix #30538
2019-07-25 17:21:47 -07:00
Rémi Verschelde
43238bb59a DirAccess: Drop compat get_next(bool *is_dir) which was hidden
Fixes this warning:
```
./core/os/dir_access.h:74:17: warning: 'virtual String DirAccess::get_next(bool*)' was hidden [-Woverloaded-virtual]
```

Part of #30790.
2019-07-25 11:09:57 +02:00
Rémi Verschelde
1481d299ea
Merge pull request #30776 from akien-mga/editor-configurable-float-step
Inspector: Make default float step configurable
2019-07-25 10:33:45 +02:00
Rémi Verschelde
336846e547 Inspector: Fix PROPERTY_HINT_SPRITE_FRAME not behaving as RANGE
This was a regression in 3.1 and later from the new inspector, where
PROPERTY_HINT_SPRITE_FRAME was not fully re-implemented. It's meant to
be a normal PROPERTY_HINT_RANGE which also automatically increments its
value when keyed in the animation player.

To avoid code duplication, I made the frames properties use the actual
PROPERTY_HINT_RANGE and introduced a PROPERTY_USAGE_KEYING_INCREMENTS
usage flag instead.
2019-07-25 09:29:51 +02:00
Rémi Verschelde
aa062c54fc
Merge pull request #25090 from Chaosus/string_count
Added String.count method
2019-07-24 08:32:42 +02:00
Michael Alexsander Silva Dias
12ae7a4c02 Update some dead links in the codebase 2019-07-23 21:06:12 -03:00
Chaosus
080c0bb7fe Added count method to String 2019-07-23 18:55:54 +03:00
Rémi Verschelde
d844e30614 Inspector: Make default float step configurable
Also allow lifting the decimal step formatting with a hint range step
of 0. A new `range_step_decimals()` is added for this to avoid breaking
compatibility on the general purpose `step_decimals()` (which still
returns 0 for an input step of 0).

Supersedes #25470.
Partial fix for #18251.
2019-07-23 17:31:38 +02:00
Rémi Verschelde
4c943cca2c
Merge pull request #30716 from qarmin/fixed_static_analiser_code
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 15:08:44 +02:00
qarmin
aab8da25ad Fix some code found by Coverity Scan and PVS Studio 2019-07-23 09:14:31 +02:00
Rémi Verschelde
9f5b77acc9
Revert "Expose "meta" to the Inspector" 2019-07-22 12:03:57 +02:00
Ignacio Etcheverry
2c85439da0 Make it a build error if a GetTypeInfo specialization cannot be resolved
Previously it was a runtime error message.
2019-07-22 00:08:35 +02:00
Rémi Verschelde
60efd67034
Merge pull request #30693 from Chaosus/lerp_angle
Added lerp_angle built-in function
2019-07-20 13:37:13 +02:00
Rémi Verschelde
d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
Chaosus
6694c119d0 Added lerp_angles built-in function
Co-authored-by: Xrayez <https://github.com/Xrayez>
Co-authored-by: DleanJeans <https://github.com/DleanJeans>
2019-07-20 12:59:41 +03:00
qarmin
6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
Rémi Verschelde
c317a3ce16
Merge pull request #30354 from LikeLakers2/multinodeedit-same-type-properties
MultiNodeEdit now only shows properties with the exact same PropertyInfo data
2019-07-19 17:58:17 +02:00
Rémi Verschelde
f796779f7c
Merge pull request #23310 from aaronfranke/posmod-int
Add integer posmod and rename default arg names
2019-07-19 15:07:49 +02:00
Rémi Verschelde
2ca3e47d66
Merge pull request #22642 from YeldhamDev/inspector_metadata
Expose "meta" to the Inspector
2019-07-19 14:39:23 +02:00
Aaron Franke
a60f242982 Add integer posmod and rename default arg names
"posmod" is the integer version of "fposmod". We do not need a "mod" because of the % operator.

I changed the default arg names from "x" and "y" to "a" and "b" because they are not coordinates. I also changed pow's arg names to "base" and "exp". Also, I reorganized the code in the VS built-in funcs switch statement.
2019-07-18 16:33:43 -04:00