forked from bartvdbraak/blender
Better fix for T42054 - modifiers have a callback to say whether they need normals or no.
Thanks Campbell for the headup!
This commit is contained in:
parent
d4758badf6
commit
9ce645e7d9
@ -60,7 +60,7 @@ static void copyData(ModifierData *md, ModifierData *target)
|
|||||||
|
|
||||||
static bool isDisabled(ModifierData *UNUSED(md), int UNUSED(useRenderParams))
|
static bool isDisabled(ModifierData *UNUSED(md), int UNUSED(useRenderParams))
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
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)
|
static DerivedMesh *WireframeModifier_do( WireframeModifierData *wmd, Object *ob, DerivedMesh *dm)
|
||||||
{
|
{
|
||||||
DerivedMesh *result;
|
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);
|
const int defgrp_index = defgroup_name_index(ob, wmd->defgrp_name);
|
||||||
|
|
||||||
DM_ensure_normals(dm);
|
|
||||||
|
|
||||||
bm = DM_to_bmesh(dm, true);
|
bm = DM_to_bmesh(dm, true);
|
||||||
|
|
||||||
BM_mesh_wireframe(
|
BM_mesh_wireframe(
|
||||||
@ -137,7 +140,7 @@ ModifierTypeInfo modifierType_Wireframe = {
|
|||||||
/* isDisabled */ isDisabled,
|
/* isDisabled */ isDisabled,
|
||||||
/* updateDepgraph */ NULL,
|
/* updateDepgraph */ NULL,
|
||||||
/* dependsOnTime */ NULL,
|
/* dependsOnTime */ NULL,
|
||||||
/* dependsOnNormals */ NULL,
|
/* dependsOnNormals */ dependsOnNormals,
|
||||||
/* foreachObjectLink */ NULL,
|
/* foreachObjectLink */ NULL,
|
||||||
/* foreachIDLink */ NULL,
|
/* foreachIDLink */ NULL,
|
||||||
/* foreachTexLink */ NULL,
|
/* foreachTexLink */ NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user