From b5dbe43d3ebfdc238d56bbb71ec17735cebdc951 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 20 Sep 2018 12:04:17 +0200 Subject: Cleanup: move DerivedMesh wrappers for modifiers further down the hierarchy The main goal of this patch is to cleanup the interface of every modifier. More specifically the interface of modifiers should be DerivedMesh-free. Internally some modifiers still use DerivedMesh. However I think it is better when the wrappers are in the modifiers so that higher level functions can use the simplified interface. This patch removes the applyModifier_DM and applyModifierEM_DM functions. In a previous patch (rB3614d9d) the other functions that used DerivedMesh have been removed. Reviewers: brecht --- source/blender/modifiers/intern/MOD_multires.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_multires.c') diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 813ce830b04..826c9cbe81f 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -67,7 +67,7 @@ static void initData(ModifierData *md) mmd->quality = 3; } -static DerivedMesh *applyModifier( +static DerivedMesh *applyModifier_DM( ModifierData *md, const ModifierEvalContext *ctx, DerivedMesh *dm) { @@ -144,6 +144,8 @@ static DerivedMesh *applyModifier( return result; } +applyModifier_DM_wrapper(applyModifier, applyModifier_DM) + #ifdef WITH_OPENSUBDIV_MODIFIER /* Subdivide into fully qualified mesh. */ @@ -261,7 +263,7 @@ ModifierTypeInfo modifierType_Multires = { /* deformMatrices_DM */ NULL, /* deformVertsEM_DM */ NULL, /* deformMatricesEM_DM*/NULL, - /* applyModifier_DM */ applyModifier, + /* applyModifier_DM */ NULL, /* applyModifierEM_DM */NULL, /* deformVerts */ NULL, @@ -271,7 +273,7 @@ ModifierTypeInfo modifierType_Multires = { #ifdef WITH_OPENSUBDIV_MODIFIER /* applyModifier */ applyModifier_subdiv, #else - /* applyModifier */ NULL, + /* applyModifier */ applyModifier, #endif /* applyModifierEM */ NULL, -- cgit v1.2.3