diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-03 14:12:10 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-03 14:12:10 +0400 |
commit | 9ce645e7d9697162f577f433844da7771cbea9a6 (patch) | |
tree | 4776f1a8dfb606552af3ef0f06218906d4cb0696 | |
parent | d4758badf60f70296d8e51fe1a42cc174f507024 (diff) |
Better fix for T42054 - modifiers have a callback to say whether they need normals or no.
Thanks Campbell for the headup!
-rw-r--r-- | source/blender/modifiers/intern/MOD_wireframe.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_wireframe.c b/source/blender/modifiers/intern/MOD_wireframe.c index 108eee151bd..7349ca9f9ef 100644 --- a/source/blender/modifiers/intern/MOD_wireframe.c +++ b/source/blender/modifiers/intern/MOD_wireframe.c @@ -60,7 +60,7 @@ static void copyData(ModifierData *md, ModifierData *target) static bool isDisabled(ModifierData *UNUSED(md), int UNUSED(useRenderParams)) { - return 0; + return false; } static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) @@ -75,6 +75,11 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) } +static bool dependsOnNormals(ModifierData *UNUSED(md)) +{ + return true; +} + static DerivedMesh *WireframeModifier_do( WireframeModifierData *wmd, Object *ob, DerivedMesh *dm) { DerivedMesh *result; @@ -82,8 +87,6 @@ static DerivedMesh *WireframeModifier_do( WireframeModifierData *wmd, Object *ob const int defgrp_index = defgroup_name_index(ob, wmd->defgrp_name); - DM_ensure_normals(dm); - bm = DM_to_bmesh(dm, true); BM_mesh_wireframe( @@ -137,7 +140,7 @@ ModifierTypeInfo modifierType_Wireframe = { /* isDisabled */ isDisabled, /* updateDepgraph */ NULL, /* dependsOnTime */ NULL, - /* dependsOnNormals */ NULL, + /* dependsOnNormals */ dependsOnNormals, /* foreachObjectLink */ NULL, /* foreachIDLink */ NULL, /* foreachTexLink */ NULL, |