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:
Diffstat (limited to 'source/blender/blenkernel/intern/blendfile.c')
-rw-r--r--source/blender/blenkernel/intern/blendfile.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index 8b0d3f2e92e..f625f06d4d0 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -30,6 +30,7 @@
#include "BKE_addon.h"
#include "BKE_appdir.h"
#include "BKE_blender.h"
+#include "BKE_blender_project.h"
#include "BKE_blender_version.h"
#include "BKE_blendfile.h"
#include "BKE_bpath.h"
@@ -445,6 +446,16 @@ static void setup_app_blend_file_data(bContext *C,
}
}
+static void setup_app_project_data(BlendFileData *bfd, const struct BlendFileReadParams *params)
+{
+ if (!U.experimental.use_blender_projects) {
+ return;
+ }
+ if ((params->skip_flags & BLO_READ_SKIP_DATA) == 0) {
+ BKE_project_active_load_from_path(bfd->main->filepath);
+ }
+}
+
static void handle_subversion_warning(Main *main, BlendFileReadReport *reports)
{
if (main->minversionfile > BLENDER_FILE_VERSION ||
@@ -471,6 +482,7 @@ void BKE_blendfile_read_setup_ex(bContext *C,
BLO_update_defaults_startup_blend(bfd->main, startup_app_template);
}
}
+ setup_app_project_data(bfd, params);
setup_app_blend_file_data(C, bfd, params, reports);
BLO_blendfiledata_free(bfd);
}
@@ -682,7 +694,7 @@ UserDef *BKE_blendfile_userdef_from_defaults(void)
/* Default studio light. */
BKE_studiolight_default(userdef->light_param, userdef->light_ambient);
- BKE_preferences_asset_library_default_add(userdef);
+ BKE_preferences_custom_asset_library_default_add(userdef);
return userdef;
}