Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_warp.c
| Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | static void copyData(const ModifierData *md, ModifierData *target, const int flag) | ||||
| const WarpModifierData *wmd = (const WarpModifierData *) md; | const WarpModifierData *wmd = (const WarpModifierData *) md; | ||||
| WarpModifierData *twmd = (WarpModifierData *) target; | WarpModifierData *twmd = (WarpModifierData *) target; | ||||
| modifier_copyData_generic(md, target, flag); | modifier_copyData_generic(md, target, flag); | ||||
| twmd->curfalloff = curvemapping_copy(wmd->curfalloff); | twmd->curfalloff = curvemapping_copy(wmd->curfalloff); | ||||
| } | } | ||||
| static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) | static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_MeshMasks *r_cddata_masks) | ||||
| { | { | ||||
| WarpModifierData *wmd = (WarpModifierData *)md; | WarpModifierData *wmd = (WarpModifierData *)md; | ||||
| CustomDataMask dataMask = 0; | |||||
| /* ask for vertexgroups if we need them */ | /* ask for vertexgroups if we need them */ | ||||
| if (wmd->defgrp_name[0]) dataMask |= (CD_MASK_MDEFORMVERT); | if (wmd->defgrp_name[0] != '\0') { | ||||
| dataMask |= (CD_MASK_MDEFORMVERT); | r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT; | ||||
| } | |||||
| /* ask for UV coordinates if we need them */ | /* ask for UV coordinates if we need them */ | ||||
| if (wmd->texmapping == MOD_DISP_MAP_UV) dataMask |= (1 << CD_MTFACE); | if (wmd->texmapping == MOD_DISP_MAP_UV) { | ||||
| r_cddata_masks->fmask |= CD_MASK_MTFACE; | |||||
| return dataMask; | } | ||||
| } | } | ||||
| static bool dependsOnTime(ModifierData *md) | static bool dependsOnTime(ModifierData *md) | ||||
| { | { | ||||
| WarpModifierData *wmd = (WarpModifierData *)md; | WarpModifierData *wmd = (WarpModifierData *)md; | ||||
| if (wmd->texture) { | if (wmd->texture) { | ||||
| return BKE_texture_dependsOnTime(wmd->texture); | return BKE_texture_dependsOnTime(wmd->texture); | ||||
| ▲ Show 20 Lines • Show All 290 Lines • Show Last 20 Lines | |||||