diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-07-31 14:46:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-07-31 14:52:42 +0300 |
commit | f7adb788287665092fa2811de2ba70341aab3294 (patch) | |
tree | ed4672f9e530066f258bbf4b7917660488d586ad /source/blender/blenkernel/intern/blendfile.c | |
parent | 07499c04f6126b325e1d6db68e430f36b514b355 (diff) |
Cleanup: remove BLO_update_defaults_userpref_blend
Merge into BKE_blendfile_userdef_from_defaults
Diffstat (limited to 'source/blender/blenkernel/intern/blendfile.c')
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 813275e097d..08630bf4e9f 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -43,15 +43,18 @@ #include "BKE_blender_version.h" #include "BKE_blendfile.h" #include "BKE_bpath.h" +#include "BKE_colorband.h" #include "BKE_context.h" #include "BKE_global.h" #include "BKE_ipo.h" +#include "BKE_keyconfig.h" #include "BKE_layer.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_report.h" #include "BKE_scene.h" #include "BKE_screen.h" +#include "BKE_studiolight.h" #include "BKE_workspace.h" #include "BLO_readfile.h" @@ -579,6 +582,32 @@ UserDef *BKE_blendfile_userdef_from_defaults(void) } } + /* default so DPI is detected automatically */ + userdef->dpi = 0; + userdef->ui_scale = 1.0f; + +#ifdef WITH_PYTHON_SECURITY + /* use alternative setting for security nuts + * otherwise we'd need to patch the binary blob - startup.blend.c */ + userdef->flag |= USER_SCRIPT_AUTOEXEC_DISABLE; +#else + userdef->flag &= ~USER_SCRIPT_AUTOEXEC_DISABLE; +#endif + + /* System-specific fonts directory. */ + BKE_appdir_font_folder_default(userdef->fontdir); + + userdef->memcachelimit = min_ii(BLI_system_memory_max_in_megabytes_int() / 2, 4096); + + /* Init weight paint range. */ + BKE_colorband_init(&userdef->coba_weight, true); + + /* Default to left click select. */ + BKE_keyconfig_pref_set_select_mouse(userdef, 0, true); + + /* Default studio light. */ + BKE_studiolight_default(userdef->light_param, userdef->light_ambient); + return userdef; } |