svn merge -r 12208:12294 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / blenloader / intern / readfile.c
index 487cce9e44f68f1ddcc53e631d06845daaf7c146..83bae60df306f09f4b6fb3fd9b66523632172a94 100644 (file)
@@ -60,6 +60,7 @@
 #include "DNA_actuator_types.h"
 #include "DNA_brush_types.h"
 #include "DNA_camera_types.h"
+#include "DNA_cloth_types.h"
 #include "DNA_color_types.h"
 #include "DNA_controller_types.h"
 #include "DNA_constraint_types.h"
 
 #include "BKE_action.h"
 #include "BKE_armature.h"
+#include "BKE_cloth.h"
 #include "BKE_colortools.h"
 #include "BKE_constraint.h"
 #include "BKE_curve.h"
@@ -2873,7 +2875,20 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
                        SubsurfModifierData *smd = (SubsurfModifierData*) md;
 
                        smd->emCache = smd->mCache = 0;
-               } else if (md->type==eModifierType_Hook) {
+               } 
+               else if (md->type==eModifierType_Cloth) {
+                  ClothModifierData    *clmd = (ClothModifierData*) md;
+
+                  clmd->clothObject = NULL;
+                  clmd->sim_parms.cache = NULL;
+               
+                  if (clmd->sim_parms.cache) {
+                          // TODO 
+                         // clmd->cache = newdataadr (fd, clmd->cache);
+                         printf ("direct_link_modifiers: read cloth baked_data.\n");
+                  }
+               } 
+               else if (md->type==eModifierType_Hook) {
                        HookModifierData *hmd = (HookModifierData*) md;
 
                        hmd->indexar= newdataadr(fd, hmd->indexar);