Rémi Verschelde
7da392bcc5
Don't return reference on copy assignment operators
...
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.
According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B) , C++
allows any arbitrary return type, so this is standard compliant.
This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Marcel Admiraal
272b3c3728
Enable sorting of operator methods in class documentation.
2021-11-29 14:51:44 +00:00
Nathan Franke
dd30253cdc
PackedByteArray, Array slice end exclusive, rename subarray to slice
2021-11-26 22:13:12 -06:00
Ricardo Subtil
93396b3e51
Fix wrong comparison with default values
2021-11-26 14:04:13 +00:00
Yuri Roubinsky
a4b7de6b23
Fix console colors on Windows
2021-11-26 13:10:55 +03:00
Aaron Franke
40cb86ba96
Don't show errors when getting nonexistent settings
2021-11-25 08:23:42 -06:00
Aaron Franke
9851d3c5b2
Move logic for saving project features to ProjectSettings save_custom
2021-11-25 03:08:05 -06:00
Aaron Franke
e81c689592
Project feature warning system
2021-11-24 10:32:07 -06:00
Rémi Verschelde
b1bf82d2b4
Merge pull request #52456 from kleonc/image-fill-rect
2021-11-24 16:34:01 +01:00
Haoyu Qiu
c09ea8d45a
Adds proxy support for HTTPClient
...
Also fixed a potential infinite loop when connecting to server.
2021-11-24 14:36:42 +08:00
Lightning_A
e078f970db
Rename remove()
to remove_at()
when removing by index
2021-11-23 18:58:57 -07:00
kleonc
92ca300ab1
Image Use memcpy() in fill(), fill_rect(), _put_pixelb(), _get_pixelb()
...
Co-authored-by: Lightning_A <aaronjrecord@gmail.com>
2021-11-23 18:06:26 +01:00
kleonc
91595b16e3
Add Image::fill_rect method
2021-11-23 18:06:23 +01:00
bruvzg
9877d91c4a
Add Input.is_physical_key_pressed method.
2021-11-23 11:14:19 +02:00
Rémi Verschelde
1e71cab797
Merge pull request #55223 from bruvzg/gde_dict_index
2021-11-23 09:18:30 +01:00
bruvzg
b11e619b19
[Vulkan] Check each device capabilities before selecting it.
...
Split instance and physical device selection function and move device selection to window creation, to reject devices without present capability.
Add device preferred type check in discrete > integrated > virtual > cpu > other order.
Add device list printout.
Add command line argument to override device selection.
2021-11-22 20:04:57 +02:00
kobewi
7dc97d6558
Ignore override.cfg when in editor
2021-11-22 16:10:31 +01:00
bruvzg
f214b2b194
[GDExtension] Implement missing Dictionary index operators.
...
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2021-11-22 12:43:00 +02:00
Haoyu Qiu
8253a45a1a
Fix crash when executing PackedDataContainer._iter_init
2021-11-21 20:14:59 +08:00
Rémi Verschelde
be16eb625b
Merge pull request #54932 from briansemrau/expose-main-thread-id
2021-11-20 10:48:46 +01:00
Fabio Alessandrelli
46fdba5f8b
[HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.
...
Note, the editor build requires the mbedtls module to be manually
enabled, as it is currently needed as a ResourceUID dependency.
This will need to be addressed in a separate PR.
2021-11-19 16:59:27 +01:00
Rémi Verschelde
fc9de5ba7f
Merge pull request #54499 from Faless/threads/4.x_work_pool_default
2021-11-19 09:39:21 +01:00
Paulb23
eb9100f085
Fix divide by zero in pck_packer
2021-11-17 18:07:29 +00:00
Rémi Verschelde
2b24629847
Merge pull request #55042 from nekomatata/fix-segment-intersection
2021-11-17 17:33:56 +01:00
Rémi Verschelde
7540da622d
Merge pull request #49793 from Chaosus/expose_randfn
2021-11-17 13:53:23 +01:00
Yuri Roubinsky
a74acca858
Expose randfn
to global scope
2021-11-17 14:29:19 +03:00
Xwdit
0bd96bd2cf
Fix the exceptions in signal disconnection
...
Use the correct method to get SignalData to fix exceptions in signal disconnection
2021-11-17 09:29:29 +01:00
PouleyKetchoupp
6d0c93dccf
Fix segment intersection in Geometry2D
...
Doing a multiplication to reduce the amount of tests was causing
precision which lead to 2D raycast detecting false positive contacts
in some cases with convex polygons.
2021-11-16 18:09:33 -07:00
Bastiaan Olij
035468669a
Fix array access in gdextensions
2021-11-17 10:36:29 +11:00
Hugo Locurcio
8fb7e622a6
Rename built-in SGN()
macro to SIGN()
...
This matches the name of the GDScript function (except it's uppercase
here).
2021-11-16 20:40:49 +01:00
Rémi Verschelde
5341e6010e
Allow dehardcoding documentation branch and URL in docs links
...
This makes it possible to change the branch of the documentation that
URLs are pointing to without having to modify all class reference
files.
In the XML class reference, the `$DOCS_URL` placeholder should be used,
and will be replaced automatically in the editor and when generating
the RST class reference.
The documentation branch string is set in `version.py`.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-11-15 13:02:21 +01:00
Rémi Verschelde
d975b1bc37
Merge pull request #43072 from KoBeWi/point_to_angle
2021-11-15 09:56:21 +01:00
Rémi Verschelde
8bb163807a
Merge pull request #54976 from reduz/importer-options-by-path
2021-11-15 00:46:04 +01:00
Hugo Locurcio
315e94ee2a
Merge pull request #53710 from CaptainProton42/fix-extension-class-inspector-properties
2021-11-14 22:02:31 +01:00
reduz
cd2a499084
Add path to functions that return iporter options
...
-Allows displaying custom options for specific file format variants
-Added support for scene format import to retrieve custom options
This PR is necessary for #54886 to be implemented properly.
2021-11-14 14:06:10 -03:00
Brian Semrau
c558263d84
Expose Thread::get_main_id in core bindings
2021-11-12 19:28:49 -05:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums
2021-11-12 15:37:54 -06:00
Rémi Verschelde
1aa3c8419b
Merge pull request #54869 from akien-mga/string-remove-erase
2021-11-11 13:00:21 +01:00
Rémi Verschelde
e2e9b08cc7
Color: Bind from_hsv
as static method
2021-11-11 11:50:02 +01:00
Rémi Verschelde
2beaae4b6f
String: Remove erase
method, bindings can't mutate String
2021-11-11 11:23:32 +01:00
Haoyu Qiu
367d75fab0
Add missing characters for property name quoting
2021-11-11 13:18:09 +08:00
Rémi Verschelde
06a33e590f
Merge pull request #53819 from TokageItLab/re-implement-ping-pong
...
Reimplement ping-pong animation and reverse playback
2021-11-09 22:11:04 +01:00
Tomasz Chabora
606cfa9a47
Fix Vector2.angle_to_point() being reversed
2021-11-09 16:59:58 +01:00
bruvzg
ba9d737363
Fix incorrect encoding (Latin-1 instead of UTF-8) used in _error_handler
functions.
2021-11-08 23:45:08 +02:00
Rémi Verschelde
e87687a6d0
Merge pull request #54486 from ibrahn/thread-work-pool-lazier
2021-11-08 13:39:39 +01:00
Rémi Verschelde
63559f2c80
Merge pull request #54186 from miraz12/fix-packedByteArray-memcpy-crash
2021-11-08 13:33:07 +01:00
Brian Semrau
dc11e73bf0
Rename AABB get_area
to get_volume
2021-11-05 18:22:42 -04:00
Aaron Franke
744b43b527
Fix Quaternion multiplication operator
2021-11-04 11:24:46 -05:00
kobewi
e393c2a734
Add is_built_in() method to Resource
2021-11-04 12:45:58 +01:00
Hugo Locurcio
c012fbc8b2
Rename PROPERTY_USAGE_NOEDITOR
to PROPERTY_USAGE_NO_EDITOR
...
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-11-03 23:06:17 +01:00
Rémi Verschelde
4b247e7ffa
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@322aac4bb7 .
Also improve parser errors to allow identifying the problematic mappings.
2021-11-03 19:55:52 +01:00
Silc 'Tokage' Renew
953a7bce7e
reimplement ping-pong
2021-11-03 13:39:33 +09:00
Rémi Verschelde
ab6ec9310c
Merge pull request #54453 from KoBeWi/slice_of_string
2021-11-02 13:18:34 +01:00
kobewi
e5725c7deb
Expose String.get_slice
2021-11-02 11:24:07 +01:00
Fabio Alessandrelli
4ed1d977fc
[OS] Add ThreadWorkPool default size to OS.
...
Some platforms (*cough* web *cough*) have hard limits on the number of
threads that can be spawned.
Currently, ThreadPoolWork (mostly used in rendering/physics servers)
will spawn as many threads as CPUs available causing exception on
machines with high CPU count.
This commit adds a new overridable method to OS that returns the default
thread pool size (still the CPU count by default), and overrides it for
the JavaScript platform so it always allocate only one thread.
We can likely improve the whole ThreadPoolWork in the future to always
allocate X amount of threads, and assign jobs to them on the fly, but
that will require some more architectural changes.
2021-11-02 04:16:00 +01:00
Emmanuel Leblond
795cd2eb38
Merge pull request #35816 from touilleMan/dictionary-operator==-true-comparison
...
Modify Array/Dictionary::operator== to do real key/value comparison
2021-11-02 00:00:38 +01:00
Rémi Verschelde
7b83039885
Merge pull request #54490 from q66/ppc
2021-11-01 23:27:21 +01:00
Rémi Verschelde
0fbf53dbc5
Merge pull request #54387 from Calinou/editor-translations-increase-zlib-compression-level
2021-11-01 23:22:55 +01:00
Daniel Kolesa
3a84a64d2f
Add support for PowerPC family
2021-11-01 22:25:53 +01:00
Ibrahn Sahir
151d2e34ca
ThreadWorkPool no longer starts worker threads if given zero work.
2021-11-01 19:19:25 +00:00
bruvzg
0b6b8427c8
[macOS] Add create_instance
function to spawn editor copies.
...
[macOS] Modify `create_project` function to detect and run app bundles using NSWorkspace to ensure app window is registered and activated correctly.
2021-11-01 11:48:23 +02:00
Rémi Verschelde
1dd742777a
Merge pull request #53452 from aaronfranke/who-let-the-docs-out
2021-10-31 23:18:32 +01:00
Clay John
8a10bb7d0d
Use OpenGL 3.3 core profile instead of compatibility profile
...
- Rename OpenGL to GLES3 in the source code per community feedback.
- The renderer is still exposed as "OpenGL 3" to the user.
- Hide renderer selection dropdown until OpenGL support is more mature.
- The renderer can still be changed in the Project Settings or using
the `--rendering-driver opengl` command line argument.
- Remove commented out exporter code.
- Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-31 15:56:45 +01:00
Emmanuel Leblond
f9ba2efe1e
Modify Dictionary::operator== to do real key/value comparison with recursive support (and add unittests)
2021-10-30 13:11:01 +02:00
Hugo Locurcio
ce97ddbcb1
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
...
- Use lowercase driver names for the `--rendering-driver`
command line argument.
2021-10-30 02:05:49 +02:00
lawnjelly
e3491a3744
Add GLES2 2D renderer + Linux display manager
...
First implementation with Linux display manager.
- Add single-threaded mode for EditorResourcePreview (needed for OpenGL).
Co-authored-by: clayjohn <claynjohn@gmail.com>
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-30 02:05:48 +02:00
Aaron Franke
6772ebcea0
Move the docs for constructors and operators out of methods section
2021-10-29 12:34:57 -05:00
Hugo Locurcio
89cf17c96f
Use maximum zlib compression when generating editor translation headers
...
With comments stripped, this reduces the combined generated translation
size from 28.7 MB to 28.4 MB (-240 KB).
2021-10-29 19:07:48 +02:00
Max Hilbrunner
82f88f5d56
Merge pull request #54340 from aaronfranke/time-doc
...
Update and fix Time documentation
2021-10-29 15:49:22 +02:00
Aaron Franke
2dabdda36a
Update Time documentation
2021-10-28 10:16:56 -05:00
Rémi Verschelde
f42ef8d5f9
CI: Update to clang-format 13 using LLVM repo
2021-10-28 17:11:00 +02:00
Rémi Verschelde
f7d852b532
Merge pull request #54350 from akien-mga/clang-format-dont-align-operands
2021-10-28 17:10:52 +02:00
Rémi Verschelde
0ae65472e7
clang-format: Enable BreakBeforeTernaryOperators
...
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 15:57:41 +02:00
Rémi Verschelde
6b090e325a
Merge pull request #53526 from KoBeWi/super_print
2021-10-28 15:47:52 +02:00
Rémi Verschelde
3a6be64c12
clang-format: Various fixes to comments alignment from clang-format
13
...
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
...
Sets `AlignOperands` to `DontAlign`.
`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Gilles Roudière
a51f92273a
Remove ItemList editor and replace it by a property array
2021-10-28 10:16:51 +02:00
Anton Christoffersson
9ed8417271
Fixed crash in variant_call
when trying to memcpy 0 bytes.
2021-10-27 19:01:33 +02:00
Max Hilbrunner
5dc02eb8b0
Save all 64 bits of get_ticks_msec() in more cases
2021-10-26 13:58:58 +02:00
reduz
d03b7fbe09
Refactored Node3D rotation modes
...
* Made the Basis euler orders indexed via enum.
* Node3D has a new rotation_order property to choose Euler rotation order.
* Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis
Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations.
The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-25 14:34:00 -03:00
Rémi Verschelde
24fdedfe94
Merge pull request #54050 from reduz/animation-compression
2021-10-25 14:27:58 +02:00
Anton Christoffersson
fb7ba76325
Fixed implicit conversion of uint32_t to uint8_t in image
2021-10-25 12:51:28 +02:00
Aaron Franke
474d0f58f5
Add support for the RISC-V architecture
...
Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
2021-10-22 12:51:10 -05:00
Rémi Verschelde
f9be8b8e8e
Merge pull request #54081 from Rubonnek/add_bin_messages_master
2021-10-22 19:31:55 +02:00
Rémi Verschelde
beb3875cdf
Merge pull request #53781 from m4gr3d/restrict_project_data_dir_config_master
2021-10-22 19:30:35 +02:00
Rémi Verschelde
6c35e74228
Merge pull request #53812 from RandomShaper/expose_flush_input
2021-10-22 17:20:33 +02:00
Pedro J. Estébanez
6dc3fae201
Expose Input::flush_buffered_events()
2021-10-22 14:28:48 +02:00
Rémi Verschelde
9f7218eb69
Merge pull request #54088 from madmiraal/remove-unimplemented-methods
2021-10-22 12:59:32 +02:00
reduz
a69541da4c
Implement Animation Compression
...
Roughly based on https://github.com/godotengine/godot-proposals/issues/3375 (used format is slightly different).
* Implement bitwidth based animation compression (see animation.h for format).
* Can compress imported animations up to 10 times.
* Compression format opens the door to streaming.
* Works transparently (happens all inside animation.h)
2021-10-21 18:27:34 -03:00
Marcel Admiraal
87a4ba492e
Remove unimplemented methods
2021-10-21 18:44:25 +01:00
Rémi Verschelde
b6f4f23a5e
Merge pull request #54078 from Rubonnek/add_hex_messages_master
...
Add error messages to `String::hex_to_int`, and accept capital X in prefix
2021-10-21 19:37:11 +02:00
Wilson E. Alvarez
5736a0ed3c
Accept capital B in String::bin_to_int prefix
2021-10-21 13:18:49 -04:00
Wilson E. Alvarez
549a48ccc9
Add error messages to String::hex_to_int, and accept capital X in prefix
2021-10-21 12:40:14 -04:00
bruvzg
a975682ef6
Fix handling multiple "physical key" events in the single input map action.
2021-10-19 22:19:41 +03:00
Rémi Verschelde
4387f9645b
Merge pull request #52940 from groud/toast_notification
2021-10-19 09:57:13 +02:00
Rémi Verschelde
21f1ac8bf3
Merge pull request #53805 from groud/name_to_tileset_sources
2021-10-19 09:56:19 +02:00
ne0fhyk
b5c750fa65
Restrict the project data directory configuration
2021-10-18 14:10:38 -07:00
Rémi Verschelde
f4d9749e23
Merge pull request #53741 from DmitriySalnikov/exposed_sensor_setters_master
2021-10-18 23:00:56 +02:00
Rémi Verschelde
c5f4bf2077
Merge pull request #53950 from qarmin/memory_leak_gdscript
2021-10-18 14:02:33 +02:00
qarmin
343d005e0f
Fix memory leak in exported project
2021-10-18 11:19:31 +02:00
unknown
73c5e07051
Added better descriptive error messages for file operations in core_bind.cpp
2021-10-18 02:09:42 +05:30
mennomax
b4eeeb315a
Swap args of Plane(point, normal) constructor
...
Now (normal, point)
2021-10-15 20:49:42 -05:00
Rémi Verschelde
c133480531
SCons: List .gen.cpp
sources explicitly to avoid globbing errors
...
Whenever we change the name (or remove) generated cpp files with the `.gen.cpp`
extension, users run into build issues when switching between branches (i.e.
switching before and after the name change/removal). This is because we glob
`*.cpp` so if a now-obsolete file from a previous build is present, we'll
include it too, potentially leading to bugs or compilation failure (due to
missing headers or invalid code).
So globbing patterns in `add_source_files` will now skip files ending with
`.gen.cpp`, which should instead be passed explicitly where they're used.
2021-10-15 22:14:11 +02:00
Rémi Verschelde
cd21cc683a
SCons: Set DEBUG_ENABLED
and DEV_ENABLED
in SConstruct
...
They're the same for all platforms so they don't need to be repeated in all
platform definitions.
2021-10-15 10:26:58 +02:00
K. S. Ernest (iFire) Lee
8f0c056431
Fix specific warnings issues by Clang
...
Found by `scons dev=yes` on llvm-mingw.
2021-10-14 14:14:26 -07:00
George Marques
4c14051b3f
Zero Dictionary and Array variants when changing type with reset
...
So they don't reference to the old values anymore and instead refer to
a new value.
2021-10-14 11:22:17 -03:00
Gilles Roudière
3b42660105
Add a name to TileSet sources
2021-10-14 14:54:48 +02:00
Gilles Roudière
0587e5e018
Implement toast notifications in the editor
2021-10-14 13:30:54 +02:00
Rémi Verschelde
a801a2031d
Merge pull request #53773 from nathanfranke/fix-license-character-encoding
2021-10-13 21:04:13 +02:00
Rémi Verschelde
fd2dcba02c
Merge pull request #53772 from RandomShaper/fix_hash_map
2021-10-13 21:03:50 +02:00
Nathan Franke
28c163a432
Fix character encoding of Engine::get_copyright_info
2021-10-13 10:42:41 -05:00
Pedro J. Estébanez
f80e4e4f4c
Fix HashMap element copy leaving hash as zero
2021-10-13 17:25:31 +02:00
Rémi Verschelde
6569635ec0
Merge pull request #53757 from groud/fix_undo
2021-10-13 12:42:07 +02:00
Gilles Roudière
cf7242dd8e
Fix undo in inspector not working
2021-10-13 10:45:21 +02:00
Rémi Verschelde
6f1d2133bb
Merge pull request #52495 from kdiduk/issue-52491-fix-value-conversion-in-hashfuncs-header
...
#52491 Cosmetic: fix type cast so that it matches return value type
2021-10-12 22:38:39 +02:00
Rémi Verschelde
b48c6418fe
Merge pull request #52293 from neikeq/class-db-api-type-bug
...
Fix ClassDB API type mismatch bug between --editor and player
2021-10-12 22:34:21 +02:00
Дмитрий Сальников
9b38e04fff
Exposed setters for sensor values in Input class
2021-10-12 23:26:03 +03:00
CaptainProton42
a9aba86943
Fetch extension class props from ClassDB
...
Extension class properties that have been registered with
ClassDB(`GDNativeInterface::classdb_register_extension_class_property`)
were not fetched previously. (Only directly providing a property
list using `GDNativeExtensionClassCreationInfo::get_property_list_func`
would work.) This especially caused problems with the C++
bindings since they exclusively rely on ClassDB to register properties.
2021-10-12 18:25:55 +02:00
Gilles Roudière
5504e11fb7
Fix useless debug print
2021-10-12 17:03:39 +02:00
Rémi Verschelde
480fc31450
Merge pull request #53713 from groud/add_force_keep_on_undo_redo_merge_ends
2021-10-12 15:33:20 +02:00
Fabio Alessandrelli
74b46bb220
[Net] Fix spawn/despawn custom callable argument.
...
Was always reporting it to be a spawn, even for despawns.
2021-10-12 14:18:16 +02:00
Gilles Roudière
1be00864b7
Add a way to force undo/redo operations to be kept in MERGE_ENDS mode
2021-10-12 14:03:05 +02:00
Rémi Verschelde
0fd50ff217
Merge pull request #52736 from aaronfranke/lgtm-mult
...
Fix some LGTM errors of "Multiplication result converted to larger type"
2021-10-12 08:38:46 +02:00
Rémi Verschelde
1bd6a2f020
Merge pull request #52548 from m4gr3d/customize_metadata_dir_master
...
Make the project data directory customizable
2021-10-12 08:26:47 +02:00
Aaron Franke
7e51e4cb84
Fix some LGTM errors of "Multiplication result converted to larger type"
2021-10-12 00:17:27 -05:00
Juan Linietsky
610de0974d
Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and NodeAnimation"
2021-10-11 19:27:50 -03:00
ne0fhyk
3e44a6375e
Make the project data directory customizable.
2021-10-11 14:40:14 -07:00
Rémi Verschelde
9ed4f8367b
Merge pull request #48332 from TokageItLab/implement-ping-pong
2021-10-11 22:55:01 +02:00
Yuri Roubinsky
e270d1cce3
Fix autocompletion of built-in functions in GDScript
2021-10-11 19:06:17 +03:00
Tokage
372ba76663
implement ping-pong loop in animation
...
Co-authored-by: Chaosus <chaosus89@gmail.com>
2021-10-09 18:08:43 +09:00
mashumafi
575d4e00b6
Enhance and cleanup stringify for Vector
2021-10-09 06:19:25 +00:00
Pedro J. Estébanez
73697d4de6
Avoid the need for copy assignment in HashMap key/data types
2021-10-08 20:06:07 +02:00
Rémi Verschelde
26b3aff01d
Merge pull request #53517 from ColinKinloch/native_callback_typedef
2021-10-08 14:28:36 +02:00
Rémi Verschelde
cdaa52a820
Merge pull request #53555 from Pineapple/faster-int-string-dictionary
2021-10-08 14:26:48 +02:00
Fabio Alessandrelli
54ec66a700
[Net] Rename RPCConfig.sync to call_local.
...
For consistency with the other user facing changes.
2021-10-08 12:39:09 +02:00
Bartłomiej T. Listwon
4a723842b6
Faster hash_compare for integer and string keys in dictionaries
2021-10-08 10:09:13 +02:00
Rémi Verschelde
49e7e049ab
Merge pull request #53422 from KoBeWi/add_LUA_to_Godot
2021-10-07 23:37:37 +02:00
Rémi Verschelde
6090f90743
Merge pull request #53545 from vnen/gdscript-release
2021-10-07 23:28:34 +02:00
Rémi Verschelde
5abc966be4
Merge pull request #53500 from vnen/variant-in-string-name
2021-10-07 22:51:00 +02:00
George Marques
fafa8c7f6e
Enable method type information on release builds
...
This is needed to ensure GDScript compilation works properly on release
builds and make use of optimized typed instructions.
2021-10-07 16:13:44 -03:00
kobewi
31012fd060
Change print_line() to use any number of Variants
2021-10-07 16:28:22 +02:00
Hugo Locurcio
bcf4a56c74
Replace references to VisualServer in code comments with RenderingServer
...
VisualServer no longer exists in the `master` branch.
2021-10-07 15:49:41 +02:00
Colin Kinloch
a66e59be84
Add typedef to GDNativeInstanceBindingCallbacks
2021-10-07 11:59:18 +01:00
George Marques
13a2d03dde
Add Variant in
operator for any String/StringName operands
...
Allow using String or StringName types as operand in any position of the
`in` operator, which is more convenient in scripting when interacting
with data in the engine (such as a Node name).
2021-10-06 22:07:32 -03:00
Brian Semrau
f28c677f3d
[core_bind] Add is_alive
to Thread. Replace is_active
with is_started
.
...
Replacing `is_active` resolves an API discrepancy between core_bind Thread and core/os Thread.
2021-10-06 12:47:58 -04:00
Kirill Diduk
1f38b00242
#52491 Cosmetic: fix type cast and add comment with the algorithm source
2021-10-05 21:40:33 +02:00
Rémi Verschelde
a7ba227631
Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_master
2021-10-05 21:02:27 +02:00
Rémi Verschelde
a603b2d7c7
Merge pull request #47497 from briansemrau/nan-inf-tscn-parsing-bug
2021-10-05 19:57:33 +02:00
Thakee Nathees
3f3ed5d34c
NaN, INF read/write bug fixed
...
Fix : #40589
2021-10-05 09:25:49 -04:00
Fabio Alessandrelli
e8f7b79bb0
[File] Fix FileAccessCompressed::get_buffer return value.
...
It used to return the write index instead of the written bytes (i.e.
index + 1) when reading until last block.
2021-10-05 15:12:51 +02:00
Maxime Lapointe
29dc8de88b
Improve error message when instantiating virtual class
2021-10-05 08:09:35 -04:00
kobewi
9e5fdbc79d
Fix LUA-style assignment in Dictionary
2021-10-05 12:17:13 +02:00
Rémi Verschelde
2ac320681a
Merge pull request #53225 from aaronfranke/c-locale
2021-10-05 11:20:08 +02:00
Rémi Verschelde
3479aaa369
Merge pull request #53405 from winterpixelgames/PR-more-error-logging-release
2021-10-05 08:43:07 +02:00
Jordan Schidlowsky
b78d399f91
revert 0d7409a
so additional error information prints in release builds
2021-10-04 16:55:01 -06:00
kobewi
cdac60759e
Add support for unbinding in connection dialog
2021-10-04 21:41:21 +02:00
Rémi Verschelde
b85dfd990e
GDScript completion: Handle quote style ad-hoc to remove editor dependency
...
`core` and `scene` shouldn't depend on `editor`, so they can't query this style
setting in `get_argument_options`. But we can handle it after the fact in
GDScript's completion code.
Also cleans up a couple extra unused invalid includes in `core`.
2021-10-04 16:16:05 +02:00
Rémi Verschelde
463dbe5210
Merge pull request #53270 from akien-mga/charproxy-add-copy-constructor
2021-10-04 10:39:37 +02:00
Rémi Verschelde
90f8eb7aa0
Merge pull request #53059 from timothyqiu/thread-obj
...
Fix crash when creating thread
2021-10-02 02:15:43 +02:00
Rémi Verschelde
01cb4d92f3
Merge pull request #47442 from Shatur/fix-connect-reference-counted
2021-10-01 22:41:11 +02:00
Fabio Alessandrelli
366e374f76
Merge pull request #53290 from Faless/mp/4.x_opts_names
...
[Net] Rename RPC constants and annotation arguments.
2021-10-01 21:35:08 +02:00
Fabio Alessandrelli
24a949ea11
[Net] Rename RPC constants and annotation arguments.
...
any -> any_peer
sync -> call_local
ordered -> unreliable_ordered
Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER
Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED
2021-10-01 18:14:38 +02:00
bruvzg
0c0b5c84b0
Implement TextServer GDExtension interface, remove TextServer GDNative interface.
2021-10-01 15:13:29 +03:00
Eric M
ad30b0a8dd
Allow shortcuts to have any number of bindings. Updated UI as required.
2021-10-01 18:04:28 +10:00
Rémi Verschelde
b32f84d473
Merge pull request #52850 from mashumafi/vector-bsearch
2021-10-01 07:52:51 +02:00
mashumafi
214bbfbefe
Implement bsearch for Vector and Packed*Array
2021-09-30 23:57:26 +00:00
Lightning_A
c63b18507d
Use range iterators for Map
2021-09-30 15:09:12 -06:00
Rémi Verschelde
cc57cbb73a
CharProxy: Add copy constructor
...
Adding the copy constructor is needed to solve a `-Wdeprecated-copy` warning
from GCC and Clang, which is raised when upgrading doctest from 2.4.4 to 2.4.6.
2021-09-30 23:06:40 +02:00
Juan Linietsky
c370b4c4d0
Merge pull request #52544 from JFonS/lod_fixes
...
Auto LOD fixes and improvements
2021-09-30 14:49:11 -03:00
Rémi Verschelde
3a19400889
Merge pull request #48685 from bruvzg/bundle_icon_4
2021-09-30 14:55:04 +02:00
Rémi Verschelde
bc0f5d3dde
Merge pull request #53251 from LATRio/53224
2021-09-30 13:42:45 +02:00
Max Hilbrunner
ac7505e277
Merge pull request #53227 from Calinou/rename-getornull
...
Rename RID's `getornull()` to `get_or_null()`
2021-09-30 12:56:01 +02:00
LATRio
41c1cfe28e
InputEventJoypadMotion::set_axis - reject invalid axis
2021-09-30 19:32:21 +09:00
Rémi Verschelde
4a9a231566
Merge pull request #53230 from nekomatata/fix-2d-bvh-overflow
2021-09-30 10:24:18 +02:00
Hugo Locurcio
ba65730cbf
Rename RID's getornull()
to get_or_null()
2021-09-29 23:58:02 +02:00
Rémi Verschelde
4028583e81
Merge pull request #53044 from lucypero/thread_override
2021-09-29 22:43:06 +02:00
PouleyKetchoupp
d3c6395dcd
Fix buffer overflow in 2D BVH
...
Some areas of code were missed and assumed Vector3.
2021-09-29 12:10:23 -07:00
Lucy
5fe1857496
Fix Platform Thread Override
2021-09-29 15:38:04 -03:00
Aaron Franke
1cbec15084
Add locale rename for the "C" locale
2021-09-29 11:57:53 -05:00
Rémi Verschelde
2fc31fdfca
Merge pull request #53217 from Faless/ext/fix_pointer_info
2021-09-29 17:41:58 +02:00
Haoyu Qiu
40e188f687
Fix crash when creating thread
2021-09-29 22:08:12 +08:00
Fabio Alessandrelli
0276c2e74a
Fix const pointers types in docs and extension API.
...
The GDVIRTUAL_NATIVE_PTR did not declare the correct GDNativeConstPtr
template, resulting in "void*" being used as it's type info in both the
documentation and the extension API dump.
2021-09-29 16:04:20 +02:00
O01eg
9302b6547a
Implement override of get_message and get_plural_message
2021-09-29 14:19:14 +03:00
Anilforextra
fc9767abb1
Use functions defined in the their classes.
2021-09-29 09:36:34 +05:45
Fabio Alessandrelli
d18cbdf5e4
Merge pull request #52481 from Faless/net/4.x_native_peers
...
[Net] Extension system for network peers, webrtc.
2021-09-28 12:57:45 +02:00
fabriceci
e4cfcfc424
Replace auto completion shortcut for mac
2021-09-28 11:25:11 +02:00
Rémi Verschelde
ed5267f69f
Merge pull request #53053 from LATRio/callable_in_thread_start
2021-09-28 11:10:09 +02:00
Hennadii Chernyshchyk
dbb37e586b
Fix inversed check inside register_singleton
2021-09-28 00:17:31 +03:00
jfons
9e1810695c
Auto LOD fixes and improvements
...
* Fixed LODs for shadow meshes.
* Added a merging step before simplification. This helps with tesselated
meshes that were previously left untouched. The angle difference at
wich edges ar considered "hard" can be tweaked as an import setting.
* LODs will now start with the highest decimation possible and keep
doubling (approximately) the number of triangles from there. This
makes sure that very low triangle counts are included when possible.
* Given more weight to normal preservation.
* Modified MeshOptimizer to report distance-based error instead of
including attributes in the reported metrics.
* Added attribute transference between the original mesh and the
various LODs. Right now only normals are taken into account,
but it could be expanded to other attributes in the future.
2021-09-27 17:04:56 +02:00
Haoyu Qiu
b024d16bc1
Parse UTF-8 when getting path from resource UID
2021-09-27 19:10:32 +08:00
Rémi Verschelde
79e33f8b71
Merge pull request #53058 from LATRio/52191
...
check if 'shortcut' in InputEventShortcut is valid
2021-09-26 08:38:12 +02:00
LATRio
eae7f1c1ae
validate 'shortcut' in InputEventShortcut
2021-09-26 11:06:16 +09:00
Rémi Verschelde
c7f67daccd
Merge pull request #52855 from Calinou/engine-editor-hint-getter-only
2021-09-25 22:09:51 +02:00
LATRio
97c68514c4
Use Callable in Thread::start
2021-09-25 22:07:13 +09:00
Rémi Verschelde
0abe464162
Merge pull request #52849 from KoBeWi/know_no_binds
2021-09-25 00:10:56 +02:00
John Wigg
ccf05aeb9a
Fix Face3::get_random_point_inside()
...
Use correct overload of Math::random(from, to) to return floating point values within the correct range.
2021-09-24 21:41:17 +02:00
Fabio Alessandrelli
25226329be
[Net] MultiplayerPeer cleanup, defaults.
2021-09-24 18:40:39 +02:00
Fabio Alessandrelli
7c81ce43ec
[Net] Bind Multiplayer to GDExtension.
2021-09-24 18:40:39 +02:00
Fabio Alessandrelli
5f61b2c797
[Net] StreamPeer GDExtension.
2021-09-24 18:40:39 +02:00
Fabio Alessandrelli
b9e6cc8f4f
[Net] Enable PacketPeer native extensions.
2021-09-24 18:40:39 +02:00
kobewi
7bf5fc709e
Remove binds from Signal.connect
2021-09-24 17:07:33 +02:00
Rémi Verschelde
32ab77ef8f
Merge pull request #52430 from AnilBK/vector2-replacements
2021-09-24 13:04:42 +02:00
Hugo Locurcio
6def32d643
Replace #pragma once
by traditional include guards for consistency
...
`#pragma once` was used in a few files, yet we settled on using
traditional include guards instead.
The PooledList template comment was also moved to allow editors
such as Visual Studio Code to display the comment when hovering
PooledList.
`app.h` was renamed to `app_uwp.h` to be less generic for the
include guard.
2021-09-24 02:33:15 +02:00
Anilforextra
cc51b045da
Construct values only when necessary.
2021-09-23 22:26:07 +05:45
Fabio Alessandrelli
f9ce9a8e10
[ClassDB] Unify construct/extension retrieval.
2021-09-22 18:33:29 +02:00
Fabio Alessandrelli
f724bd1880
[Core] Add ClassDB functions to retrieve/construct extensions.
...
Calling the constructor alone is not enough if the class to be
instantiated is not a base class.
This commit adds two functions, one for retrieving the the extension
class reference, the other to construct an instance using the
constructor and the extension class reference.
2021-09-22 17:46:08 +02:00
Rémi Verschelde
ba57252bd8
Merge pull request #52878 from AnilBK/add-get-center
2021-09-21 21:30:30 +02:00
Anilforextra
90908cd67d
Add Get Center Method for Rect2/Rect2i and AABB.
2021-09-21 21:14:17 +05:45
Rémi Verschelde
61ce8b206e
Merge pull request #52877 from Calinou/add-print-verbose
...
Add `print_verbose()` built-in function to print in verbose mode only
2021-09-21 17:00:58 +02:00
Hugo Locurcio
650b1db4b8
Add print_verbose()
built-in function to print in verbose mode only
...
This can be used as a shorthand for:
if OS.is_stdout_verbose():
print("...")
Unlike `print_debug()`, this works in release builds too and can
be toggled off in debug builds.
2021-09-21 15:59:49 +02:00
Eric M
28b7c1be80
Improve implementation of builtin action overrides
2021-09-21 22:25:31 +10:00
Hugo Locurcio
2560070c0a
Remove Engine.editor_hint
in favor of Engine.is_editor_hint()
...
The `Engine.set_editor_hint()` setter method is no longer exposed
to scripting, which makes the property effectively read-only from
an user perspective.
2021-09-20 14:24:39 +02:00
Rémi Verschelde
0068247ab6
Merge pull request #52513 from Ev1lbl0w/fix_path_double_slash
...
Fix path with multiple slashes not being corrected on templates
2021-09-20 13:00:29 +02:00
Rémi Verschelde
89417ba75b
Merge pull request #52398 from deakcor/dev-transform
2021-09-20 08:46:51 +02:00
Vincent D
aa82cb6f35
Expose get_skew for transform2d and add new constructor
...
Expose set_scale and set_skew for transform2d
Replacing float by real_t
Adding const parameters
Updated transform2d doc
2021-09-19 17:10:05 +02:00
George Marques
262d9397fb
Allow indexing of String values in scripting languages
2021-09-17 16:24:56 -03:00
Rémi Verschelde
220b69ab56
Merge pull request #52450 from aaronfranke/they-came-from-scale
...
Replace Vector3.to_diagonal_matrix with Basis.from_scale
2021-09-17 19:38:36 +02:00
George Marques
455e142d37
Allow comparing equality between builtin types and null
2021-09-17 12:33:52 -03:00
Aaron Franke
bf0213470c
Replace Vector3.to_diagonal_matrix with Basis.from_scale
2021-09-17 10:30:30 -05:00
Rémi Verschelde
191c34eb0d
Merge pull request #52734 from lucypero/thread_override_master
2021-09-16 21:45:04 +02:00
Lucy
e9723efd34
Allow for platform Thread implementation override
2021-09-16 11:23:29 -03:00
Rémi Verschelde
104a6191fd
Merge pull request #52739 from BastiaanOlij/gdextension_array_index
2021-09-16 15:15:02 +02:00
Rémi Verschelde
46e37545b8
Merge pull request #52740 from akien-mga/os-get_locale-language
...
Implement `OS::get_locale_language()` helper method
2021-09-16 14:23:06 +02:00
Bastiaan Olij
25d0e4bb5b
Add GD extensions operator functions for arrays
2021-09-16 22:00:51 +10:00
Rémi Verschelde
ca5c28fed4
Merge pull request #52358 from kleonc/astar_error_messages
...
`AStar` Add error messages
2021-09-16 13:36:13 +02:00
Rémi Verschelde
910c7dbdb7
Merge pull request #52735 from BastiaanOlij/gdextension_property_group
...
Add property group and subgroup registration to extensions
2021-09-16 11:02:59 +02:00
Rémi Verschelde
def99c7baf
Implement OS::get_locale_language()
helper method
...
This method extracts the 2 or 3-letter language code from `OS::get_locale()`,
making it easier for users to identify the "main" language code for users
that might have different OS locales due to different OS or region, but
should be matched to the same translation (e.g. "generic" Spanish).
Fixes #40703 .
2021-09-16 09:34:58 +02:00
Juan Linietsky
e2bd0a0a73
Merge pull request #52571 from timothyqiu/expose-enum
...
Expose enum related methods in ClassDB
2021-09-15 23:43:35 -03:00
Bastiaan Olij
12868791f2
Add property group and subgroup registration to extensions
2021-09-16 12:37:43 +10:00
ne0fhyk
69f890ff11
Provide a getter for the project data directory.
2021-09-15 12:52:03 -07:00
Aaron Franke
5d03c0e0b6
Fix String::num_real and String test cases when compiling with doubles
2021-09-15 13:41:12 -05:00
Rémi Verschelde
fbef32ab46
Merge pull request #52693 from akien-mga/fixup-inputmap-macos-override
...
InputMap: Fixup `macos` feature tag overrides after #52291
2021-09-15 13:20:40 +02:00
Rémi Verschelde
07a58230ea
InputMap: Fixup macos
feature tag overrides after #52291
...
Fixes #52691 .
2021-09-15 11:48:54 +02:00
Jacob Edie
2b292a1a2a
--single-window is passed through project manager.
...
This means you can start godot with --single-window
2021-09-15 10:20:50 +02:00
Rémi Verschelde
3705ad7d8f
Merge pull request #52123 from lightspot21/fix-placement-new-warning
...
Silence false-positive warning for malformed placement new on GCC 11.1
2021-09-15 09:31:42 +02:00
Rémi Verschelde
0e7beb183a
Merge pull request #52562 from BastiaanOlij/gd_extensions_register_drivers
...
Add driver types to GD extension initialisation levels
2021-09-15 08:46:43 +02:00
Rémi Verschelde
1201ba6649
Merge pull request #52291 from Calinou/inputmap-rename-osx-macos
...
Rename `osx` to `macos` in input map feature tag handling
2021-09-15 08:45:46 +02:00
Hugo Locurcio
9b1986fb9c
Rename osx
to macos
in input map feature tag handling
...
This follows the general feature tag rename for 4.0.
2021-09-15 03:12:18 +02:00
PouleyKetchoupp
2ca94e51e4
Clean convex hull decomposition code
...
Remove unnecessary conversion between triangle data and vertex data
whenever possible.
2021-09-14 17:14:06 -07:00
Grigoris Pavlakis
abef2b7194
Fix placement new on zero-sized region warning on GCC 11.1
...
On latest (11.1 as of this commit) GCC, the following warning is
continuously issued during build:
warning: placement new constructing an object of type
'SafeNumeric<unsigned int>' and size '4' in a region of type
'uint32_t*' {aka 'unsigned int*'} and size '0' [-Wplacement-new=]
This happens because on 98ceb60eb4
the new operator override used
was dropped and replaced with standard placement new. GCC sees the
subtraction from the pointer and complains as it thinks that the
SafeNumeric is placed outside an allocation, not knowing that the
address requested is already inside one.
After suggestions, the false positive is silenced, with no other
changes.
2021-09-15 00:07:21 +03:00
Fabio Alessandrelli
c5a979eba5
Merge pull request #52613 from V-Sekai/fix_custom_sync_commands
...
Fix custom multiplayer sync commands
2021-09-14 21:27:12 +02:00
Rémi Verschelde
1cec7057bf
Merge pull request #52535 from e8newallm/52490-type_conversion
...
Added explicit type conversion to uint32_t
2021-09-14 15:36:52 +02:00
Aaron Franke
3a902c66c4
Revert some URLs from the "Replace HTTP URLs with HTTPS" PR
2021-09-13 15:18:35 -05:00
Rémi Verschelde
70ba366743
Merge pull request #50375 from Paulb23/code_edit_unit_tests
2021-09-13 21:51:20 +02:00
Rémi Verschelde
41562b9198
Merge pull request #52049 from theraot/master
2021-09-13 16:49:24 +02:00
Matthew Newall
f048a9ad4e
Added explicit type conversions
2021-09-13 14:26:47 +00:00
Bastiaan Olij
f9849a2717
Add driver types to GD extension initialisation levels
2021-09-13 18:50:00 +10:00
SaracenOne
dace12082b
Fix custom multiplayer sync commands
2021-09-12 21:20:10 +01:00
Haoyu Qiu
d2aef4c439
Expose enum related methods in ClassDB
2021-09-11 20:33:05 +08:00
Juan Linietsky
6679790fac
Merge pull request #52406 from ellenhp/libvorbis
...
Replace stb_vorbis with libvorbis
2021-09-10 16:24:59 -03:00