[Bf-blender-cvs] [961ebfa] id-remap: Set a main's version to current one after do_version is done.

Bastien Montagne noreply at git.blender.org
Fri May 6 13:05:07 CEST 2016


Commit: 961ebfa8c40b990942da4595aa39b651eef3ec50
Author: Bastien Montagne
Date:   Fri May 6 13:03:31 2016 +0200
Branches: id-remap
https://developer.blender.org/rB961ebfa8c40b990942da4595aa39b651eef3ec50

Set a main's version to current one after do_version is done.

With current master this is not an issue, but with all the reload stuff,
a same main could end up going several time into 'do_version', which is absolutely
not desired (multi-allocations, repeating conversions over some values, etc.).

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

M	source/blender/blenloader/intern/readfile.c

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index adb25c7..e29f637 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -113,6 +113,7 @@
 
 #include "BKE_action.h"
 #include "BKE_armature.h"
+#include "BKE_blender_version.h"
 #include "BKE_brush.h"
 #include "BKE_cloth.h"
 #include "BKE_constraint.h"
@@ -8215,6 +8216,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
 	blo_do_versions_260(fd, lib, main);
 	blo_do_versions_270(fd, lib, main);
 
+	main->versionfile = BLENDER_VERSION;
+	main->subversionfile = BLENDER_SUBVERSION;
+
 	/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
 	/* WATCH IT 2!: Userdef struct init see do_versions_userdef() above! */




More information about the Bf-blender-cvs mailing list