Commit Graph

5677 Commits

Author SHA1 Message Date
gnumaru
75e617c05d fix a buffer overflow due to a misbehaving vcrt snprintf call on String::num, at core/string/ustring.cpp 2022-11-09 10:25:52 -03:00
Aaron Franke
a3e52925bf
Fix default values on virtual classes causing errors in projects 2022-11-09 01:59:53 -06:00
Emmanuel Leblond
1e8756c94b
Use StringName in the whole GDExtension API instead of const char * 2022-11-08 21:44:07 +01:00
Emmanuel Leblond
84262efd2a
Uses StringName in GDExtension perf critical instance creation & method/properties setter/getter 2022-11-08 21:44:07 +01:00
Rémi Verschelde
40ed34f6dc
Merge pull request #68373 from akien-mga/extension-api-json-newline-eof
GDExtension: Ensure newline at EOF
2022-11-08 10:50:46 +01:00
kobewi
d9f066d5fa Remove duplicate project settings definitions 2022-11-08 01:29:39 +01:00
Rémi Verschelde
669888b9cf
GDExtension: Ensure newline at EOF 2022-11-07 14:32:43 +01:00
Aaron Franke
3dc9474355
Fix default values not showing up on virtual classes 2022-11-06 15:05:36 -06:00
Rémi Verschelde
e95dec0c64
Merge pull request #67614 from aaronfranke/virtually-virtual
Don't allow instancing virtual node types in the Create New Node dialog
2022-11-06 15:57:49 +01:00
Rémi Verschelde
12b4a263ee
Merge pull request #67730 from KoBeWi/late_to_the_call
Add call_deferred() method to Callable
2022-11-06 15:55:43 +01:00
Aaron Franke
ba542444e3
Don't allow instancing virtual node types in the Create New Node dialog 2022-11-05 14:45:16 -05:00
kobewi
1778301cd0 Add call_deferred() method to Callable 2022-11-04 17:24:34 +01:00
kobewi
8a47a12207 Add support for empty delimiter in String.split 2022-11-04 15:09:12 +01:00
bruvzg
d77902f33a
Implement SVG in OT support. 2022-11-04 14:10:54 +02:00
Micky
521d8a5d24 Remove "?" from String.c_escape() 2022-11-03 19:52:21 +01:00
Rémi Verschelde
3eaf49765b
Merge pull request #68192 from aaronfranke/unify-node3d-euler
Unify Node3D RotationOrder with global EulerOrder
2022-11-03 12:07:42 +01:00
Aaron Franke
9e952c8386
Allow getting Quaternion rotation in different Euler orders 2022-11-02 19:20:10 -05:00
Aaron Franke
9225eb461e
Unify Node3D RotationOrder with global EulerOrder 2022-11-02 17:46:03 -05:00
Rémi Verschelde
08d56ac2f1
Merge pull request #66747 from aaronfranke/move-euler-order
Move EulerOrder enum to math_defs.h and global scope
2022-11-02 22:37:12 +01:00
Rémi Verschelde
9ec7aadc06
Merge pull request #66017 from Mickeon/rename-image-copy-rect
Rename Image's `get_rect` to `get_region`
2022-11-02 22:36:57 +01:00
Aaron Franke
8556fdd4bc
Move EulerOrder enum to math_defs.h and global scope 2022-11-02 13:44:13 -05:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Rémi Verschelde
39cece382d
Merge pull request #68170 from alfredbaudisch/clear-selection-shortcut
Unified shortcut to clear carets and selections from TextEdit
2022-11-02 18:54:19 +01:00
Rémi Verschelde
d2e1b4b9f0
Merge pull request #68118 from aaronfranke/quat-from-euler
Replace Quaternion Euler constructor with `from_euler` method
2022-11-02 18:51:59 +01:00
Rémi Verschelde
62ed75df9c
Merge pull request #64830 from dalexeev/color-hide-internals
Remove internal functions of named colors from the public API
2022-11-02 18:51:27 +01:00
Rémi Verschelde
d3a6855dfc
Merge pull request #66361 from dalexeev/remove-int-plus-string
Unexpose confusing `String + int` and `int + String` operations
2022-11-02 18:51:16 +01:00
Alfred Reinold Baudisch
a862583d05 Unified shortcut to clear carets and selections
Refactors`ui_text_remove_secondary_carets` from https://github.com/godotengine/godot/pull/68089 as `ui_text_clear_carets_and_selection`, with extra behaviour:

- If there's only one active caret active with a selection, clears the selection.
- In case there's more than one caret active, removes the secondary carets and clears selections.

With this change, `TextEdit` then imitates the behaviour of VSCode for clearing carets and selections.
2022-11-02 18:23:24 +01:00
Rémi Verschelde
b3c2db954f
Merge pull request #68136 from qarmin/projection_not_equal
Support for checking that Projection is(not) null
2022-11-02 14:17:29 +01:00
Rémi Verschelde
632b3e974c
Merge pull request #67693 from Mickeon/slight-hint-shuffling
Fix unordered values of PROPERTY_HINT_INT_IS_POINTER & ARRAY_TYPE
2022-11-02 14:16:53 +01:00
Micky
ebf86c96e9 Rename Image's get_rect to get_region
Also renames its parameter to from "rect" to "region".
2022-11-01 23:35:48 +01:00
Rafał Mikrut
d7d130295e Support for checking that Projection is(not) null 2022-11-01 20:49:52 +01:00
Aaron Franke
83634119d4
Replace Quaternion Euler constructor with from_euler method 2022-11-01 09:28:12 -05:00
dzil123
1fa8b3dd42 Fix Image::bump_map_to_normal_map incorrectly keeping mipmap flag 2022-11-01 03:54:04 -07:00
Alfred Reinold Baudisch
fcff978763 Shortcut and Bind to Remove Secondary Carets
Adds the bind `ui_text_remove_secondary_carets` to TextEdit, with ESC as the default shortcut.

When the bind is performed, if the TextEdit has multiple carets, `remove_secondary_carets` is called and secondary carets are removed.

This is useful when multiple selects are performed with `add_select_for_next_occurrence` #67644 or when multiple multiple carets are manually added, then it's possible to go back to a single caret with a shortcut.

Closes #67991
2022-10-31 17:44:47 +01:00
Rémi Verschelde
0e9878b12a
Merge pull request #67931 from bruvzg/locale_no_def
Do not auto add default script and country codes to the locale.
2022-10-31 14:30:18 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
be126d42d4
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
Simplify GDVIRTUAL_CALL calls
2022-10-31 11:55:56 +01:00
Rémi Verschelde
6946bc56ef
Merge pull request #67309 from groud/implement_gdnative_interface_h_dump
Implement a way to dump the gdnative_interface.h file from the executable
2022-10-31 11:54:38 +01:00
Rémi Verschelde
40258bbbe8
Merge pull request #67577 from qarmin/fix_exporting_big_templates
Fix exporting with big export templates
2022-10-31 10:39:08 +01:00
Rémi Verschelde
d0fbeec66a
Merge pull request #67580 from KoBeWi/little_things
Minor code improvements
2022-10-31 10:34:57 +01:00
Rémi Verschelde
273410ba5a
Merge pull request #67139 from PucklaMotzer09/insert_caret_at_carets
Add Caret Insert Below and Above shortcuts to TextEdit
2022-10-31 10:32:07 +01:00
Clay John
e3b66ff9e3
Merge pull request #67621 from groud/resource_saver_expose_recognize_path
Expose the logic to recognize a save path in ResourceSaver
2022-10-28 10:56:32 -07:00
Gilles Roudière
e23f82f3c1 Expose the logic to recognize a save path in ResourceSaver 2022-10-28 11:15:25 +02:00
kobewi
d7ebf725c9 Fix nested actions in EditorUndoRedoManager 2022-10-28 02:54:55 +02:00
Clay John
0486810697
Merge pull request #67644 from alfredbaudisch/add-selection-next-occurrence
Add Selection and Caret for Next Occurrence of Selection
2022-10-27 17:21:49 -07:00
Clay John
682156e1f0
Merge pull request #66383 from aaronfranke/basis-from-euler
Clean up Basis from Euler code
2022-10-27 09:44:21 -07:00
bruvzg
ec3c4fcba9
Do not auto add default script and country codes to the locale. 2022-10-27 09:31:05 +03:00
Yuri Rubinsky
adec51cde8 Fix crash when calling fill method on an empty Image 2022-10-24 11:28:10 +03:00
Fredia Huya-Kouadio
8b37511364
Merge pull request #67755 from m4gr3d/input_event_screen_touch_double_tap_main
Add double_tap attribute to InputEventScreenTouch
2022-10-23 08:11:49 -07:00
Yuri Rubinsky
38691d5b1d
Merge pull request #67655 from MewPurPur/remove-dupe-registrations 2022-10-23 09:54:06 +03:00
Fredia Huya-Kouadio
13e4770b97 Add double_tap attribute to InputEventScreenTouch
This provides parity with the `InputEventMouseButton` allowing for proper conversion between the two events.
2022-10-22 07:30:46 -07:00
Aaron Franke
7f9a8c99c9
Clean up Basis from Euler code 2022-10-21 17:54:49 -05:00
Max Hilbrunner
e73ff0e961
Merge pull request #67636 from groud/fix_localize_path
Fix localize_path with custom protocol identifiers
2022-10-21 18:47:21 +02:00
Max Hilbrunner
5cefc07d90
Merge pull request #67444 from nonunknown/array_pick_random
Add ability to pick random value from array
2022-10-21 16:25:52 +02:00
Danil Alexeev
653e8f5c86
Remove internal functions of named colors from the public API 2022-10-21 11:21:43 +03:00
Alfred Reinold Baudisch
7d15ecc3af Add Selection and Caret for Next Occurrence of Selection
Adds the bind `add_selection_for_next_occurrence` to TextEdit, with CTRL+D as the default shortcut.

When the bind is performed, ff a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence.

If no selection is currently active with the last caret in text fields, selects the word currently under the caret.

The action can be performed sequentially for all occurrences of the selection of the last caret and for all existing carets. The viewport is adjusted to the latest newly added caret.

The bind and the behaviour is similar to VS Code's "Add Selection to Next Find Match" and JetBrains' "Add Selection for Next Occurrence". It takes advantage of the multi-caret API.

The default shortcut for `select_word_under_caret` has been changed to ALT+G, in order to give priority to CTRL+D for `add_selection_for_next_occurrence` to better align with popular IDEs and editors.
2022-10-21 08:26:53 +02:00
Micky
9a1d87f66f Fix unordered values of PROPERTY_HINT_INT_IS_POINTER & ARRAY_TYPE 2022-10-21 01:10:38 +02:00
Simo Haasanen
4cc3489bc0 Fixes HashMap::erase related race condition in WorkerThreadPool when Physics 2D or 3D is selected to run on a separate thread. 2022-10-20 17:47:20 +01:00
Gilles Roudière
56fa8f1d58 Fix localize_path with custom protocol identifiers 2022-10-20 14:12:25 +02:00
Nonunknown
9f4dbf415d add ability to pick random value from array 2022-10-20 08:39:47 -03:00
VolTer
1fd59b98fb Remove duplicate operator registrations 2022-10-20 03:03:47 +02:00
Nong Van Tinh
5194c8af7c Fixes engine crashes caused by the user failing to initialize PCKPacker with pck_start() 2022-10-19 20:19:02 +07:00
Rafał Mikrut
86fa3ba560 Fix exporting big templates 2022-10-19 08:29:29 +02:00
kobewi
d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
kobewi
4aaed4fee1 Minor code improvements 2022-10-18 16:44:57 +02:00
PucklaMotzer09
e5354cacd0 Add Caret Insert Below and Above shortcuts to TextEdit 2022-10-18 10:38:53 +02:00
Rémi Verschelde
fde8838316 Merge pull request #67463 from aaronfranke/num-real-negative
Fix big negative numbers printing incorrect decimals in `num_real`
2022-10-17 17:31:47 +02:00
Rémi Verschelde
00d44a9c73 Merge pull request #67118 from Mickeon/
Fix Typed Array of Objects not accepting `null`.
2022-10-17 17:30:38 +02:00
Ricardo Buring
1d5aa74ac3 GDExtension: add support for abstract and virtual classes 2022-10-16 09:02:49 +02:00
Aaron Franke
c60ac64e8f
Fix big negative numbers printing incorrect decimals in num_real 2022-10-15 17:57:54 -05:00
Rémi Verschelde
dc4b616596 Merge pull request #63332 from KoBeWi/static_images_aka_photos
Make some Image methods static
2022-10-15 12:56:57 +02:00
Rémi Verschelde
96ec73f3ee Merge pull request #65281 from MisterMX/zip-module
Expose minizip API to allow creating zips using scripts
2022-10-15 12:56:26 +02:00
Marcelo Fernandez
ea6cc3e260 Expose minizip API to allow creating zips using scripts
Co-authored-by: Marcelo Fernandez <marcelofg55@gmail.com>
Co-authored-by: James Westman <flyingpimonster@gmail.commail>
Co-authored-by: MisterMX <mbxd12@web.de>

Signed-off-by: MisterMX <mbxd12@web.de>
2022-10-14 21:51:38 +02:00
kobewi
072f6feaba Make some Image methods static 2022-10-14 14:34:15 +02:00
Rémi Verschelde
926429392a
Merge pull request #67057 from Anutrix/rng-generator-default-seed 2022-10-13 21:17:09 +02:00
Rémi Verschelde
46a1b92bb7
Merge pull request #66294 from reduz/optimize-convex-collision 2022-10-13 20:34:00 +02:00
Juan Linietsky
71d2e38cb5 Optimize Convex Collision
Implements the Gauss Mapping optimization to SAT convex collision test.

* Described [here](https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2013/slides/822403Gregorius_Dirk_TheSeparatingAxisTest.pdf) by Dirk Gregorius.
* Requires adding of face information to edges in MeshData
* Took the chance to convert MeshData to LocalVector for performance.
2022-10-13 19:07:53 +02:00
Rémi Verschelde
6ad5637ffc Merge pull request #66427 from Mickeon/object-methods-autocompletion
Add autocompletion to several Object methods
2022-10-13 18:41:24 +02:00
Rémi Verschelde
99bc4905cb Merge pull request #67138 from touilleMan/gdextension-typed-enum-in-struct
Use enum type in GDExtension info structs for better readability
2022-10-13 15:25:11 +02:00
Rémi Verschelde
f12c4e8b9a Merge pull request #67251 from groud/simplify_path_solve_urls
Make String.simplify_path keep the protocol identifier for urls
2022-10-13 15:24:18 +02:00
Gilles Roudière
bf1a40c168 Make String.simplify_path keep the protocol identifier for urls 2022-10-13 12:23:49 +02:00
Gilles Roudière
55010a2d9f Implement a way to dump the gdnative_interface.h file from the executable 2022-10-13 10:03:30 +02:00
Rémi Verschelde
35670c36cf Merge pull request #67300 from Mickeon/indexed-objection
Rename `set`/`get_indexed`'s "property" to "property_path"
2022-10-12 14:45:05 +02:00
Rémi Verschelde
1a660c6776 Merge pull request #67298 from Splizard/fix_unamed_args_gdextension
Fix _unnamed_arg so that arguments defined by GDExtension show up in the editor docs.
2022-10-12 14:45:00 +02:00
Micky
dc51ff8c5b Rename set/get_indexed's "property" to "property_path"
Also touches up the Documentation slightly.
2022-10-12 10:27:44 +02:00
Quentin Quaadgras
6bc16660cc Fix _unnamed_arg so that arguments defined by GDExtension show up in docs.
The Godot API (gdnative_interface.h) allows methods to be registered on
extension classes with

`classdb_register_extension_class_method`

a `GDNativeExtensionClassMethodInfo` can be provided to this function
along with a `get_argument_info_func` which according to the comment
indicates that argument names should be definable here.

Unfortunately, setting the name field in the `GDNativePropertyInfo`
struct has no effect on the editor documentation, which continues to
display "_unnamed_arg" for each argument.

I discovered that `get_argument_info` is responsible for this as it
always overrides the `info.name`. I've added an if condition that will
only override the name when it is empty. I've tested this with my
GDExtension module and I can confirm that with this commit, the argument
name shows up in the builtin docs. eg. in Lookup Symbol.
2022-10-12 21:23:34 +13:00
Rémi Verschelde
3852b5017c Merge pull request #66003 from voidshine/fix_midi_event_mutation
Fix MIDI note-on events being converted to note-off events
2022-10-12 08:55:09 +02:00
voidshine
f0f72b3132 Fix MIDI note-on events being converted to note-off events
Update documentation with note about MIDI velocity interpretation
2022-10-11 12:40:28 -07:00
Rémi Verschelde
736a2df437
Merge pull request #67244 from RandomShaper/split_render_further_2
Polish rendering driver refactor further (take 2)
2022-10-11 21:08:42 +02:00
Pedro J. Estébanez
f82deaa5b3 Polish rendering driver refactor further (take 2) 2022-10-11 19:06:55 +02:00
Rémi Verschelde
5aadc618b6 Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfo
Fetch video adapter driver name and version from OS
2022-10-11 13:59:53 +02:00
Rémi Verschelde
07b488e643 Merge pull request #67241 from groud/expose_resource_format_loader_recognize_path
Exposes ResourceFormatLoader.recognize_path to scripting
2022-10-11 13:46:24 +02:00
MJacred
de768afbdc Fetch video adapter driver name and version from OS on Linux/*BSD and Windows 2022-10-11 12:39:41 +02:00
Gilles Roudière
8aa904f56c Exposes ResourceFormatLoader.recognize_path to scripting 2022-10-11 12:35:27 +02:00
Rémi Verschelde
6e7c6e50d8 Merge pull request #67217 from touilleMan/gdextension-implement-get_documentation
Implement ScriptExtension::get_documentation
2022-10-11 09:27:58 +02:00
Rémi Verschelde
6d9d220d64 Merge pull request #67224 from Mickeon/jason
Use `JSON::stringify` where possible
2022-10-11 09:27:53 +02:00
Rémi Verschelde
4d5d33f7ff Merge pull request #67126 from Mickeon/i-was-very-bored
Strip unnecessary break on switches returning early in Variant
2022-10-11 09:27:17 +02:00
Rémi Verschelde
58eff50bf1 Merge pull request #64268 from timothyqiu/is-finite
Add `is_finite` method for checking built-in types
2022-10-11 09:25:46 +02:00
Emmanuel Leblond
13c0a60747
Implement ScriptExtension::get_documentation 2022-10-11 08:22:25 +02:00