diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-04 17:25:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-04 17:29:08 +0300 |
commit | 270fb4d82b0fc807e7ff192edd5309a359fdd0b8 (patch) | |
tree | b8c83e25431a41007428221433e2a2b0eb3beb73 | |
parent | af7606394924a5c3fc0944f618fb5ee2f643fc8a (diff) |
Preferences: use the users temp directory in background mode
This choice was made when preferences were not read in background mode,
so the temp dir needed to be initialized with something.
See bc9848f7e67c3e695403179f8bcdb78b0e5764a3.
Now preferences are always read there is no reason to ignore this
particular preference in background mode.
Anyone wanting to do background renders that ignore their preferences
can run with factory startup.
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 2 | ||||
-rw-r--r-- | source/creator/creator.c | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 69b7c7bb1e3..23571395e24 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -415,7 +415,7 @@ static void wm_init_userdef(Main *bmain) MEM_CacheLimiter_set_maximum(((size_t)U.memcachelimit) * 1024 * 1024); BKE_sound_init(bmain); - /* Update `U.tempdir` from user preferences. */ + /* Update the temporary directory from the preferences or fallback to the system default. */ BKE_tempdir_init(U.tempdir); /* Update tablet API preference. */ diff --git a/source/creator/creator.c b/source/creator/creator.c index f7b0fa3a31f..7b279edb6b0 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -458,11 +458,6 @@ int main(int argc, BLI_argsParse(ba, 3, NULL, NULL); #endif WM_init(C, argc, (const char **)argv); - - /* This is properly initialized with user-preferences, - * but this is default. - * Call after loading the #BLENDER_STARTUP_FILE so we can read #U.tempdir */ - BKE_tempdir_init(U.tempdir); } else { #ifndef WITH_PYTHON_MODULE @@ -470,9 +465,6 @@ int main(int argc, #endif WM_init(C, argc, (const char **)argv); - - /* Don't use user preferences #U.tempdir */ - BKE_tempdir_init(NULL); } #ifdef WITH_PYTHON /** |