Fix T42608: Mesh deform modifier for curve fails in render
The issue was caused by render engine duplicating the curve object because it then converts the object to mesh. The mesh deform duplication code didn't duplicate binded data, so after duplication modifier is no longer applyable. So now copyData of mesh deform would copy data needed for binding. This solves reported render bug and also solves possible frustration when duplicating an object with mesh deform in the viewport with Shift-D. Checked other modifiers and laplacian deform already was copying binded data. Didn't see other modifiers which might also need to copy extra data.
This commit is contained in:
parent
5efd2b7f36
commit
7d2590bbfa
Notes:
blender-bot
2023-02-14 09:49:29 +01:00
Referenced by issue #42608, Mesh deform modifier for curve fails in render
|
@ -84,9 +84,16 @@ static void copyData(ModifierData *md, ModifierData *target)
|
|||
MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
|
||||
MeshDeformModifierData *tmmd = (MeshDeformModifierData *) target;
|
||||
|
||||
tmmd->gridsize = mmd->gridsize;
|
||||
tmmd->flag = mmd->flag;
|
||||
tmmd->object = mmd->object;
|
||||
*tmmd = *mmd;
|
||||
|
||||
if (mmd->bindinfluences) tmmd->bindinfluences = MEM_dupallocN(mmd->bindinfluences);
|
||||
if (mmd->bindoffsets) tmmd->bindoffsets = MEM_dupallocN(mmd->bindoffsets);
|
||||
if (mmd->bindcagecos) tmmd->bindcagecos = MEM_dupallocN(mmd->bindcagecos);
|
||||
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 */
|
||||
}
|
||||
|
||||
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
||||
|
|
Loading…
Reference in New Issue