[Bf-blender-cvs] [acc05a10533] blenloader-api: update surface modifier
Jacques Lucke
noreply at git.blender.org
Sat Mar 7 19:09:30 CET 2020
Commit: acc05a105338c255d4fe7e5832aa639a1127725f
Author: Jacques Lucke
Date: Sat Mar 7 19:01:23 2020 +0100
Branches: blenloader-api
https://developer.blender.org/rBacc05a105338c255d4fe7e5832aa639a1127725f
update surface modifier
===================================================================
M source/blender/blenloader/intern/readfile.c
M source/blender/modifiers/intern/MOD_surface.c
===================================================================
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,
};
More information about the Bf-blender-cvs
mailing list