Commit graph

4019 commits

Author SHA1 Message Date
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Rémi Verschelde
9b7c963d19
Merge pull request #48804 from EricEzaM/scripting-multi-error-support
Added support for scripts reporting multiple errors to ScriptTextEditor
2021-06-20 00:38:49 +02:00
Rémi Verschelde
bbf6d645fb
Merge pull request #48080 from aaronfranke/real-serialization
Binary serialization for reals
2021-06-20 00:33:30 +02:00
Rémi Verschelde
4effadc0ba
Merge pull request #48696 from madmiraal/fix-48692
Fix `InputMap.action_erase_event()` failing to erase events correctly.
2021-06-20 00:29:42 +02:00
Rémi Verschelde
d88be9b70c
Merge pull request #44806 from madmiraal/consolidate_json
Consolidate JSON, JSONParseResults and JSONParser into JSON
2021-06-19 21:45:34 +02:00
Eric M
d0e78c86d7 Added support for scripts reporting multiple errors to ScriptTextEditor
Scripts can now report multiple errors to the scripting editors in the engine. UI elements were added to support multiple errors.
2021-06-19 22:20:30 +10:00
Marcel Admiraal
2bafcd3422 Consolidate JSON, JSONParseResults and JSONParser into JSON
Renames JSON.parse_string() to parse()
Renames JSON.decode_data() to stringify()
2021-06-19 08:01:40 +01:00
Hugo Locurcio
aa0976f47c
Expose OS data directory getter methods
This can be used by editor plugins and non-game applications to
store data in the correct directories according to the
XDG Base Directory specification.
2021-06-19 08:56:20 +02:00
Rémi Verschelde
a9c53fa599
Merge pull request #49287 from reduz/expose-variant-internal-binders
Make some Variant internal functions public.
2021-06-19 01:11:03 +02:00
Rémi Verschelde
92f20fd70e
Merge pull request #49659 from LightningAA/string-valid-integer-to-int 2021-06-18 16:14:14 +02:00
Rémi Verschelde
7aebb8f81c
Merge pull request #44156 from aaronfranke/quat-angle-to
Add Quaternion angle_to method
2021-06-18 12:35:58 +02:00
Rémi Verschelde
3fc39954ec
Merge pull request #49638 from aaronfranke/multiply-transforms
Allow multiplying Transforms and Basis by numbers
2021-06-18 12:35:14 +02:00
Rémi Verschelde
f6756e2bf5
Merge pull request #49698 from aaronfranke/prop-no-usage
Add PROPERTY_USAGE_NONE and use it
2021-06-18 12:28:05 +02:00
Aaron Franke
93b494d4ae
Add Quaternion angle_to method 2021-06-17 23:57:00 -04:00
Aaron Franke
29706651fe
Binary serialization for reals
Added new "encode_real" methods for handling real_t, and used them for vector types. Types are encoded based on compilation setting.

But for decoding, always check how it was encoded. This way, serialized data is cross-compatible with Godot compiled with singles and Godot compiled with doubles. At least, in theory.
2021-06-17 23:15:34 -04:00
Michael Alexsander Silva Dias
0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
Aaron Franke
8b692e8872
Add PROPERTY_USAGE_NONE and use it 2021-06-17 19:10:26 -04:00
reduz
2c81e5fa0e Make some variant internal functions public.
-Make constructors, ops and setget inline functions public
-Should help optimizing the GDScript VM
2021-06-17 19:59:28 -03:00
Lyuma
c21aa9196e Consider a thread done if current_work is null 2021-06-17 05:22:43 -07:00
Gregory Basile
8ab13f8ace Documentation search fixes
Updates rich_text_label so that the built-in documentation can be searched
Previously, it would only find the first result and would not select other results
Renames "_entered" functions to "_submitted"
2021-06-16 09:43:34 -07:00
Lightning_A
b6af2a29eb Rename is_valid_integer() to is_valid_int()
Method from `String`
2021-06-16 10:32:22 -06:00
Rémi Verschelde
badad53438
Merge pull request #49505 from underdoeg/patch-2
fix url parsing with port numbers
2021-06-16 14:20:29 +02:00
Haoyu Qiu
06c0a5f9f2 Save binary ProjectSettings key length properly 2021-06-16 16:32:03 +08:00
Aaron Franke
bd6ed3fb09
Allow multiplying Transforms and Basis by numbers 2021-06-15 22:26:29 -04:00
Rémi Verschelde
fed31b1827
Merge pull request #49616 from BastiaanOlij/more_rename_transform
Adding some more missing renames for Transform3D and Quaternion
2021-06-15 16:50:52 +02:00
Bastiaan Olij
2161fd117b
Adding some more missing renames for Transform3D and Quaternion 2021-06-15 16:01:50 +02:00
Rémi Verschelde
78a2d3a967
Merge pull request #49107 from timothyqiu/circular-structure
Fix json dump and print of circular structure
2021-06-15 15:43:55 +02:00
SpaghettiCoder01
5b81af09dc Added Input_Map entry for backspacing using Shift+Backspace 2021-06-15 04:30:49 +01:00
Haoyu Qiu
b3bd54001f Fix json dump and print of circular structure 2021-06-14 20:48:49 +08:00
jfons
3a53ae5d9f Implement visibility range and dependencies.
This commit adds the following properties to GeometryInstance3D: `visibility_range_begin`,
`visibility_range_begin_margin`, `visibility_range_end`, `visibility_range_end_margin`.

Together they define a range in which the GeometryInstance3D will be visible from the camera,
taking hysteresis into account for state changes. A begin or end value of 0 will be ignored,
so the visibility range can be open-ended in both directions.

This commit also adds the `visibility_parent` property to 'Node3D'.
Which defines the visibility parents of the node and its subtree (until
another parent is defined).

Visual instances with a visibility parent will only be visible when the parent, and all of its
ancestors recursively, are hidden because they are closer to the camera than their respective
`visibility_range_begin` thresholds.

Combining visibility ranges and visibility parents users can set-up a quick HLOD system
that shows high detail meshes when close (i.e buildings, trees) and merged low detail meshes
for far away groups (i.e. cities, woods).
2021-06-14 12:17:11 +02:00
Rémi Verschelde
600b4c9c7b
Merge pull request #34668 from aaronfranke/to-string
[Core] Reformat structure string operators
2021-06-13 11:58:24 +02:00
Rémi Verschelde
e866a53428
Merge pull request #49559 from timothyqiu/color-index
Fix crash when using invalid index in Color.get_named_color
2021-06-13 10:50:27 +02:00
Haoyu Qiu
a23610ad90 Fix crash when using invalid index in Color.get_named_color 2021-06-13 14:29:32 +08:00
Haoyu Qiu
c727d40507 Fix InputEventJoypadButton::as_text crash for invalid button index 2021-06-13 13:53:11 +08:00
Rémi Verschelde
6d98f84abb
Merge pull request #48746 from KoBeWi/bane_of_all_virtual_compatibility
Consistently prefix bound virtual methods with _
2021-06-12 23:00:40 +02:00
Rémi Verschelde
ac73059b56
Merge pull request #49123 from aaronfranke/it-is-time
Add a Time singleton
2021-06-12 22:55:25 +02:00
Rémi Verschelde
326e483ef3
VariantParser: Fix reading StringNames with '&'.
Keep support for '@' for now for compatibility.

Fixes #49535.
Fixes #49542.
2021-06-12 22:13:35 +02:00
kobewi
7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02:00
Rémi Verschelde
530e069bc3
Merge pull request #49312 from RandomShaper/reference_to_ref_count
Rename `Reference` to `RefCounted`
2021-06-11 19:46:25 +02:00
Rémi Verschelde
50d1e0ea99
Merge pull request #47835 from mortarroad/master-lossless-webp
Implement lossless WebP encoding
2021-06-11 19:34:36 +02:00
Pedro J. Estébanez
04688b92ff Rename Reference to RefCounted 2021-06-11 18:48:42 +02:00
Morris Tabor
1bc1e94208 Implement lossless WebP encoding 2021-06-11 18:46:04 +02:00
Juan Linietsky
fbb5a541ef
Merge pull request #49421 from floppyhammer/fix-vram-compressed-mipmaps
Fix mipmaps of VRAM compressed textures
2021-06-11 12:35:00 -03:00
Aaron Franke
554c776e08
Reformat structure string operators
The order of numbers is not changed except for Transform2D. All logic is done inside of their structures (and not in Variant).

For the number of decimals printed, they now use String::num_real which works best with real_t, except for Color which is fixed at 4 decimals (this is a reliable number of float digits when converting from 16-bpc so it seems like a good choice)
2021-06-11 10:53:20 -04:00
Rémi Verschelde
8d4046929c
Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-io
Core: Move DirAccess and FileAccess to `core/io`
2021-06-11 16:51:10 +02:00
Rémi Verschelde
6b0183ec89
Merge pull request #49279 from Calinou/rename-string-is-abs-path-method
Rename `String.is_abs_path()` to `String.is_absolute_path()`
2021-06-11 15:58:16 +02:00
Rémi Verschelde
6107d9e180
Merge pull request #34566 from Heikki00/34541_to_json_precision
Increased String::num default decimal precision
2021-06-11 15:56:59 +02:00
Aaron Franke
f64fea1b23
Add Time singleton 2021-06-11 09:32:39 -04:00
Rémi Verschelde
9e328bb5b7
Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
Philip Whitfield
3d9f29910c
fix url parsing with port numbers
String.get_slice_count is always at least 1 or 2 for bases with a port number.
Before this change the following URL would return ERR_INVALID_PARAMETER ```ws://127.0.0.1:8000/test```
2021-06-11 10:09:05 +02:00