Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-07-30 04:04:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-31 14:36:12 +0300
commit07499c04f6126b325e1d6db68e430f36b514b355 (patch)
tree5c07ee1906eb4b4f2d11187ea36eee742fbe25cd /source/blender/blenloader
parent86029b507194fb88a8eb9c86c83255d76adbafed (diff)
Preferences: don't store preferences in the startup
Simplify preferences by removing the ability to load them from either the startup.blend or userpref.blend. Also simplifies updating default preferences by moving them to a struct definition.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/BLO_readfile.h1
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c39
2 files changed, 2 insertions, 38 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 8769ed37d16..cc3ea3f2122 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -176,6 +176,7 @@ struct BlendThumbnail *BLO_thumbnail_from_file(const char *filepath);
/* datafiles (generated theme) */
extern const struct bTheme U_theme_default;
+extern const struct UserDef U_default;
#ifdef __cplusplus
}
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 1cbafc7a707..2a7a7eddb79 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -57,7 +57,7 @@
#include "BLO_readfile.h"
/**
- * Override values in in-memory startup.blend, avoids re-saving for small changes.
+ * Update in-memory preferences with system specific values.
*/
void BLO_update_defaults_userpref_blend(void)
{
@@ -73,54 +73,17 @@ void BLO_update_defaults_userpref_blend(void)
U.flag &= ~USER_SCRIPT_AUTOEXEC_DISABLE;
#endif
- /* Transform tweak with single click and drag. */
- U.flag |= USER_RELEASECONFIRM;
-
- U.flag &= ~(USER_DEVELOPER_UI | USER_TOOLTIPS_PYTHON);
-
- /* Clear addon preferences. */
- for (bAddon *addon = U.addons.first, *addon_next; addon != NULL; addon = addon_next) {
- addon_next = addon->next;
-
- if (addon->prop) {
- IDP_FreeProperty(addon->prop);
- addon->prop = NULL;
- }
- }
-
- /* Ignore the theme saved in the blend file,
- * instead use the theme from 'userdef_default_theme.c' */
- {
- bTheme *theme = U.themes.first;
- memcpy(theme, &U_theme_default, sizeof(bTheme));
- }
-
- /* Leave temp directory empty, will then get appropriate value per OS. */
- U.tempdir[0] = '\0';
-
/* System-specific fonts directory. */
BKE_appdir_font_folder_default(U.fontdir);
- /* Only enable tooltips translation by default,
- * without actually enabling translation itself, for now. */
- U.transopts = USER_TR_TOOLTIPS;
U.memcachelimit = min_ii(BLI_system_memory_max_in_megabytes_int() / 2, 4096);
- /* Auto perspective. */
- U.uiflag |= USER_AUTOPERSP;
-
/* Init weight paint range. */
BKE_colorband_init(&U.coba_weight, true);
- /* Default visible section. */
- U.userpref = USER_SECTION_INTERFACE;
-
/* Default to left click select. */
BKE_keyconfig_pref_set_select_mouse(&U, 0, true);
- /* Increase a little for new scrubbing area. */
- U.v2d_min_gridsize = 45;
-
/* Default studio light. */
BKE_studiolight_default(U.light_param, U.light_ambient);
}