svn merge -r 12937:13095 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / blenloader / intern / writefile.c
index 87462ad78f6c60e260c770dc25d834fd362bab5a..275e3b18c4c4dd5b1ec486f682351159be644a12 100644 (file)
@@ -107,6 +107,7 @@ Important to know is that 'streaming' has been added to files, for Blender Publi
 #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_constraint_types.h"
 #include "DNA_controller_types.h"
@@ -155,6 +156,7 @@ Important to know is that 'streaming' has been added to files, for Blender Publi
 #include "BKE_action.h"
 #include "BKE_bad_level_calls.h" // build_seqar (from WHILE_SEQ) free_oops error
 #include "BKE_blender.h"
+#include "BKE_cloth.h"
 #include "BKE_curve.h"
 #include "BKE_customdata.h"
 #include "BKE_constraint.h"
@@ -823,6 +825,11 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
                        
                        writedata(wd, DATA, sizeof(int)*hmd->totindex, hmd->indexar);
                }
+               else if(md->type==eModifierType_Cloth) {
+                       ClothModifierData *clmd = (ClothModifierData*) md;
+                       writestruct(wd, DATA, "SimulationSettings", 1, clmd->sim_parms);
+                       writestruct(wd, DATA, "CollisionSettings", 1, clmd->coll_parms);
+               } 
                else if (md->type==eModifierType_MeshDeform) {
                        MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
                        int size = mmd->dyngridsize;