diff options
author | Luca Rood <dev@lucarood.com> | 2017-03-06 08:40:29 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-03-06 09:43:26 +0300 |
commit | 355ad008a26f9605752108c74e813c43dc0659d2 (patch) | |
tree | c6abc7e2200ec0f4a1acbd9bd9cc664fc03713e0 /source/blender/blenloader/intern/versioning_270.c | |
parent | 80444effc62ac91b127cd7811f84c1689eabd7c8 (diff) |
Surface Deform Modifier: Respect object transforms at bind time
This slightly changes SDef behavior, by now respecting object transforms
at bind time, thus not requiring the objects to be aligned in their
respective local spaces, but instead using world space.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_270.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 7106cf60721..d3f33cf725f 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1598,6 +1598,17 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } FOREACH_NODETREE_END } + + if (!DNA_struct_elem_find(fd->filesdna, "SurfaceDeformModifierData", "float", "mat[4][4]")) { + 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_SurfaceDeform) { + SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md; + unit_m4(smd->mat); + } + } + } + } } } |