Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_files.c
| Show First 20 Lines • Show All 838 Lines • ▼ Show 20 Lines | |||||
| * | * | ||||
| * \param filepath_startup_override: | * \param filepath_startup_override: | ||||
| * Optional path pointing to an alternative blend file (may be NULL). | * Optional path pointing to an alternative blend file (may be NULL). | ||||
| * | * | ||||
| * \param app_template_override: | * \param app_template_override: | ||||
| * Template to use instead of the template defined in user-preferences. | * Template to use instead of the template defined in user-preferences. | ||||
| * When not-null, this is written into the user preferences. | * When not-null, this is written into the user preferences. | ||||
| */ | */ | ||||
| void wm_homefile_read(bContext *C, | void wm_homefile_read(struct bContext *C, | ||||
| ReportList *reports, | ReportList *reports, | ||||
| bool use_factory_settings, | bool use_factory_settings, | ||||
| bool use_empty_data, | bool use_empty_data, | ||||
| bool use_data, | bool use_data, | ||||
| bool use_userdef, | bool use_userdef, | ||||
| const char *filepath_startup_override, | const char *filepath_startup_override, | ||||
| const char *app_template_override, | const char *app_template_override, | ||||
| bool *r_is_factory_startup) | bool *r_is_factory_startup) | ||||
| ▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | if (!use_factory_settings && BLI_exists(filepath_userdef)) { | ||||
| if (userdef != NULL) { | if (userdef != NULL) { | ||||
| /* runtime data is about to be swapped (and forgotten) */ | /* runtime data is about to be swapped (and forgotten) */ | ||||
| userdef->runtime.use_settings_from_command_line = U.runtime.use_settings_from_command_line; | userdef->runtime.use_settings_from_command_line = U.runtime.use_settings_from_command_line; | ||||
| BKE_blender_userdef_data_set_and_free(userdef); | BKE_blender_userdef_data_set_and_free(userdef); | ||||
| userdef = NULL; | userdef = NULL; | ||||
| USERPREF_restore_global_log_settings(true); | USERPREF_restore_global_log_settings(true); | ||||
| skip_flags |= BLO_READ_SKIP_USERDEF; | skip_flags |= BLO_READ_SKIP_USERDEF; | ||||
| printf("Read prefs: %s\n", filepath_userdef); | CLOG_INFO(WM_LOG_SESSION, "Read prefs: %s", filepath_userdef); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if ((app_template != NULL) && (app_template[0] != '\0')) { | if ((app_template != NULL) && (app_template[0] != '\0')) { | ||||
| if (!BKE_appdir_app_template_id_search( | if (!BKE_appdir_app_template_id_search( | ||||
| app_template, app_template_system, sizeof(app_template_system))) { | app_template, app_template_system, sizeof(app_template_system))) { | ||||
| /* Can safely continue with code below, just warn it's not found. */ | /* Can safely continue with code below, just warn it's not found. */ | ||||
| ▲ Show 20 Lines • Show All 2,343 Lines • Show Last 20 Lines | |||||