diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-09 14:52:13 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-09 14:52:13 +0300 |
commit | 83e84b2c2c7c105074b7638af6f783603971e595 (patch) | |
tree | 423ae97ff8178dc156e331eb018b3d82c6e2f83c /source/blender/blenloader/intern/versioning_270.c | |
parent | 375d27f230e41e4bcb53183082739c580f74c709 (diff) | |
parent | ce0fcf1378b6bdd01ff8fbcbccc31b00aa263e25 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenloader/intern/versioning_270.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index bf2d5c8e326..48e91885499 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1786,6 +1786,26 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + /* Simple deform modifier no longer assumes Z axis (X for bend type). + * Must set previous defaults. */ + if (!DNA_struct_elem_find(fd->filesdna, "SimpleDeformModifierData", "char", "deform_axis")) { + for (Object *ob = main->object.first; ob; ob = ob->id.next) { + for (ModifierData *md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_SimpleDeform) { + SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md; + switch (smd->mode) { + case MOD_SIMPLEDEFORM_MODE_BEND: + smd->deform_axis = 0; + break; + default: + smd->deform_axis = 2; + break; + } + } + } + } + } } } |