Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_meshdeform.c
| Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | static void copyData(const ModifierData *md, ModifierData *target, const int flag) | ||||
| if (mmd->bindcagecos) tmmd->bindcagecos = MEM_dupallocN(mmd->bindcagecos); | if (mmd->bindcagecos) tmmd->bindcagecos = MEM_dupallocN(mmd->bindcagecos); | ||||
| if (mmd->dyngrid) tmmd->dyngrid = MEM_dupallocN(mmd->dyngrid); | if (mmd->dyngrid) tmmd->dyngrid = MEM_dupallocN(mmd->dyngrid); | ||||
| if (mmd->dyninfluences) tmmd->dyninfluences = MEM_dupallocN(mmd->dyninfluences); | if (mmd->dyninfluences) tmmd->dyninfluences = MEM_dupallocN(mmd->dyninfluences); | ||||
| if (mmd->dynverts) tmmd->dynverts = MEM_dupallocN(mmd->dynverts); | if (mmd->dynverts) tmmd->dynverts = MEM_dupallocN(mmd->dynverts); | ||||
| if (mmd->bindweights) tmmd->bindweights = MEM_dupallocN(mmd->bindweights); /* deprecated */ | if (mmd->bindweights) tmmd->bindweights = MEM_dupallocN(mmd->bindweights); /* deprecated */ | ||||
| if (mmd->bindcos) tmmd->bindcos = MEM_dupallocN(mmd->bindcos); /* deprecated */ | if (mmd->bindcos) tmmd->bindcos = MEM_dupallocN(mmd->bindcos); /* deprecated */ | ||||
| } | } | ||||
| static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) | static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_Masks *r_cddata_masks) | ||||
| { | { | ||||
| MeshDeformModifierData *mmd = (MeshDeformModifierData *)md; | MeshDeformModifierData *mmd = (MeshDeformModifierData *)md; | ||||
| CustomDataMask dataMask = 0; | |||||
| /* ask for vertexgroups if we need them */ | /* ask for vertexgroups if we need them */ | ||||
| if (mmd->defgrp_name[0]) dataMask |= CD_MASK_MDEFORMVERT; | if (mmd->defgrp_name[0] != '\0') { | ||||
| r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT; | |||||
| return dataMask; | } | ||||
| } | } | ||||
| static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams)) | static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams)) | ||||
| { | { | ||||
| MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; | MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; | ||||
| return !mmd->object; | return !mmd->object; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 426 Lines • Show Last 20 Lines | |||||