diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-05 18:02:50 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-05 18:02:50 +0300 |
commit | f0d9dbae0dae4deae84824833096c38e625073cb (patch) | |
tree | a9fa826eb5860e9b62d16c3498703bde1bb5d4aa /source/blender/blenloader/intern/readfile.c | |
parent | ce6db959c7d96792edad3a6d606e3662a4ef0798 (diff) | |
parent | 481cdb08ed6f33a09d0e6843d1024db93c301178 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenkernel/intern/blendfile.c
source/blender/blenloader/intern/readfile.h
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_260.c
source/blender/blenloader/intern/versioning_270.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/editors/render/render_shading.c
source/blender/makesrna/intern/rna_movieclip.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/voxeldata.c
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index cb80246a803..4afde29d538 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8489,11 +8489,11 @@ static BHead *read_global(BlendFileData *bfd, FileData *fd, BHead *bhead) if (bfd->filename[0] == 0) { if (fd->fileversion < 265 || (fd->fileversion == 265 && fg->subversion < 1)) if ((G.fileflags & G_FILE_RECOVER)==0) - BLI_strncpy(bfd->filename, bfd->main->name, sizeof(bfd->filename)); + BLI_strncpy(bfd->filename, BKE_main_blendfile_path(bfd->main), sizeof(bfd->filename)); /* early 2.50 version patch - filename not in FileGlobal struct at all */ if (fd->fileversion <= 250) - BLI_strncpy(bfd->filename, bfd->main->name, sizeof(bfd->filename)); + BLI_strncpy(bfd->filename, BKE_main_blendfile_path(bfd->main), sizeof(bfd->filename)); } if (G.fileflags & G_FILE_RECOVER) @@ -10319,7 +10319,7 @@ static Main *library_link_begin(Main *mainvar, FileData **fd, const char *filepa blo_split_main((*fd)->mainlist, mainvar); /* which one do we need? */ - mainl = blo_find_main(*fd, filepath, G.main->name); + mainl = blo_find_main(*fd, filepath, BKE_main_blendfile_path(mainvar)); /* needed for do_version */ mainl->versionfile = (*fd)->fileversion; @@ -10394,7 +10394,7 @@ static void library_link_end(Main *mainl, FileData **fd, const short flag, Main BLI_strncpy(curlib->name, curlib->filepath, sizeof(curlib->name)); /* uses current .blend file as reference */ - BLI_path_rel(curlib->name, G.main->name); + BLI_path_rel(curlib->name, BKE_main_blendfile_path_from_global()); } blo_join_main((*fd)->mainlist); @@ -10424,7 +10424,7 @@ static void library_link_end(Main *mainl, FileData **fd, const short flag, Main BKE_main_id_tag_all(mainvar, LIB_TAG_NEW, false); lib_verify_nodetree(mainvar, false); - fix_relpaths_library(G.main->name, mainvar); /* make all relative paths, relative to the open blend file */ + fix_relpaths_library(BKE_main_blendfile_path(mainvar), mainvar); /* make all relative paths, relative to the open blend file */ /* Give a base to loose objects and collections. * Only directly linked objects & collections are instantiated by `BLO_library_link_named_part_ex()` & co, @@ -10545,7 +10545,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) while (fd == NULL) { char newlib_path[FILE_MAX] = {0}; printf("Missing library...'\n"); - printf(" current file: %s\n", G.main->name); + printf(" current file: %s\n", BKE_main_blendfile_path_from_global()); printf(" absolute lib: %s\n", mainptr->curlib->filepath); printf(" relative lib: %s\n", mainptr->curlib->name); printf(" enter a new path:\n"); @@ -10553,7 +10553,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) if (scanf("%1023s", newlib_path) > 0) { /* Warning, keep length in sync with FILE_MAX! */ BLI_strncpy(mainptr->curlib->name, newlib_path, sizeof(mainptr->curlib->name)); BLI_strncpy(mainptr->curlib->filepath, newlib_path, sizeof(mainptr->curlib->filepath)); - BLI_cleanup_path(G.main->name, mainptr->curlib->filepath); + BLI_cleanup_path(BKE_main_blendfile_path_from_global(), mainptr->curlib->filepath); fd = blo_openblenderfile(mainptr->curlib->filepath, basefd->reports); |