Mesh Deform Modifier: fix problem with saving.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 25 Apr 2010 10:27:45 +0000 (10:27 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 25 Apr 2010 10:27:45 +0000 (10:27 +0000)
source/blender/blenloader/intern/writefile.c
source/blender/makesrna/intern/rna_modifier.c

index 6e86cc2..98b3300 100644 (file)
@@ -1231,8 +1231,8 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
                        MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
                        int size = mmd->dyngridsize;
 
-                       writedata(wd, DATA, sizeof(float)*mmd->totvert*mmd->totcagevert,
-                               mmd->bindweights);
+                       writestruct(wd, DATA, "MDefInfluence", mmd->totinfluence, mmd->bindinfluences);
+                       writedata(wd, DATA, sizeof(int)*(mmd->totvert+1), mmd->bindoffsets);
                        writedata(wd, DATA, sizeof(float)*3*mmd->totcagevert,
                                mmd->bindcagecos);
                        writestruct(wd, DATA, "MDefCell", size*size*size, mmd->dyngrid);
index 26ba3f0..e7218bf 100644 (file)
@@ -465,7 +465,7 @@ static void rna_ArrayModifier_curve_set(PointerRNA *ptr, PointerRNA value)
 
 static int rna_MeshDeformModifier_is_bound_get(PointerRNA *ptr)
 {
-       return (((MeshDeformModifierData*)ptr->data)->bindcos != NULL);
+       return (((MeshDeformModifierData*)ptr->data)->bindcagecos != NULL);
 }
 
 static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr)