Commit: bc317808d66e14eea735841c18ada8cd437c7216
Author: Jacques Lucke
Date:   Sat Mar 7 19:04:06 2020 +0100
Branches: blenloader-api
https://developer.blender.org/rBbc317808d66e14eea735841c18ada8cd437c7216

update explode modifier

===================================================================

M       source/blender/blenloader/intern/readfile.c
M       source/blender/modifiers/intern/MOD_explode.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index c1af3f930bb..e467f496e80 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5397,11 +5397,6 @@ static void direct_link_modifiers(FileData *fd, ListBase 
*lb, Object *ob)
       collmd->bvhtree = NULL;
       collmd->tri = NULL;
     }
-    else if (md->type == eModifierType_Explode) {
-      ExplodeModifierData *psmd = (ExplodeModifierData *)md;
-
-      psmd->facepa = NULL;
-    }
   }
 }
 
diff --git a/source/blender/modifiers/intern/MOD_explode.c 
b/source/blender/modifiers/intern/MOD_explode.c
index 885d2ecfd47..c7972613ae7 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -45,6 +45,8 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLO_callback_api.h"
+
 #include "MOD_modifiertypes.h"
 
 static void initData(ModifierData *md)
@@ -86,6 +88,12 @@ static void requiredDataMask(Object *UNUSED(ob),
   }
 }
 
+static void bloRead(BloReader *UNUSED(reader), ModifierData *md)
+{
+  ExplodeModifierData *psmd = (ExplodeModifierData *)md;
+  psmd->facepa = NULL;
+}
+
 static void createFacepa(ExplodeModifierData *emd, ParticleSystemModifierData 
*psmd, Mesh *mesh)
 {
   ParticleSystem *psys = psmd->psys;
@@ -1200,5 +1208,5 @@ ModifierTypeInfo modifierType_Explode = {
     /* foreachTexLink */ NULL,
     /* freeRuntimeData */ NULL,
     /* bloWrite */ NULL,
-    /* bloRead */ NULL,
+    /* bloRead */ bloRead,
 };

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to