diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 5 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 14 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
3 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 9daa6931282..7bfe6f0397b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4840,6 +4840,11 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) if (fd->flags & FD_FLAGS_SWITCH_ENDIAN) { BLI_endian_switch_int32_array(hmd->indexar, hmd->totindex); } + + hmd->curfalloff = newdataadr(fd, hmd->curfalloff); + if (hmd->curfalloff) { + direct_link_curvemapping(fd, hmd->curfalloff); + } } else if (md->type == eModifierType_ParticleSystem) { ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md; diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 6f33cab203e..a6320ed597b 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -519,6 +519,20 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } + if (!DNA_struct_elem_find(fd->filesdna, "HookModifierData", "char", "flag")) { + 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_Hook) { + HookModifierData *hmd = (HookModifierData *)md; + hmd->falloff_type = eHook_Falloff_InvSquare; + } + } + } + } + if (!MAIN_VERSION_ATLEAST(main, 273, 3)) { ParticleSettings *part; for (part = main->particle.first; part; part = part->id.next) { diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 1de2b6b267a..3eeb30ac5d0 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1485,6 +1485,10 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) if (md->type==eModifierType_Hook) { HookModifierData *hmd = (HookModifierData*) md; + if (hmd->curfalloff) { + write_curvemapping(wd, hmd->curfalloff); + } + writedata(wd, DATA, sizeof(int)*hmd->totindex, hmd->indexar); } else if (md->type==eModifierType_Cloth) { |