[Bf-blender-cvs] [4d2f2a6] blender-v2.72-release: Better fix for T42054 - modifiers have a callback to say whether they need normals or no.
Bastien Montagne
noreply at git.blender.org
Fri Oct 3 15:24:59 CEST 2014
Commit: 4d2f2a65bceb0e3d8cd968d37cb051aa0c0538bf
Author: Bastien Montagne
Date: Fri Oct 3 12:12:10 2014 +0200
Branches: blender-v2.72-release
https://developer.blender.org/rB4d2f2a65bceb0e3d8cd968d37cb051aa0c0538bf
Better fix for T42054 - modifiers have a callback to say whether they need normals or no.
Thanks Campbell for the headup!
===================================================================
M source/blender/modifiers/intern/MOD_wireframe.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_wireframe.c b/source/blender/modifiers/intern/MOD_wireframe.c
index 108eee1..7349ca9 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,
More information about the Bf-blender-cvs
mailing list