Commit graph

269 commits

Author SHA1 Message Date
Thaddeus Crews
fdf32d1b2a
Merge pull request #108577 from YYF233333/global_class_list
Simplify `ScriptServer::get_global_class_list`
2025-09-30 11:19:10 -05:00
A Thousand Ships
bd65cfa876
Revert "Replace many uses of is_class with derives_from."
This reverts commit 78b743cf4a.
2025-09-25 13:48:53 +02:00
Lukas Tenbrink
8ef4a43ada Replace many uses of is_class with derives_from. 2025-09-23 19:59:00 +02:00
Thaddeus Crews
9b96eaaf80
Merge pull request #107989 from Jojo-1000/docs-add-required-qualifier
Documentation: Add missing required qualifier for various classes
2025-09-19 09:17:06 -05:00
Yufeng Ying
a50fc5acd8 Change ClassDB::get_class_list and related stuff. 2025-09-16 15:00:33 +08:00
Thaddeus Crews
c2202d36c1
Merge pull request #103838 from ebeem/master
Core: Fix translation remaps incorrectly falling back
2025-08-01 11:45:22 -05:00
Almarhoon Ibraheem
9add19a4ad Core: Fix translation remaps incorrectly falling back 2025-08-01 19:23:06 +03:00
Jojo-1000
ab178719d9 Mark methods for various classes as required 2025-07-30 19:24:56 +02:00
Hugo Locurcio
16d551a8dd
Improve error messages in ResourceLoader
- Remove part of the "Failed loading resource" message about opening
  the project in the editor, as it's sometimes misleading.
- Fix `(expected type: )` appearing at the end of the
  "No loader found for resource:" error message.
2025-06-13 02:00:59 +02:00
Lyuma
f948ab5366 Implement uid Resource references in VariantWriter
VariantWriter now writes the uid and the path into Resource() references.
This change will affect ConfigFile, used for .import or project settings.
2025-06-08 06:11:35 -07:00
KaiN
19a94159a2 Fix async resource loading progress on empty p_original_path 2025-06-04 15:24:39 +02:00
RedMser
a96e8ac62c Remove old path remaps system
Unused in public repositories, deprecated for over 6 years, and the
replacement system is well-tested by now.
2025-04-23 15:48:33 +02:00
Thaddeus Crews
c67b9a43e3
Merge pull request #100086 from erodozer/multipart-ext-import
Support multi dot extensions in import plugins
2025-04-10 10:18:18 -05:00
Thaddeus Crews
1cb3cfaa8e
Style: Convert namespaces to PascalCase 2025-03-23 19:10:24 -05:00
Rémi Verschelde
6ed10dee37
Merge pull request #104060 from bruvzg/resloader_ids
Fix `Invalid Task ID` errors in `ResourceLoader`.
2025-03-14 00:08:59 +01:00
Rémi Verschelde
d912dcc26c
Merge pull request #104013 from bruvzg/rload_nowait
[ResourceLoader] Do not wait for the main thread during initial reimport.
2025-03-14 00:08:53 +01:00
Pāvels Nadtočajevs
d1b63ae16c
Fix Invalid Task ID errors in ResourceLoader. 2025-03-13 08:41:53 +02:00
Yufeng Ying
bebe037abf Add ConstIterator to Dictionary. 2025-03-13 01:28:46 +08:00
Pāvels Nadtočajevs
16865b6917
[ResourceLoader] Do not wait for the main thread during initial reimport. 2025-03-12 09:18:39 +02:00
erodozer
e48fea73e6 Support multi part extensions in import plugins 2025-02-18 13:19:05 -05:00
kobewi
65509ae4ff Improve UID file creation condition 2025-02-06 17:08:00 +01:00
Tareq Anuar
9014cdb596
Fix ResourceLoader.has_cached() and ResourceLoader.get_cached_ref() not handling UIDs. 2025-01-20 20:36:23 +08:00
Thaddeus Crews
0c0c45d695
Merge pull request #99494 from RandomShaper/rerefix_res_unrecog
ResourceLoader: Report appropriate error code when no suitable loader is found
2025-01-16 17:18:03 -06:00
kobewi
9ad34ecc3e Fix UID path remap 2025-01-11 22:15:59 +01:00
Thaddeus Crews
3c304ab7cc
Merge pull request #96076 from AThousandShips/improve_null_check_core_drivers
[Core,Drivers] Improve use of `Ref.is_null/valid`
2024-12-23 11:14:58 -06:00
Rémi Verschelde
d328c00ad3
Merge pull request #99667 from RandomShaper/res_load_verb
ResourceLoader: Print load message only when actually loading
2024-12-18 09:53:06 +01:00
Pedro J. Estébanez
6740823e40 ResourceLoader: Print load message only when actually loading 2024-12-18 09:36:16 +01:00
Thaddeus Crews
a135a6478a
Merge pull request #98383 from RandomShaper/deprecate_unsafe_th_rend
Deprecate the pointless unsafe threading model for rendering
2024-12-03 14:40:56 -06:00
Pedro J. Estébanez
f79b972d0d ResourceLoader: Report appropriate error code when no suitable loader is found 2024-11-21 13:52:16 +01:00
Rémi Verschelde
219b14b905
Revert "ResourceLoader: Report error if resource type unrecognized"
This reverts commit fe21913ee8.
2024-11-20 16:50:30 +01:00
A Thousand Ships
68f638cf02
Use (r)find_char instead of (r)find for single characters 2024-11-17 10:02:18 +01:00
Pedro J. Estébanez
a46ea9d064 Deprecate the pointless unsafe threading model for rendering 2024-11-14 10:43:29 +01:00
Thaddeus Crews
c8ff788052
Merge pull request #96590 from reduz/list-directory
Provide a reliable way to see original resources in a directory
2024-11-11 14:18:28 -06:00
Juan
d57846087b
Universalize UID support in all resource types
Ensures all resource types support UIDs in a project.

This is required to fix:
* Scripts and many other resource types can't be referenced by UID and when refactored the references are lost.
* Path export properties can't use UID for unsupported types.
* Refactoring problems when files are moved outside the editor (this PR effectively fixes it).
* Editor properly refreshing paths if they changed externally while opened (as example, git update).
  This needs to be addressed in a subsequent PR, but this one effectively sets the prerequisites.

Resource types that do not support UID will get a .uid file appended to them (this includes .gd, .gdshader, .gdextension, etc. files).
2024-11-11 15:59:56 +01:00
Thaddeus Crews
155f94adc0
Merge pull request #97370 from RandomShaper/refix_rl_not_found
ResourceLoader: Report error if resource type unrecognized
2024-11-10 12:12:51 -06:00
Pedro J. Estébanez
fe21913ee8 ResourceLoader: Report error if resource type unrecognized
Co-authored-by: Summersay415 <summersay415@gmail.com>
2024-11-04 09:49:37 +01:00
A Thousand Ships
ec650a2f09
[Core,Drivers] Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-11-01 16:50:11 +01:00
A Thousand Ships
38f9769bc6
[Core] Improve error messages with vformat 2024-10-30 15:55:51 +01:00
Juan
e05d5b8813 Provide a reliable way to see original resources in a directory
When exporting a project, resources are often moved, converted or
remapped (source import files are gone, text scenes are converted to binary,
etc).

This new function allows to list a directory and obtain the actual original
resource files.

Example

```GDScript
var resources = ResourceLoader.list_directory("res://images")
print(resources)
```
Result will be something like:
```
["image1.png","image2.png","image3.png"]
```
instead of
```
["image1.png.import","image2.png.import","image3.png.import"]
```
2024-10-07 09:47:22 +02:00
Rémi Verschelde
b638967d01
Revert "Return error when no ResourceFormatLoader found."
This reverts commit 6df3621b47.

Fixes #97153.
2024-09-19 12:41:51 +02:00
Pedro J. Estébanez
e3ddf3d44a ResourceLoader: Fixup resource changed feature (no. 2) 2024-09-13 11:32:55 +02:00
Rémi Verschelde
effbc07976
Merge pull request #96617 from RandomShaper/res_loader_pending
ResourceLoader: Add last resort life-time insurance for tokens
2024-09-06 22:38:41 +02:00
Pedro J. Estébanez
97197ff5e9 ResourceLoader: Fixup resource changed feature
This is a complement to: https://github.com/godotengine/godot/pull/96593
2024-09-06 18:31:51 +02:00
Pedro J. Estébanez
ccd470d33c ResourceLoader: Add last resort life-time insurance for tokens 2024-09-06 14:00:10 +02:00
Pedro J. Estébanez
74b9c38d58 ResourceLoader: Add thread-aware resource changed mechanism 2024-09-06 08:57:09 +02:00
Pedro J. Estébanez
c450f4d667 ResourceLoader: Simplify handling of unregistered tasks 2024-09-05 09:54:03 +02:00
A Thousand Ships
e33fdb4296
Use MutexLock in more places 2024-08-29 14:12:59 +02:00
Pedro J. Estébanez
0441c67de6 ResourceLoader: Handle another case of user tokens 2024-08-28 13:53:39 +02:00
Kongfa Waroros
bfb5570c03 Fix ResourceLoader is not verbosely printing a resource path on loading 2024-08-28 03:37:51 +07:00
Rémi Verschelde
ce44c91223
Merge pull request #93739 from AThousandShips/lock_unlock
[Core] Allow locking/unlocking of `MutexLock`
2024-08-26 22:45:13 +02:00