[Bf-blender-cvs] [e917bc5ee0a] master: Fix (unreported) bad copying code in Mesh Deform modifier.

Bastien Montagne noreply at git.blender.org
Mon Jun 19 13:00:04 CEST 2017


Commit: e917bc5ee0a19ac4adc95f2009c14ca6a019cbe6
Author: Bastien Montagne
Date:   Mon Jun 19 12:55:11 2017 +0200
Branches: master
https://developer.blender.org/rBe917bc5ee0a19ac4adc95f2009c14ca6a019cbe6

Fix (unreported) bad copying code in Mesh Deform modifier.

===================================================================

M	source/blender/modifiers/intern/MOD_meshdeform.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c
index 406ce398ee0..b1938395a7b 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@ -83,7 +83,7 @@ static void copyData(ModifierData *md, ModifierData *target)
 	MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
 	MeshDeformModifierData *tmmd = (MeshDeformModifierData *) target;
 
-	*tmmd = *mmd;
+	modifier_copyData_generic(md, target);
 
 	if (mmd->bindinfluences) tmmd->bindinfluences = MEM_dupallocN(mmd->bindinfluences);
 	if (mmd->bindoffsets) tmmd->bindoffsets = MEM_dupallocN(mmd->bindoffsets);
@@ -91,8 +91,8 @@ static void copyData(ModifierData *md, ModifierData *target)
 	if (mmd->dyngrid) tmmd->dyngrid = MEM_dupallocN(mmd->dyngrid);
 	if (mmd->dyninfluences) tmmd->dyninfluences = MEM_dupallocN(mmd->dyninfluences);
 	if (mmd->dynverts) tmmd->dynverts = MEM_dupallocN(mmd->dynverts);
-	if (mmd->bindweights) tmmd->dynverts = MEM_dupallocN(mmd->bindweights);  /* deprecated */
-	if (mmd->bindcos) tmmd->dynverts = MEM_dupallocN(mmd->bindcos);  /* deprecated */
+	if (mmd->bindweights) tmmd->bindweights = MEM_dupallocN(mmd->bindweights);  /* deprecated */
+	if (mmd->bindcos) tmmd->bindcos = MEM_dupallocN(mmd->bindcos);  /* deprecated */
 }
 
 static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)




More information about the Bf-blender-cvs mailing list