Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_weightvgmix.c
| Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | static void initData(ModifierData *md) | ||||
| wmd->mix_mode = MOD_WVG_MIX_SET; | wmd->mix_mode = MOD_WVG_MIX_SET; | ||||
| wmd->mix_set = MOD_WVG_SET_AND; | wmd->mix_set = MOD_WVG_SET_AND; | ||||
| wmd->mask_constant = 1.0f; | wmd->mask_constant = 1.0f; | ||||
| wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ | wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ | ||||
| wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL; | wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL; | ||||
| } | } | ||||
| static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) | static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_MeshMasks *r_cddata_masks) | ||||
| { | { | ||||
| WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; | WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; | ||||
| CustomDataMask dataMask = 0; | |||||
| /* We need vertex groups! */ | /* We need vertex groups! */ | ||||
| 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->mask_tex_mapping == MOD_DISP_MAP_UV) | if (wmd->mask_tex_mapping == MOD_DISP_MAP_UV) { | ||||
| dataMask |= CD_MASK_MTFACE; | r_cddata_masks->fmask |= CD_MASK_MTFACE; | ||||
| } | |||||
| /* No need to ask for CD_PREVIEW_MLOOPCOL... */ | /* No need to ask for CD_PREVIEW_MLOOPCOL... */ | ||||
| return dataMask; | |||||
| } | } | ||||
| static bool dependsOnTime(ModifierData *md) | static bool dependsOnTime(ModifierData *md) | ||||
| { | { | ||||
| WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; | WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; | ||||
| if (wmd->mask_texture) | if (wmd->mask_texture) | ||||
| return BKE_texture_dependsOnTime(wmd->mask_texture); | return BKE_texture_dependsOnTime(wmd->mask_texture); | ||||
| ▲ Show 20 Lines • Show All 275 Lines • Show Last 20 Lines | |||||