summaryrefslogtreecommitdiffstats
path: root/scene/resources/resource_format_text.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Enhance cache modes in resource loadingPedro J. Estébanez2024-02-261-5/+27
| | | | | | | - 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.
* Allow opening scenes with missing scene dependencykobewi2024-02-131-0/+7
|
* Ensure special characters are escaped in tscn connections and editable hintLimestaX2024-01-081-5/+5
|
* Improve error message in text resource format parserEoin O'Neill2024-01-021-1/+1
| | | | | | | 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.
* Fix file disappearing when renaming dependencieskobewi2023-12-141-2/+2
|
* Remove unnecessary assignmentsWilson E. Alvarez2023-12-131-2/+1
| | | | Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
* Assign temporary path to preloaded resourceskobewi2023-11-101-0/+2
|
* Add error checks for DirAccess creation.Saracen2023-09-261-0/+2
|
* Extract ScriptInstance to simplify includesYuri Sizov2023-09-061-0/+1
| | | | | | | | | 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.
* Fix ImageTextureLayered serialisation issues.Ithamar R. Adema2023-07-231-4/+7
|
* Fix crash when saving resources with circular referencesMaxim Kulkin2023-07-141-2/+3
| | | | | | | | 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.
* Allow change import type without restarting editorkobewi2023-07-031-1/+5
|
* Fix missing UID handling in Dependency Editorkobewi2023-06-131-2/+10
|
* Fix external resource ids lostPedro J. Estébanez2023-06-011-1/+1
|
* Avoid interaction issues between resource loading threadsPedro J. Estébanez2023-05-101-56/+27
|
* Merge pull request #70234 from Rindbee/fix-uid-lostRémi Verschelde2023-04-251-2/+12
|\ | | | | | | Fix the uid field of the tscn/res file is lost when the external dependency is updated
| * Fix the uid field of the tscn/res file is lost when the external dependency ↵Rindbee2023-01-221-2/+12
| | | | | | | | is updated
* | Fix sub-resource IDs resetting when preloadedkobewi2023-02-071-3/+5
| |
* | More codespell fixes, do more changes from previous ignore listRémi Verschelde2023-02-011-3/+3
| |
* | GDScript: Fix issues with typed arraysDmitrii Maganov2023-01-311-0/+24
|/
* Merge pull request #71687 from reduz/support-script-class-name-in-efsRémi Verschelde2023-01-211-2/+77
|\ | | | | | | Support script global resource name in EditorFileSystem
| * Support script global resource name in EditorFileSystemJuan Linietsky2023-01-211-2/+77
| | | | | | | | | | | | | | | | | | | | * 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.
* | Merge pull request #44596 from KoBeWi/🧹🧹🧹Rémi Verschelde2023-01-191-4/+0
|\ \ | |/ |/| | | Cleanup unused engine code v2
| * Cleanup unused engine code v2kobewi2023-01-191-4/+0
| |
* | Fix using Resource objects as keys in the `tres` formatLife4gal2023-01-191-0/+3
|/ | | | Fixes #57506.
* Text resource loader fixesJuan Linietsky2023-01-101-16/+13
| | | | | * 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.
* Ability to change a resource UID from APIJuan Linietsky2023-01-091-2/+60
| | | | | | | | | | * 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).
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Use buffer to speed up copying/transcribing when renaming dependenciesRindbee2022-12-131-6/+17
| | | | | 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.
* VariantParser make readahead optionallawnjelly2022-12-121-1/+2
| | | | | | 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.
* Use system fonts as fallback and improve system font handling.bruvzg2022-12-041-1/+1
| | | | | | | 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.
* Don't break parsing on missing resourceskobewi2022-11-281-3/+4
|
* Fix cyclic references in GDScript 2.0Adam Scott2022-11-181-3/+7
|
* Merge pull request #68709 from MewPurPur/instance-begone-part3Rémi Verschelde2022-11-161-2/+2
|\ | | | | | | Remove more instances of 'instance' being used as a verb
| * Remove more instances of 'instance' being used as a verbVolTer2022-11-161-2/+2
| |
* | Fixes infinite loop in ResourceFormatText when having unexpected end of fileGilles Roudière2022-11-151-0/+2
|/
* Defer clearing of ResourceUID cache and silence warningskobewi2022-10-101-0/+7
|
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-14/+14
| | | | change warnings=all to use /W4.
* Rename String `plus_file` to `path_join`Aaron Franke2022-08-291-3/+3
|
* Swap arguments of ResourceSaver.save()kobewi2022-07-291-1/+1
|
* Implement Feature Build Profilesreduz2022-07-221-12/+160
| | | | | | | | | | | | | | | | | | | | | This PR is a continuation of #50381 (which was implemented exactly a year ago!) * Add a visual interface to select which classes should not be built into Godot (well, they are built if something else uses them, but if not used the optimizer will remove them out). * Add a detection system to scan the project and figure out the actual classes used. * Added the ability for SCons to load build profiles. Obligatory Screen: A simple test with a couple of nodes in the scene resulted in a 25% reduction for the final binary size TODO: * Script languages need to implement used class detection (left for another PR). * Options to disable servers or server functionalities (like 2D or 3D physics, navigation, etc). Are missing, that should also greatly aid in reducing binary size. * Options to disable some modules would be desired. * More options to disable drivers (OpenGL, Vulkan, etc) would be desired. In general this PR is a starting point for more contributors to improve and enhance this functionality.
* Merge pull request #62185 from reduz/export-node-pointer-pathRémi Verschelde2022-06-271-2/+17
|\ | | | | Add ability to export Node pointers as NodePaths
| * Add ability to export Node pointers as NodePathsreduz2022-06-251-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | This PR implements: * A new hint: PROPERTY_HINT_NODE_TYPE for variant type OBJECT, which can take specific node types as hint string. * The editor will show it as a node path, but will set it as a pointer to a node from the current scene if you select a path. * When scene is saved, the node path is saved, then restored as a pointer. NOTE: This is a proof of concept and this approach will most likely not work. The reason if that, if the node referenced is deleted, then when trying to edit this the node will become invalid. Potential workarounds: Since this uses the Variant API, it should obtain the pointer from the Variant object ID. Yet, this would either only really work in GDScript or it would need to be implemented with workarounds in every language. Alternative ways to make this work: Nodes could export an additional property with a node path (like for which_node, it could be which_node_path). Another alternative: Path editing could happen as a hidden metadata (ignoring the pointer).
* | Merge pull request #62309 from reduz/remake-resource-thread-safetyRémi Verschelde2022-06-251-12/+10
|\ \ | |/ |/| Remake ResourceCache thread safety code and API
| * Remake resource thread safety and APIreduz2022-06-221-12/+10
| | | | | | | | | | | | | | | | * Ensures thread safety when resources are destroyed. * Simplified API by always forcing `ResourceCache::get_ref`, which needs less hacks and is fully thread safe. * Removed RWLock for resources because its not possible to use for the new logic. Should not be a problem. Supersedes #57533
* | Merge pull request #56185 from nikitalita/fix-save-as-binaryRémi Verschelde2022-06-221-11/+21
|\ \ | |/ |/| Fix ResourceLoaderText::save_as_binary()
| * Fix binsary resource exportnikitalita2022-04-131-11/+21
| |
* | Remove spaces in `SubResource()/ExtResource/Resource()` in text resourcesHugo Locurcio2022-06-191-3/+3
| | | | | | | | | | | | | | | | These spaces are not needed for the file to be successfully parsed. Other types such as Vector3 are no longer serialized with spaces after the opening parenthesis and before the closing parenthesis, so this is also more consistent.
* | Fix typos with codespellRémi Verschelde2022-05-231-1/+1
| | | | | | | | Using codespell 2.2-dev from current git.
* | Add a new HashSet templatereduz2022-05-201-2/+2
| | | | | | | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed