From 4235a9ff02291194b8b089916115d093fdbaf72b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 24 Nov 2010 12:17:26 +0000 Subject: when fail to read a blend, report the filepath too, less confusing when chaining together multiple blends. --- source/blender/blenloader/intern/readfile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 1ca848c48c6..0e1bd6cc5e6 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -920,13 +920,13 @@ static FileData *blo_decode_and_check(FileData *fd, ReportList *reports) if (fd->flags & FD_FLAGS_FILE_OK) { if (!read_file_dna(fd)) { - BKE_report(reports, RPT_ERROR, "File incomplete"); + BKE_reportf(reports, RPT_ERROR, "Failed to read blend file: \"%s\", incomplete", fd->relabase); blo_freefiledata(fd); fd= NULL; } } else { - BKE_report(reports, RPT_ERROR, "File is not a Blender file"); + BKE_reportf(reports, RPT_ERROR, "Failed to read blend file: \"%s\", not a blend file", fd->relabase); blo_freefiledata(fd); fd= NULL; } @@ -5251,14 +5251,14 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main) if(newmain->curlib) { if(strcmp(newmain->curlib->filepath, lib->filepath)==0) { printf("Fixed error in file; multiple instances of lib:\n %s\n", lib->filepath); - + BKE_reportf(fd->reports, RPT_WARNING, "Library '%s', '%s' had multiple instances, save and reload!", lib->name, lib->filepath); + change_idid_adr(&fd->mainlist, fd, lib, newmain->curlib); // change_idid_adr_fd(fd, lib, newmain->curlib); BLI_remlink(&main->library, lib); MEM_freeN(lib); - - BKE_report(fd->reports, RPT_WARNING, "Library had multiple instances, save and reload!"); + return; } -- cgit v1.2.3