diff --git a/scripts/modules/bpy/utils/__init__.py b/scripts/modules/bpy/utils/__init__.py index 9261ce1bcf6..f345998bfad 100644 --- a/scripts/modules/bpy/utils/__init__.py +++ b/scripts/modules/bpy/utils/__init__.py @@ -739,7 +739,7 @@ def user_resource(resource_type, *, path="", create=False): """ Return a user resource path (normally from the users home directory). - :arg type: Resource type in ['DATAFILES', 'CONFIG', 'SCRIPTS', 'AUTOSAVE']. + :arg type: Resource type in ['DATAFILES', 'CONFIG', 'SCRIPTS']. :type type: string :arg path: Optional subdirectory. :type path: string diff --git a/scripts/modules/sys_info.py b/scripts/modules/sys_info.py index cd6b27acc1e..1d151fef13b 100644 --- a/scripts/modules/sys_info.py +++ b/scripts/modules/sys_info.py @@ -96,7 +96,6 @@ def write_sysinfo(filepath): output.write("datafiles: %r\n" % (bpy.utils.user_resource('DATAFILES'))) output.write("config: %r\n" % (bpy.utils.user_resource('CONFIG'))) output.write("scripts: %r\n" % (bpy.utils.user_resource('SCRIPTS'))) - output.write("autosave: %r\n" % (bpy.utils.user_resource('AUTOSAVE'))) output.write("tempdir: %r\n" % (bpy.app.tempdir)) output.write(title("FFmpeg")) diff --git a/source/blender/blenkernel/BKE_appdir.hh b/source/blender/blenkernel/BKE_appdir.hh index aee08f0a9c0..6102e56f35e 100644 --- a/source/blender/blenkernel/BKE_appdir.hh +++ b/source/blender/blenkernel/BKE_appdir.hh @@ -168,7 +168,6 @@ enum { BLENDER_USER_CONFIG = 31, BLENDER_USER_DATAFILES = 32, BLENDER_USER_SCRIPTS = 33, - BLENDER_USER_AUTOSAVE = 34, /* system */ BLENDER_SYSTEM_DATAFILES = 52, diff --git a/source/blender/blenkernel/intern/appdir.cc b/source/blender/blenkernel/intern/appdir.cc index 05364804a7d..8b57c2027f9 100644 --- a/source/blender/blenkernel/intern/appdir.cc +++ b/source/blender/blenkernel/intern/appdir.cc @@ -626,15 +626,6 @@ bool BKE_appdir_folder_id_ex(const int folder_id, } return false; - case BLENDER_USER_AUTOSAVE: - if (get_path_environment(path, path_maxncpy, subfolder, "BLENDER_USER_DATAFILES")) { - break; - } - if (get_path_user(path, path_maxncpy, "autosave", subfolder)) { - break; - } - return false; - case BLENDER_USER_CONFIG: if (get_path_environment(path, path_maxncpy, subfolder, "BLENDER_USER_CONFIG")) { break; @@ -718,14 +709,6 @@ std::optional BKE_appdir_folder_id_user_notest(const int folder_id, } get_path_user_ex(path, sizeof(path), "config", subfolder, version, check_is_dir); break; - case BLENDER_USER_AUTOSAVE: - if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_AUTOSAVE", check_is_dir)) - { - break; - } - get_path_user_ex(path, sizeof(path), "autosave", subfolder, version, check_is_dir); - break; case BLENDER_USER_SCRIPTS: if (get_path_environment_ex( path, sizeof(path), subfolder, "BLENDER_USER_SCRIPTS", check_is_dir)) @@ -748,12 +731,7 @@ std::optional BKE_appdir_folder_id_user_notest(const int folder_id, std::optional BKE_appdir_folder_id_create(const int folder_id, const char *subfolder) { /* Only for user folders. */ - if (!ELEM(folder_id, - BLENDER_USER_DATAFILES, - BLENDER_USER_CONFIG, - BLENDER_USER_SCRIPTS, - BLENDER_USER_AUTOSAVE)) - { + if (!ELEM(folder_id, BLENDER_USER_DATAFILES, BLENDER_USER_CONFIG, BLENDER_USER_SCRIPTS)) { BLI_assert_unreachable(); return std::nullopt; } diff --git a/source/blender/python/intern/bpy.cc b/source/blender/python/intern/bpy.cc index 6731827fdfa..5feb1d9b19a 100644 --- a/source/blender/python/intern/bpy.cc +++ b/source/blender/python/intern/bpy.cc @@ -223,7 +223,6 @@ static PyObject *bpy_user_resource(PyObject * /*self*/, PyObject *args, PyObject {BLENDER_USER_DATAFILES, "DATAFILES"}, {BLENDER_USER_CONFIG, "CONFIG"}, {BLENDER_USER_SCRIPTS, "SCRIPTS"}, - {BLENDER_USER_AUTOSAVE, "AUTOSAVE"}, {0, nullptr}, }; PyC_StringEnum type = {type_items}; diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index f0ff32c72fe..f18d540366a 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -2098,20 +2098,6 @@ static void wm_autosave_location(char filepath[FILE_MAX]) } const char *tempdir_base = BKE_tempdir_base(); - /* NOTE(@ideasman42): It's strange that this is only used on WIN32. - * From reading commits it seems accessing the temporary directory used to be less reliable. - * If this is still the case on WIN32 - other features such as copy-paste will also fail. - * We could support #BLENDER_USER_AUTOSAVE on all platforms or remove it entirely. */ -#ifdef WIN32 - std::optional savedir; - if (!BLI_exists(tempdir_base)) { - savedir = BKE_appdir_folder_id_create(BLENDER_USER_AUTOSAVE, nullptr); - if (savedir.has_value()) { - tempdir_base = savedir->c_str(); - } - } -#endif - BLI_path_join(filepath, FILE_MAX, tempdir_base, filename); }