diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2014-10-02 15:49:11 +0400 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2014-10-02 15:50:23 +0400 |
commit | a2aa3eb2e59d5890a4a76290f5e1799c540cb99c (patch) | |
tree | 9ea094f95175565c8209070f5ac061bd1ce76a8d /source/blender/blenloader | |
parent | 69356b0b9b89a555a7e73baf821ad0d979b864ce (diff) |
Fix for regression on bevel material: need do_version support for earlier files.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 67d51ab0493..b2a29e9d1cb 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -350,6 +350,20 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) for (br = main->brush.first; br; br = br->id.next) { br->fill_threshold = 0.2f; } + + if (!DNA_struct_elem_find(fd->filesdna, "BevelModifierData", "int", "mat")) { + Object *ob; + for (ob = main->object.first; ob; ob = ob->id.next) { + ModifierData *md; + + for (md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Bevel) { + BevelModifierData *bmd = (BevelModifierData *)md; + bmd->mat = -1; + } + } + } + } } if (!MAIN_VERSION_ATLEAST(main, 271, 6)) { |