svn merge -r 12419:12478 https://svn.blender.org/svnroot/bf-blender/trunk/blender...
authorDaniel Genrich <daniel.genrich@gmx.net>
Sun, 4 Nov 2007 22:20:02 +0000 (22:20 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Sun, 4 Nov 2007 22:20:02 +0000 (22:20 +0000)
1  2 
source/blender/blenkernel/intern/modifier.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/makesdna/DNA_modifier_types.h
source/blender/src/buttons_editing.c
source/blender/src/buttons_object.c
source/blender/src/transform_conversions.c
source/blender/src/transform_generics.c

index ba4cbd1b9506e0abded49a6e160611ca7e230127,43907a30ac2eccf3f5aa4911e76a8aafe16664d9..1887f95e1da44a135cfe80a50753b06bde4f31d9
@@@ -803,25 -784,15 +803,33 @@@ static void write_modifiers(WriteData *
                        HookModifierData *hmd = (HookModifierData*) md;
                        
                        writedata(wd, DATA, sizeof(int)*hmd->totindex, hmd->indexar);
 +      }
 +      else if (md->type==eModifierType_Cloth) {
 +                 int                                  n;
 +                 ClothModifierData    *clmd = (ClothModifierData *) md;
 +
 +                 if (clmd->sim_parms.cache) {
 +                        // Compute the number of vertices we're saving.
 +                         // TODO
 +                         // write_cloth_cache();
 +                        /*
 +                         // old code
 +                        n = (clmd->sim_parms.bake_end_frame - clmd->sim_parms.bake_start_frame + 1) *
 +                               clmd->sim_parms.bake_num_verts;
 +                        writedata (wd, DATA, n *  sizeof (clmd->baked_data [0]), clmd->baked_data);
 +                        printf ("write_modifiers: wrote %d elements of size %d for cloth baked data.\n",
 +                                        n, sizeof (clmd->baked_data [0]));
 +                         */
 +                 }
                }
+               else if (md->type==eModifierType_MeshDeform) {
+                       MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
+                       writedata(wd, DATA, sizeof(float)*mmd->totvert*mmd->totcagevert,
+                               mmd->bindweights);
+                       writedata(wd, DATA, sizeof(float)*3*mmd->totcagevert,
+                               mmd->bindcos);
+               }
        }
  }
  
index b25c3e7992187412fa6e708bb53c7cf4efd5474a,c8dcba4fae7a6e8238db302ee9c7ae0ecf202a72..0aa7d1d4d3d9c94db27a8bc4f49bac92e075c1a8
@@@ -30,8 -28,7 +30,9 @@@ typedef enum ModifierType 
        eModifierType_UVProject,
        eModifierType_Smooth,
        eModifierType_Cast,
-       eModifierType_Collision,
+       eModifierType_MeshDeform,
 +      eModifierType_Cloth,
++        eModifierType_Collision,      
        NUM_MODIFIER_TYPES
  } ModifierType;
  
Simple merge
Simple merge