diff options
author | Henrik Dick <weasel> | 2020-03-29 14:51:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-29 14:52:06 +0300 |
commit | d8e2cc9f4d10478861fa4a9e9c9eb49f4ebca09f (patch) | |
tree | 19347b7e68ea8c64cbb3259fd41498b5d1d11b6c /source/blender/blenloader/intern/versioning_280.c | |
parent | a3d5b949d24b0f441926ae71be837a89e4c04ac0 (diff) |
Fix missing Surface Deform strength versioning
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index eda13dce084..50b1e385dd4 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -4852,6 +4852,18 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) wm->xr.session_settings.flag = XR_SESSION_USE_POSITION_TRACKING; } } + + /* Surface deform modifier strength*/ + if (!DNA_struct_elem_find(fd->filesdna, "SurfaceDeformModifierData", "float", "strength")) { + for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { + for (ModifierData *md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_SurfaceDeform) { + SurfaceDeformModifierData *sdmd = (SurfaceDeformModifierData *)md; + sdmd->strength = 1.0f; + } + } + } + } } /** |