diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 7e2d881689c..5774dd7b1ba 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1651,7 +1651,9 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos orcodm = create_orco_dm(ob, me, NULL, CD_ORCO); nextmask &= ~CD_MASK_ORCO; - DM_set_only_copy(orcodm, nextmask | CD_MASK_ORIGINDEX); + DM_set_only_copy(orcodm, nextmask | CD_MASK_ORIGINDEX | + (mti->requiredDataMask ? + mti->requiredDataMask(ob, md) : 0)); ndm = mti->applyModifier(md, ob, orcodm, app_flags & ~MOD_APPLY_USECACHE); if (ndm) { diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 4e7653e2473..3802d532c5b 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1193,6 +1193,17 @@ static const char *layerType_getName(int type) return LAYERTYPENAMES[type]; } +void customData_mask_layers__print(CustomDataMask mask) +{ + int i; + + printf("mask=0x%lx:\n", mask); + for (i = 0; i < CD_NUMTYPES; i++) { + if (mask & CD_TYPE_AS_MASK(i)) + printf(" %s\n", layerType_getName(i)); + } +} + /********************* CustomData functions *********************/ static void customData_update_offsets(CustomData *data);