forked from bartvdbraak/blender
corrections to modifiers from recent normal handling changes
- solidify didn't define a dependsOnNormals callback (which it should have) - build wasn't passing on dirty normals. - decimate wasnt setting dirty normals.
This commit is contained in:
parent
e648ca8862
commit
ec30e3f00e
@ -296,6 +296,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
|
||||
MEM_freeN(edgeMap);
|
||||
MEM_freeN(faceMap);
|
||||
|
||||
if (dm->dirty & DM_DIRTY_NORMALS) {
|
||||
result->dirty |= DM_DIRTY_NORMALS;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -197,6 +197,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
TIMEIT_END(decim);
|
||||
#endif
|
||||
|
||||
result->dirty = DM_DIRTY_NORMALS;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -819,7 +819,7 @@ static DerivedMesh *applyModifier(
|
||||
MEM_freeN(old_vert_arr);
|
||||
|
||||
/* must recalculate normals with vgroups since they can displace unevenly [#26888] */
|
||||
if (dvert) {
|
||||
if ((dm->dirty & DM_DIRTY_NORMALS) || dvert) {
|
||||
result->dirty |= DM_DIRTY_NORMALS;
|
||||
}
|
||||
|
||||
@ -832,6 +832,12 @@ static DerivedMesh *applyModifier(
|
||||
|
||||
#undef SOLIDIFY_SIDE_NORMALS
|
||||
|
||||
static bool dependsOnNormals(ModifierData *md)
|
||||
{
|
||||
SolidifyModifierData *smd = (SolidifyModifierData *) md;
|
||||
|
||||
return (smd->flag & MOD_SOLIDIFY_NORMAL_CALC) == 0;
|
||||
}
|
||||
|
||||
ModifierTypeInfo modifierType_Solidify = {
|
||||
/* name */ "Solidify",
|
||||
@ -858,7 +864,7 @@ ModifierTypeInfo modifierType_Solidify = {
|
||||
/* isDisabled */ NULL,
|
||||
/* updateDepgraph */ NULL,
|
||||
/* dependsOnTime */ NULL,
|
||||
/* dependsOnNormals */ NULL,
|
||||
/* dependsOnNormals */ dependsOnNormals,
|
||||
/* foreachObjectLink */ NULL,
|
||||
/* foreachIDLink */ NULL,
|
||||
/* foreachTexLink */ NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user