[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33280] trunk/blender/source/blender/ blenloader/intern/readfile.c: when fail to read a blend, report the filepath too, less confusing when chaining together multiple blends.

Campbell Barton ideasman42 at gmail.com
Wed Nov 24 13:17:27 CET 2010


Revision: 33280
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33280
Author:   campbellbarton
Date:     2010-11-24 13:17:26 +0100 (Wed, 24 Nov 2010)

Log Message:
-----------
when fail to read a blend, report the filepath too, less confusing when chaining together multiple blends.

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2010-11-24 11:37:09 UTC (rev 33279)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2010-11-24 12:17:26 UTC (rev 33280)
@@ -920,13 +920,13 @@
 
 	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,15 +5251,15 @@
 		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;
 			}
 		}





More information about the Bf-blender-cvs mailing list