Fix (unreported) bad copying code of Surface Deform modifier.
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 19 Jun 2017 12:57:40 +0000 (14:57 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 19 Jun 2017 12:57:40 +0000 (14:57 +0200)
source/blender/modifiers/intern/MOD_surfacedeform.c

index 79e3eb5f3dfacac1fc0aa35dcd25cec6fa9ac88c..b692137b604a913e008856dae502982f6ca4801d 100644 (file)
@@ -138,7 +138,9 @@ static void copyData(ModifierData *md, ModifierData *target)
        SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md;
        SurfaceDeformModifierData *tsmd = (SurfaceDeformModifierData *)target;
 
-       *tsmd = *smd;
+       freeData(target);
+
+       modifier_copyData_generic(md, target);
 
        if (smd->verts) {
                tsmd->verts = MEM_dupallocN(smd->verts);