[Bf-blender-cvs] [a634369] master: Fix T42882: Now warn user when trying to append/link from older blender files.

Bastien Montagne noreply at git.blender.org
Fri Dec 12 12:14:48 CET 2014


Commit: a6343696c1f349a75604df24d80f63278ebc19f4
Author: Bastien Montagne
Date:   Fri Dec 12 12:11:48 2014 +0100
Branches: master
https://developer.blender.org/rBa6343696c1f349a75604df24d80f63278ebc19f4

Fix T42882: Now warn user when trying to append/link from older blender files.

Since we do not make any conversion in this case, worth warning user about
potential issues!

===================================================================

M	source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 7581fde..923a71c 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2643,6 +2643,15 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
 	lib = mainl->curlib;
 	BLI_assert(lib);
 
+	if (mainl->versionfile < BLENDER_VERSION ||
+	    (mainl->versionfile == BLENDER_VERSION && mainl->subversionfile < BLENDER_SUBVERSION))
+	{
+		BKE_reportf(op->reports, RPT_WARNING,
+		            "Linking or appending from an older .blend file format (%d.%d), no conversion will be done! "
+		            "You may want to re-save your lib file with current Blender",
+		            mainl->versionfile, mainl->subversionfile);
+	}
+
 	if (totfiles == 0) {
 		BLO_library_append_named_part_ex(C, mainl, &bh, name, idcode, flag);
 	}




More information about the Bf-blender-cvs mailing list