diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-15 19:54:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-15 20:02:24 +0300 |
commit | c832354e330c575a5c450cf0febebb7cc058df87 (patch) | |
tree | ab8fa9d05934abf70b06db0839fbea425fd83264 /source/blender/blenloader/intern/readblenentry.c | |
parent | c44cdd5905d3112a46a984b8d49710fb1c1546a0 (diff) |
Load user-preferences before startup file
Internal change needed for template support.
Loading the user preferences first so it's possible
for preferences to control startup behavior.
In general it's useful to load preferences before data-files,
so we know security settings for eg.
Diffstat (limited to 'source/blender/blenloader/intern/readblenentry.c')
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index be893177b3b..73109413271 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -317,7 +317,9 @@ void BLO_blendhandle_close(BlendHandle *bh) * \param reports If the return value is NULL, errors indicating the cause of the failure. * \return The data of the file. */ -BlendFileData *BLO_read_from_file(const char *filepath, ReportList *reports) +BlendFileData *BLO_read_from_file( + const char *filepath, + ReportList *reports, eBLOReadSkip skip_flags) { BlendFileData *bfd = NULL; FileData *fd; @@ -325,6 +327,7 @@ BlendFileData *BLO_read_from_file(const char *filepath, ReportList *reports) fd = blo_openblenderfile(filepath, reports); if (fd) { fd->reports = reports; + fd->skip_flags = skip_flags; bfd = blo_read_file_internal(fd, filepath); blo_freefiledata(fd); } @@ -341,7 +344,9 @@ BlendFileData *BLO_read_from_file(const char *filepath, ReportList *reports) * \param reports If the return value is NULL, errors indicating the cause of the failure. * \return The data of the file. */ -BlendFileData *BLO_read_from_memory(const void *mem, int memsize, ReportList *reports) +BlendFileData *BLO_read_from_memory( + const void *mem, int memsize, + ReportList *reports, eBLOReadSkip skip_flags) { BlendFileData *bfd = NULL; FileData *fd; @@ -349,6 +354,7 @@ BlendFileData *BLO_read_from_memory(const void *mem, int memsize, ReportList *re fd = blo_openblendermemory(mem, memsize, reports); if (fd) { fd->reports = reports; + fd->skip_flags = skip_flags; bfd = blo_read_file_internal(fd, ""); blo_freefiledata(fd); } @@ -362,7 +368,9 @@ BlendFileData *BLO_read_from_memory(const void *mem, int memsize, ReportList *re * \param oldmain old main, from which we will keep libraries and other datablocks that should not have changed. * \param filename current file, only for retrieving library data. */ -BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFile *memfile, ReportList *reports) +BlendFileData *BLO_read_from_memfile( + Main *oldmain, const char *filename, MemFile *memfile, + ReportList *reports, eBLOReadSkip skip_flags) { BlendFileData *bfd = NULL; FileData *fd; @@ -371,6 +379,7 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFil fd = blo_openblendermemfile(memfile, reports); if (fd) { fd->reports = reports; + fd->skip_flags = skip_flags; BLI_strncpy(fd->relabase, filename, sizeof(fd->relabase)); /* clear ob->proxy_from pointers in old main */ |