Bevel Modifier: fix bug T37916, bad result after mirror modifier.

Bevel needs the vertex normals to be correct and they are not
normally recalculated after a previous modifier, like mirror.
Adding 'dependsOnNormals' -> returns true to modifier info
for Bevel fixes the problem.
This commit is contained in:
Howard Trickey 2014-02-07 10:43:28 -05:00
parent 83f66a0cd5
commit b4fb1e6d9f
Notes: blender-bot 2023-06-12 00:52:52 +02:00
Referenced by issue #37916, Mirror+Bevel modifiers produce incorrect result.
1 changed files with 6 additions and 1 deletions

View File

@ -183,6 +183,11 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *ob,
return result;
}
static bool dependsOnNormals(ModifierData *UNUSED(md))
{
return true;
}
ModifierTypeInfo modifierType_Bevel = {
/* name */ "Bevel",
/* structName */ "BevelModifierData",
@ -205,7 +210,7 @@ ModifierTypeInfo modifierType_Bevel = {
/* isDisabled */ NULL,
/* updateDepgraph */ NULL,
/* dependsOnTime */ NULL,
/* dependsOnNormals */ NULL,
/* dependsOnNormals */ dependsOnNormals,
/* foreachObjectLink */ NULL,
/* foreachIDLink */ NULL,
/* foreachTexLink */ NULL,