summaryrefslogtreecommitdiff
path: root/editor/editor_paths.cpp
AgeCommit message (Collapse)Author
2021-06-16Main: Fixup bogus fallback to project manager with more bologneseRémi Verschelde
WARNING: Hacks everywhere! The logic in `main.cpp` is due a full rewrite as it's extremely hacky, splitting argument parsing over several functions, with a mess of global state and assumptions about what combinations of arguments or lack thereof should mean in terms of what we want to read: game, editor, project manager, or command line tools such as `--doctool`, `--export` or `--script`. Until this is fully rewritten, this patch hacks things some more to ensure that we don't fall back to the project manager in cases where it's not warranted, and especially not *too late*, as it can mean that we haven't properly initialized stuff like `EditorPaths` needed by the PM (which in turn impacts what kind of path will be used for logs and the shader cache, etc... the rabbit hole goes deep). Fixes #41435. Fixes #49392. Fixes #49658. Fixes https://github.com/godotengine/godot/issues/38202#issuecomment-773158477.
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-06-03Replace get_settings_dir with get_config_dir when fetching configuration pathsYuri Sizov
2021-05-31Implement shader cachingreduz
* Shader compilation is now cached. Subsequent loads take less than a millisecond. * Improved game, editor and project manager startup time. * Editor uses .godot/shader_cache to store shaders. * Game uses user://shader_cache * Project manager uses $config_dir/shader_cache * Options to tweak shader caching in project settings. * Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled). * Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated). * Added shader compression with SMOLV: https://github.com/aras-p/smol-v