[Bf-blender-cvs] [404f9ce6ee5] asset-engine: Merge branch 'master' into asset-engine
Bastien Montagne
noreply at git.blender.org
Tue Mar 28 13:46:38 CEST 2017
Commit: 404f9ce6ee54dce50b7a21fc6515805fde28eab0
Author: Bastien Montagne
Date: Tue Mar 28 13:39:17 2017 +0200
Branches: asset-engine
https://developer.blender.org/rB404f9ce6ee54dce50b7a21fc6515805fde28eab0
Merge branch 'master' into asset-engine
===================================================================
===================================================================
diff --cc source/blender/windowmanager/intern/wm_files.c
index 06e10eac6a9,27395dbaf3e..c77def3b2ac
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@@ -712,12 -718,45 +722,48 @@@ int wm_homefile_read
}
}
- if (!from_memory) {
+ const char *app_template = NULL;
+
+ if (filepath_startup_override != NULL) {
+ /* pass */
+ }
+ else if (app_template_override) {
+ app_template = app_template_override;
+ }
+ else if (!use_factory_settings && U.app_template[0]) {
+ app_template = U.app_template;
+ }
+
+ if (app_template != NULL) {
+ BKE_appdir_app_template_id_search(app_template, app_template_system, sizeof(app_template_system));
+ BLI_path_join(app_template_config, sizeof(app_template_config), cfgdir, app_template, NULL);
+ }
+
+ /* insert template name into startup file */
+ if (app_template != NULL) {
+ /* note that the path is being set even when 'use_factory_settings == true'
+ * this is done so we can load a templates factory-settings */
+ if (!use_factory_settings) {
+ BLI_path_join(filepath_startup, sizeof(filepath_startup), app_template_config, BLENDER_STARTUP_FILE, NULL);
+ if (BLI_access(filepath_startup, R_OK) != 0) {
+ filepath_startup[0] = '\0';
+ }
+ }
+ else {
+ filepath_startup[0] = '\0';
+ }
+
+ if (filepath_startup[0] == '\0') {
+ BLI_path_join(filepath_startup, sizeof(filepath_startup), app_template_system, BLENDER_STARTUP_FILE, NULL);
+ }
+ }
+
+ if (!use_factory_settings || (filepath_startup[0] != '\0')) {
if (BLI_access(filepath_startup, R_OK) == 0) {
success = (BKE_blendfile_read(C, filepath_startup, NULL, skip_flags) != BKE_BLENDFILE_READ_FAIL);
+
+ printf("Updating assets for: %s\n", filepath_startup);
+ WM_operator_name_call(C, "WM_OT_assets_update_check", WM_OP_EXEC_DEFAULT, NULL);
}
if (BLI_listbase_is_empty(&U.themes)) {
if (G.debug & G_DEBUG)
More information about the Bf-blender-cvs
mailing list