Fix for recent bugfix, make old files with strand width fade 2.0 render same.

This commit is contained in:
2012-06-18 12:49:05 +00:00
parent 57b8edc9fe
commit 76f79b030f
2 changed files with 9 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 263
#define BLENDER_SUBVERSION 11
#define BLENDER_SUBVERSION 12
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0

View File

@@ -7773,6 +7773,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 12)) {
Material *ma;
for (ma = main->mat.first; ma; ma = ma->id.next)
if (ma->strand_widthfade == 2.0f)
ma->strand_widthfade = 0.0f;
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */