[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53084] trunk/blender/source/blender/ blenloader/intern/readfile.c: Version patch for reading old files (2. 50 and before).

Ton Roosendaal ton at blender.org
Mon Dec 17 13:35:40 CET 2012


Revision: 53084
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53084
Author:   ton
Date:     2012-12-17 12:35:39 +0000 (Mon, 17 Dec 2012)
Log Message:
-----------
Version patch for reading old files (2.50 and before).

In 2.50 a new convention was added to save the filename in the .blend itself. 
This to allow recovery of temp saves.

In current svn, it made old files open as if it was a saved home file (not
storing the name in header, or in file history).

Note: file handling for all recovery, remapping etc is in need for cleanup.

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	2012-12-17 12:33:12 UTC (rev 53083)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2012-12-17 12:35:39 UTC (rev 53084)
@@ -6608,6 +6608,10 @@
 	bfd->globalf = fg->globalf;
 	BLI_strncpy(bfd->filename, fg->filename, sizeof(bfd->filename));
 	
+	/* early 2.50 version patch - filename not in FileGlobal struct */
+	if (fd->fileversion <= 250)
+		BLI_strncpy(bfd->filename, bfd->main->name, sizeof(bfd->main->name));
+	
 	if (G.fileflags & G_FILE_RECOVER)
 		BLI_strncpy(fd->relabase, fg->filename, sizeof(fd->relabase));
 	




More information about the Bf-blender-cvs mailing list