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 bc9848f7e6.

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.
This commit is contained in:
Campbell Barton 2020-10-05 01:25:20 +11:00
parent af76063949
commit 270fb4d82b
2 changed files with 1 additions and 9 deletions

View File

@ -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. */

View File

@ -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
/**