Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_hook.c
| Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | static void copyData(const ModifierData *md, ModifierData *target, const int flag) | ||||
| modifier_copyData_generic(md, target, flag); | modifier_copyData_generic(md, target, flag); | ||||
| thmd->curfalloff = curvemapping_copy(hmd->curfalloff); | thmd->curfalloff = curvemapping_copy(hmd->curfalloff); | ||||
| thmd->indexar = MEM_dupallocN(hmd->indexar); | thmd->indexar = MEM_dupallocN(hmd->indexar); | ||||
| } | } | ||||
| static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) | static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_Masks *r_cddata_masks) | ||||
| { | { | ||||
| HookModifierData *hmd = (HookModifierData *)md; | HookModifierData *hmd = (HookModifierData *)md; | ||||
| CustomDataMask dataMask = 0; | |||||
| /* ask for vertexgroups if we need them */ | /* ask for vertexgroups if we need them */ | ||||
| if (hmd->name[0]) dataMask |= CD_MASK_MDEFORMVERT; | if (hmd->name[0] != '\0') { | ||||
| if (hmd->indexar) dataMask |= CD_MASK_ORIGINDEX; | r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT; | ||||
| } | |||||
| return dataMask; | if (hmd->indexar != NULL) { | ||||
| /* TODO check which origindex are actually needed? */ | |||||
| r_cddata_masks->vmask |= CD_MASK_ORIGINDEX; | |||||
| r_cddata_masks->emask |= CD_MASK_ORIGINDEX; | |||||
| r_cddata_masks->pmask |= CD_MASK_ORIGINDEX; | |||||
| } | |||||
| } | } | ||||
| static void freeData(ModifierData *md) | static void freeData(ModifierData *md) | ||||
| { | { | ||||
| HookModifierData *hmd = (HookModifierData *) md; | HookModifierData *hmd = (HookModifierData *) md; | ||||
| curvemapping_free(hmd->curfalloff); | curvemapping_free(hmd->curfalloff); | ||||
| ▲ Show 20 Lines • Show All 320 Lines • Show Last 20 Lines | |||||