diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-10 17:25:35 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-10 17:25:35 +0400 |
commit | b5e1c48ca769bd83434d3686569fa36c50dbd9cb (patch) | |
tree | 6cc8d87bd7941791cf8b4487f3c5d317886e1e56 /source/blender/blenkernel/intern/blender.c | |
parent | f40566e5a4ad1ffd522a597d13d73527f804baf5 (diff) |
startup.blend: add a function BLO_update_defaults_startup_blend to change
default settings in the startup.blend without having to actually save and embed
the file, which can be a tricky process and is problematic in branches and
patches.
This function can be emptied each time a new startup.blend is committed.
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 3fbdba351b0..5ef39e8d48e 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -462,13 +462,16 @@ int BKE_read_file(bContext *C, const char *filepath, ReportList *reports) return (bfd ? retval : BKE_READ_FILE_FAIL); } -int BKE_read_file_from_memory(bContext *C, const void *filebuf, int filelength, ReportList *reports) +int BKE_read_file_from_memory(bContext *C, const void *filebuf, int filelength, ReportList *reports, int update_defaults) { BlendFileData *bfd; bfd = BLO_read_from_memory(filebuf, filelength, reports); - if (bfd) + if (bfd) { + if (update_defaults) + BLO_update_defaults_startup_blend(bfd->main); setup_app_data(C, bfd, "<memory2>"); + } else BKE_reports_prepend(reports, "Loading failed: "); |