Beispiel #1
0
/* in case UserDef was read, we re-initialize all, and do versioning */
static void wm_init_userdef(bContext *C, const bool from_memory)
{
	Main *bmain = CTX_data_main(C);

	/* versioning is here */
	UI_init_userdef();
	
	MEM_CacheLimiter_set_maximum(((size_t)U.memcachelimit) * 1024 * 1024);
	BKE_sound_init(bmain);

	/* needed so loading a file from the command line respects user-pref [#26156] */
	BKE_BIT_TEST_SET(G.fileflags, U.flag & USER_FILENOUI, G_FILE_NO_UI);

	/* set the python auto-execute setting from user prefs */
	/* enabled by default, unless explicitly enabled in the command line which overrides */
	if ((G.f & G_SCRIPT_OVERRIDE_PREF) == 0) {
		BKE_BIT_TEST_SET(G.f, (U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0, G_SCRIPT_AUTOEXEC);
	}

	/* avoid re-saving for every small change to our prefs, allow overrides */
	if (from_memory) {
		BLO_update_defaults_userpref_blend();
	}

	/* update tempdir from user preferences */
	BKE_tempdir_init(U.tempdir);

	BKE_userdef_state();
}
Beispiel #2
0
/* in case UserDef was read, we re-initialize all, and do versioning */
static void wm_init_userdef(bContext *C, const bool from_memory)
{
	/* versioning is here */
	UI_init_userdef();
	
	MEM_CacheLimiter_set_maximum(((size_t)U.memcachelimit) * 1024 * 1024);
	sound_init(CTX_data_main(C));

	/* needed so loading a file from the command line respects user-pref [#26156] */
	if (U.flag & USER_FILENOUI) G.fileflags |= G_FILE_NO_UI;
	else G.fileflags &= ~G_FILE_NO_UI;

	/* set the python auto-execute setting from user prefs */
	/* enabled by default, unless explicitly enabled in the command line which overrides */
	if ((G.f & G_SCRIPT_OVERRIDE_PREF) == 0) {
		if ((U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0) G.f |=  G_SCRIPT_AUTOEXEC;
		else G.f &= ~G_SCRIPT_AUTOEXEC;
	}

	/* avoid re-saving for every small change to our prefs, allow overrides */
	if (from_memory) {
		UI_init_userdef_factory();
	}

	/* update tempdir from user preferences */
	BLI_init_temporary_dir(U.tempdir);

	BKE_userdef_state();
}
Beispiel #3
0
/* in case UserDef was read, we re-initialize all, and do versioning */
static void wm_init_userdef()
{
	UI_init_userdef();
	MEM_CacheLimiter_set_maximum(U.memcachelimit * 1024 * 1024);
	sound_init();
}