summaryrefslogtreecommitdiff
path: root/editor/editor_file_system.cpp
AgeCommit message (Collapse)Author
2021-10-11Make the project data directory customizable.ne0fhyk
2021-10-08Fix `EditorFileSystem` not checking `.gdignore` in existed directoryZae
2021-10-05Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_masterRémi Verschelde
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-30Add TextFile support across the editorPaulb23
2021-09-15Provide a getter for the project data directory.ne0fhyk
2021-09-09Replace stb_vorbis with libogg+libvorbisEllen Poe
2021-08-20Implement Extension Loaderreduz
* Extensions are now scanned and loaded on demand. * Extensions found are cached into a file that is used to load them (which is also exported). * Editor will ask to restart when an extension requires core functionality. * Editor will attempt to load extensions always before importing or loading scenes. This ensures extensions can register the relevant types.
2021-07-25Fix various typosluz paz
Follow-up typos found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-24Merge pull request #50786 from reduz/implement-resource-uidsRémi Verschelde
Implement Resource UIDs
2021-07-24Implement Resource UIDsreduz
* Most resource types now have unique identifiers. * Applies to text, binary and imported resources. * File formats reference both by text and UID (when available). UID always has priority. * Resource UIDs are 64 bits for better compatibility with the engine. * Can be represented and used textually, example `uuid://dapwmgsmnl28u`. * A special binary cache file is used and exported, containing the mappings. Example of how it looks: ```GDScript [gd_scene load_steps=2 format=3 uid="uid://dw86wq31afig2"] [ext_resource type="PackedScene" uid="uid://bt36ojelx8q6c" path="res://subscene.scn" id="1_t56hs"] ``` GDScript, shaders and other special resource files can't currently provide UIDs, but this should be doable with special keywords on the files. This will be reserved for future PRs.
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-17Remove thread-unsafe and unused late_added_files.Lyuma
_reimport_file is called from multiple threads as part of the threaded importer. Inserting to this set from a thread could hit a race condition leading to memory corruption or hangs. It seems to be unused, intentionally or unintentionally
2021-06-14Refactor editor paths validation in EditorPaths and EditorSettingsRémi Verschelde
- EditorSettings: Ensure that `create()` makes a valid singleton. Fixes #49179, fixes #49450. - EditorPaths: Cleanup code, properly set `paths_valid`. - EditorPaths: Move more paths validation (check, mkdir) from EditorSettings for a better separation of concerns. - EditorPaths: Move EditorFileSystem creation of `.godot/imported` next to other paths.
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-05-18Change EditorFileSystem and ScriptEditor file sorting order to improve ↵Georgi Genkov
consistency. Fixes #37721.
2021-05-01FileSystem: Force update when we delete a folder from the editor and ↵Mateo Kuruk Miccino
searching changes only if we change the directory successfully in the scan_fs_changes
2021-04-19Use multiple threads to import.Juan Linietsky
- For now everything imports multithreaded by default (should work I guess, let's test). - Controllable per importer Early test benchmark. 64 large textures (importing as lossless, _not_ as vram) on a mobile i7, 12 threads: Importing goes down from 46 to 7 seconds. For VRAM I will change the logic to use a compressing thread in a subsequent PR, as well as implementing Betsy.
2021-03-22Add a "keep" import mode to keep files as-is and export them.Juan Linietsky
2021-03-22Improved 3D Scene ImporterJuan Linietsky
* Added option for importers to show an Advanced settings dialog * Created advanced settings dialog for Scene Importer * Cleaned up importers (remove many old/unused options) * Added the ability to customize every node, material, mesh and animation individually * Saving to animations and meshes to files is now a manual process, making it more predictable * Added the ability for materials to be replaced by external files (or to be made external, up to you). * When doubleclicking an impoted scene in the filesystem dock, it automatically shows the import settings instead of asking to open it. WARNING: Lightmap UV unwrap is not working, it needs to be re-made.
2021-02-24Update the filtering logic to properly handle directories with `.gdignore` ↵Fredia Huya-Kouadio
files.
2021-02-18Merge pull request #45617 from RandomShaper/modernize_atomicsRémi Verschelde
Modernize atomics (and fix `volatile`)
2021-02-18Modernize atomicsPedro J. Estébanez
- Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18Reorganize Project Settingsreduz
-Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
2021-01-29Modernize ThreadPedro J. Estébanez
- Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
2021-01-10Fix file name comparison when new file is added to file systemFilip
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-16Reimplement skeletons and blend shapesreduz
Uses compute shaders, which only once, on demand, and all in parallel.
2020-12-09Cleanup unused engine codeTomasz Chabora
2020-12-02Refactored Mesh internals and formats.reduz
-Changed how mesh data is organized, hoping to make it more efficient on Vulkan and GLES. -Removed compression, it now always uses the most efficient format. -Added support for custom arrays (up to 8 custom formats) -Added support for 8 weights in skeleton data. -Added a simple optional versioning system for imported assets, to reimport if binary is newer -Fixes #43979 (I needed to test) WARNING: -NOT backwards compatible with previous 4.x-devel, will most likely never be, but it will force reimport scenes due to version change. -NOT backwards compatible with 3.x scenes, this will be eventually re-added. -Skeletons not working any longer, will fix in next PR.
2020-12-02Refactor DocData into core and editor (DocTools) partsThakee Nathees
2020-11-29Documentation generation for GDScriptThakee Nathees
- ClassDoc added to GDScript and property reflection data were extracted from parse tree - GDScript comments are collected from tokenizer for documentation and applied to the ClassDoc by the GDScript compiler - private docs were excluded (name with underscore prefix and doesn't have any doc comments) - default values (of non exported vars), arguments are extraced from the parser - Integrated with GDScript 2.0 and new enums were added. - merge conflicts fixed
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-26Improve file sortingGilles Roudière
2020-09-28Rename the ".import" folder to ".godot/imported"Aaron Franke
2020-07-10Merge pull request #40229 from ChristopheLY/atlas-auto-reimportRémi Verschelde
auto re-import atlas, fixes #40047
2020-07-10auto re-import atlas, fixes #40047Chistpohe LY
2020-07-04Fix crash on project files import in EditorFileSystemPouleyKetchoupp
Fixes #40017
2020-06-03Remove 32-bit String to_int methodAaron Franke
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-10Make file system scan more robustPedro J. Estébanez
Previously, a change was missed if it happened while the scan was in progress and already past the affected location. Also: - Consider the scan changes thread on termination, in addition to the full scan one - Add FS-reported hidden to the check for hidden by the editor file system
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal