Modifiers: consider all constructive modifiers as 'preview' ones as well.

Indeed, constructive modifiers are highly likely to modify CDLayers like vgroups or vcols!

See vertexgroup2.blend file ({F93770}) in T40523, especially obvious with subsurf modifier.
This commit is contained in:
Bastien Montagne 2014-08-15 10:07:39 +02:00
parent ddb843a1ac
commit b22831e5ce
2 changed files with 6 additions and 5 deletions

View File

@ -2022,9 +2022,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
previewmd = modifiers_getLastPreview(scene, md, required_mode);
/* even if the modifier doesn't need the data, to make a preview it may */
if (previewmd) {
if (do_mod_wmcol) {
previewmask = CD_MASK_MDEFORMVERT;
}
previewmask = CD_MASK_MDEFORMVERT;
}
}

View File

@ -171,11 +171,14 @@ bool modifier_isPreview(ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
if (!(mti->flags & eModifierTypeFlag_UsesPreview))
/* Constructive modifiers are highly likely to also modify data like vgroups or vcol! */
if (!((mti->flags & eModifierTypeFlag_UsesPreview) || (mti->type == eModifierTypeType_Constructive))) {
return false;
}
if (md->mode & eModifierMode_Realtime)
if (md->mode & eModifierMode_Realtime) {
return true;
}
return false;
}