Commit graph

147 commits

Author SHA1 Message Date
bruvzg
794920b1ff
Partially revert 96780, remove warnings from project/editor settings _get. 2024-10-04 19:13:03 +03:00
Juan
abf9d24520 Make internal unique scene resource ID deterministic
Changes the Resource::generate_scene_unique_id() to be deterministic and
seedable.

Fixes #97110
2024-09-23 15:07:00 +02:00
bruvzg
3009073b39 [Resource Loader] Do not check property type for non registered properties. 2024-09-10 11:27:16 +03:00
Thaddeus Crews
9853a69144
Implement typed dictionaries 2024-09-04 10:27:26 -05:00
lawnjelly
543ab3da11 Fix SCU global namespace conflict in resource_format_text.cpp
`FORMAT_VERSION` is used in multiple places in the codebase, and #defining it was causing conflicts.
2024-09-03 07:30:56 +01:00
Pedro J. Estébanez
c1391489e3 GDScript: Enhance handling of cyclic dependencies 2024-06-26 17:44:32 +02:00
Rémi Verschelde
76237c5f9b
Merge pull request #91488 from akien-mga/resource-format-text-remove-obsolete-binary-conversion
Remove unused code to convert text resource format to binary
2024-05-29 22:13:52 +02:00
Rémi Verschelde
c3a650ac46
Remove unused code to convert text resource format to binary
This is now handled in `ResourceSaver::save` when saving with a binary extension.
2024-05-03 01:14:40 +02:00
K. S. Ernest (iFire) Lee
f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
Haoyu Qiu
941e5c4820 Use compatible text resource format when possible 2024-04-23 12:04:44 +08:00
kobewi
445302a4b2 Improve error when scene/resource is saved with newer format 2024-04-15 12:08:35 +02:00
Rémi Verschelde
8764769ee8
Merge pull request #89186 from groud/save_byte_arrays_as_base64_encoded
Save PackedByteArrays as base64 encoded
2024-04-10 17:49:24 +02:00
A Thousand Ships
64146cb7f3
[Core] Add iteration support to Array 2024-04-10 14:49:34 +02:00
Jordyfel
82de00a174 Type of exported typed array can be external resource 2024-04-09 15:28:42 +03:00
Gilles Roudière
de5073519e Save PackedByteArrays as base64 encoded 2024-03-06 10:17:31 +01:00
Pedro J. Estébanez
5e144022e7 Enhance cache modes in resource loading
- Unify documentation, hoping to clear misconcepctions about about propagation of the cache mode across dependant loads.
- Clarify in docs that `CACHE_MODE_REPLACE` now also works on the main resource (from #87008).
- Add two recursive modes, counterparts of `CACHE_MODE_REPLACE` and `CACHE_MODE_IGNORE`, since it seems some need them (see #59669, #82830).
- Let resources, even loaded with one of the ignore-cache modes, get a path, which is useful for tools.
2024-02-26 14:59:04 +01:00
kobewi
be4cbee873 Allow opening scenes with missing scene dependency 2024-02-13 19:46:35 +01:00
LimestaX
0a32c160ac
Ensure special characters are escaped in tscn connections and editable hint 2024-01-08 11:42:30 +01:00
Eoin O'Neill
2283e072b5 Improve error message in text resource format parser
This improves the error message in our text resource parsing code to
help the user potentially fix parsing issues in case of failure. It also
helps with the debugging process of finding out which sub_resource is
causing the parser to fail with line messages.
2024-01-02 14:59:32 -08:00
kobewi
397f0b31e4 Fix file disappearing when renaming dependencies 2023-12-14 22:28:48 +01:00
Wilson E. Alvarez
80fb8db31f
Remove unnecessary assignments
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-12-13 11:06:26 -05:00
kobewi
a3627b6e37 Assign temporary path to preloaded resources 2023-11-10 00:43:30 +01:00
Saracen
3f4513d4de Add error checks for DirAccess creation. 2023-09-26 03:07:43 +01:00
Yuri Sizov
d8ff69d53c Extract ScriptInstance to simplify includes
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.

This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
Ithamar R. Adema
f37c2b5be2 Fix ImageTextureLayered serialisation issues. 2023-07-23 13:54:04 +02:00
Maxim Kulkin
058604f5b8 Fix crash when saving resources with circular references
When saving resources, marking of already seen resources was
done too late, causing infinite loop traversing referenced resources
and eventual stack overflow. The change marks traversed resource
before descending to it's children, thus when this resource is
encountered again, it is already marked as seen and traversal stops.
2023-07-14 19:20:04 +02:00
kobewi
244968c8d1 Allow change import type without restarting editor 2023-07-03 13:24:24 +02:00
kobewi
06eff95d64 Fix missing UID handling in Dependency Editor 2023-06-13 11:09:56 +02:00
Pedro J. Estébanez
4412c1d989 Fix external resource ids lost 2023-06-01 22:34:49 +02:00
Pedro J. Estébanez
8983b20ccd Avoid interaction issues between resource loading threads 2023-05-10 18:53:41 +02:00
Rémi Verschelde
bbecc8ae0d
Merge pull request #70234 from Rindbee/fix-uid-lost
Fix the uid field of the tscn/res file is lost when the external dependency is updated
2023-04-25 16:16:47 +02:00
kobewi
095c805079 Fix sub-resource IDs resetting when preloaded 2023-02-07 14:13:22 +01:00
Rémi Verschelde
e52213e2fa
More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
Dmitrii Maganov
5909f9f075 GDScript: Fix issues with typed arrays 2023-01-31 11:54:41 +02:00
Rindbee
41ac40c44c Fix the uid field of the tscn/res file is lost when the external dependency is updated 2023-01-22 09:53:46 +08:00
Rémi Verschelde
ebd0b40f6e
Merge pull request #71687 from reduz/support-script-class-name-in-efs
Support script global resource name in EditorFileSystem
2023-01-21 16:54:23 +01:00
Juan Linietsky
dddd8d43f6 Support script global resource name in EditorFileSystem
* Works for binary and text files.
* Makes EditorQuickOpen work with custom resources again.
* Information is cached and easily accessible.

Properly fixes #66179. Supersedes #66215 and supersedes #62417

**WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
2023-01-21 14:19:27 +01:00
Rémi Verschelde
4ca6a9809d
Merge pull request #44596 from KoBeWi/🧹🧹🧹
Cleanup unused engine code v2
2023-01-19 19:32:51 +01:00
kobewi
c0083e431b Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
Life4gal
d3612e039a
Fix using Resource objects as keys in the tres format
Fixes #57506.
2023-01-19 12:19:06 +01:00
Juan Linietsky
eb3fa8eaa4 Text resource loader fixes
* Moved the order of progress update to after the actual resource loading to give better % numbers.
* Fix a bug introduced by #67714, which broke cache ignoring.
2023-01-10 18:59:55 +01:00
Juan Linietsky
07a964fce3 Ability to change a resource UID from API
* Works for text, binary and imported resources
* Allows better clean up of duplicate files.

TODO (future PRs):

* Use this API for assigning new UIDs to copied files.
* Use this API for UID conflict on FS scanning (if more than one file has the same UID, the newer one(s) should get assigned a different UID).
2023-01-09 18:52:00 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rindbee
bc4b5abea8 Use buffer to speed up copying/transcribing when renaming dependencies
If the scene is more complex, you may need to copy/transcribe a
large amount of data, so use buffer to speed up this process.
2022-12-13 17:19:48 +08:00
lawnjelly
491594ef0f VariantParser make readahead optional
It turns out some areas are independently moving / reading filepointers outside of the VariantParser, which can cause the readahead caching to get out of sync.

This PR makes the VariantParser readahead to be optional to allow for these use cases.
2022-12-12 15:14:39 +00:00
bruvzg
ecec415988
Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00
kobewi
0765908868 Don't break parsing on missing resources 2022-11-28 16:19:15 +01:00
Adam Scott
5704055d30 Fix cyclic references in GDScript 2.0 2022-11-18 16:41:31 -05:00
Rémi Verschelde
6d2a7cb46d
Merge pull request #68709 from MewPurPur/instance-begone-part3
Remove more instances of 'instance' being used as a verb
2022-11-16 14:41:42 +01:00
VolTer
3b4f5f8a04 Remove more instances of 'instance' being used as a verb 2022-11-16 14:01:53 +01:00