Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_lattice.c
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
| #include "MOD_util.h" | #include "MOD_util.h" | ||||
| static void initData(ModifierData *md) | static void initData(ModifierData *md) | ||||
| { | { | ||||
| LatticeModifierData *lmd = (LatticeModifierData *) md; | LatticeModifierData *lmd = (LatticeModifierData *) md; | ||||
| lmd->strength = 1.0f; | lmd->strength = 1.0f; | ||||
| } | } | ||||
| static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) | static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_Masks *r_cddata_masks) | ||||
| { | { | ||||
| LatticeModifierData *lmd = (LatticeModifierData *)md; | LatticeModifierData *lmd = (LatticeModifierData *)md; | ||||
| CustomDataMask dataMask = 0; | |||||
| /* ask for vertexgroups if we need them */ | /* ask for vertexgroups if we need them */ | ||||
| if (lmd->name[0]) dataMask |= CD_MASK_MDEFORMVERT; | if (lmd->name[0] != '\0') { | ||||
| r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT; | |||||
| return dataMask; | } | ||||
| } | } | ||||
| static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(userRenderParams)) | static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(userRenderParams)) | ||||
| { | { | ||||
| LatticeModifierData *lmd = (LatticeModifierData *) md; | LatticeModifierData *lmd = (LatticeModifierData *) md; | ||||
| return !lmd->object; | return !lmd->object; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines | |||||