summaryrefslogtreecommitdiff
path: root/editor/editor_file_system.cpp
AgeCommit message (Collapse)Author
2023-03-30Exposing more project settings for documentationNinni Pipping
(cherry picked from commit bd30847e5916f4ca8a855774cb32a160e690e71d)
2023-02-18Merge pull request #71850 from WesleyElliott/fix-custom-node-exportYuri Sizov
2023-02-13Prevent recursive importing (hack)Juan Linietsky
Prevents recursion when importing files due to the ill nature of EditorProgress. The progress dialog will have to be entirely rewritten after 4.0 is out due to it being a constant source of bugs. In the meantime, this fixes the problem. Fixes #53871. Supersedes #73159.
2023-02-09Emit reimport signal in reimport_file_with_custom_parametersSaracenOne
method to fix resources not updating when reimported from the advanced import menu.
2023-02-06Use reimport_append api for importing embedded gltf imagesLyuma
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2023-02-06Merge pull request #72455 from reduz/allow-reimport-appendingRémi Verschelde
Support reimport appending
2023-02-01Support reimport appendingJuan Linietsky
* Add API: `EditorFileSystem::reimport_append(path)`, thread safe, what can be used from importers when they generate new files within the import process. * Added a `remap.gen_param` custom value to .import files, which can be used by importers to store data needed to generate this file again or not. This API is added to allow the GLTF2 importer to properly extract png files as textures.
2023-01-31Always create global class list, even if emptyRémi Verschelde
Fixes #72451.
2023-01-31Restore script class cache if removedJuan Linietsky
I have no idea why anyone would do this, but this fixes it. Fixes #72154. Depends on #72444 being merged to function properly.
2023-01-22Merge pull request #71783 from Bartkk0/parse-check-deletedRémi Verschelde
Check if file was removed when parsing documentation
2023-01-22Use path instead of file name when updating script classesWesley Elliott
The _script_class_file_to_path contains a map of paths to classes, but when updating the script classes for new class names, the file name is used instead. This meant new classes weren't able to be used in exported variables until the project is reloaded (as the _script_class_file_to_path is initially set with the full path) Fixes #70718
2023-01-21Support script global resource name in EditorFileSystemJuan Linietsky
* 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-21Check if file was removed when parsing documentationBartkk
2023-01-19Further fixes to global script class parsingJuan Linietsky
Bugs were introduced on first parse by #71628 This should fix everything remaining. No errors of any type were observed.
2023-01-18Clean up EditorFileSystem script parsingJuan Linietsky
* Optimize only update modified/added/removed files. * Clean up documentation parsing.
2023-01-16Merge pull request #70668 from KoBeWi/never_give_upRémi Verschelde
Retry loading addons after filesystem scan
2023-01-09Ability to change a resource UID from APIJuan Linietsky
* 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-05One Copyright Update to rule them allRémi Verschelde
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".
2022-12-28Retry loading addons after filesystem scankobewi
2022-12-12Rename all gdnative occurences to gdextensionGilles Roudière
Non-exhaustive list of case-sensitive renames: GDExtension -> GDNative GDNATIVE -> GDEXTENSION gdextension -> gdnative ExtensionExtension ->Extension (for where there was GDNativeExtension) EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION) gdnlib -> gdextension gdn_interface -> gde_interface gdni -> gde_interface
2022-12-05Merge pull request #68324 from AThousandShips/group_import_uidRémi Verschelde
Fix group reimport bug
2022-11-29Merge pull request #67664 from WindyDarian/fix_dependency_importRémi Verschelde
Don't try to import unknown dependency from scan
2022-11-29Use forward-declarations in big editor classestrollodel
2022-11-27Fix group reimport bugNinni Pipping
2022-10-19Don't try to import unknown dependency from scanWindy Darian
Only import dependency we know how to import, since custom resource may have .gd in dependency list which doesn't have an importer
2022-10-18Unify usage of GLOBAL/EDITOR_GETkobewi
2022-10-10Merge pull request #67124 from KoBeWi/load_before_saveRémi Verschelde
Fallback to ResourceLoader if can't find UID
2022-10-10Defer clearing of ResourceUID cache and silence warningskobewi
2022-10-09Fallback to ResourceLoader if can't find UIDkobewi
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-09-30Fix typos with codespellRémi Verschelde
Using codespell 2.3-dev from current git. And fix typo in `methods.py` for `vsproj=yes` option (still won't work though).
2022-09-15Remove unused `abort_scan` variableAaron Franke
2022-08-29Rename String `plus_file` to `path_join`Aaron Franke
2022-08-19Add Startup benchmarking supportJuan Linietsky
This adds support for benchmarking engine startup (and editor startup if used). The goal is to use this in the benchmarking server to track improvements and changes to engine, editor, importer and scene loading startup times.
2022-07-29Move editor paths into the EditorPaths classAaron Franke
2022-07-25Remove ThreadWorkPool, replace by WorkerThreadPoolJuan Linietsky
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient. It can also be better debugged.
2022-07-20Fix FileInfo::import_valid always being set to false for TextFile in some casesMinusKube
2022-06-22Remake resource thread safety and APIreduz
* 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
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-17Bind EditorFileSystem::reimport_files and improve docsLyuma
reimport_files offers a way for scripts to modify imported resources directly. For example, images, sounds or glTF documents which are written by an external program. It is much faster than `scan`, and can allow scripts to synchronously proceed after import finishes.
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-04-12Narrow FileAccess scope to prevent deadlocks.bruvzg
2022-04-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-04-01Add Blender install autodetection and configuration.reduz
This PR is a continuation to #54886 * Changed Blender path editor setting from binary to installation. * Add a class to query whether the format is supported. * This class allows to create proper editors to configure support. **NOTE**: This PR only provides autodetection on Linux. Code needs to be added for Windows and MacOS to autodetect the Blender installation. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com> Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2022-03-27Add GDExtension support to Scriptreduz
* Ability to create script languages from GDExtension * Some additions to gdnative_extension.h to make this happen * Moved the GDExtension binder to core This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x. Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-03-12Initialize bools in the headers in editorAaron Franke
2022-03-11Convert uses of `DirAccess *` to `DirAccessRef` to prevent memleaksRémi Verschelde
`DirAccess *` needs to be deleted manually, and this is often forgotten especially when doing early returns with `ERR_FAIL_COND`. `DirAccessRef` is deleted automatically when it goes out of scope. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-02-16Port existing _notification code to use switch statements (part 1/3)jmb462
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker