diff options
author | Jacques Lucke <jacques@blender.org> | 2020-03-07 21:01:23 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-03-07 21:01:23 +0300 |
commit | acc05a105338c255d4fe7e5832aa639a1127725f (patch) | |
tree | a2874f8f254f7bd4808d2157561b0bf36fab5335 | |
parent | dc3b6617bb61e54f576b28363795bafade477026 (diff) |
update surface modifier
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 9 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_surface.c | 15 |
2 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a54a5106b18..d3a73a1673f 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5397,15 +5397,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb, Object *ob) collmd->bvhtree = NULL; collmd->tri = NULL; } - else if (md->type == eModifierType_Surface) { - SurfaceModifierData *surmd = (SurfaceModifierData *)md; - - surmd->mesh = NULL; - surmd->bvhtree = NULL; - surmd->x = NULL; - surmd->v = NULL; - surmd->numverts = 0; - } else if (md->type == eModifierType_ParticleSystem) { ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md; diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c index 5ebc812ae76..8ca50daa59e 100644 --- a/source/blender/modifiers/intern/MOD_surface.c +++ b/source/blender/modifiers/intern/MOD_surface.c @@ -42,6 +42,8 @@ #include "MEM_guardedalloc.h" +#include "BLO_callback_api.h" + static void initData(ModifierData *md) { SurfaceModifierData *surmd = (SurfaceModifierData *)md; @@ -90,6 +92,17 @@ static bool dependsOnTime(ModifierData *UNUSED(md)) return true; } +static void bloRead(BloReader *UNUSED(reader), ModifierData *md) +{ + SurfaceModifierData *surmd = (SurfaceModifierData *)md; + + surmd->mesh = NULL; + surmd->bvhtree = NULL; + surmd->x = NULL; + surmd->v = NULL; + surmd->numverts = 0; +} + static void deformVerts(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, @@ -210,5 +223,5 @@ ModifierTypeInfo modifierType_Surface = { /* foreachTexLink */ NULL, /* freeRuntimeData */ NULL, /* bloWrite */ NULL, - /* bloRead */ NULL, + /* bloRead */ bloRead, }; |