Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-05-01 18:33:04 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-05-01 19:02:17 +0300
commit334b55fd2e89d66023a499e1ce7f867d9789290d (patch)
tree3afcc711d6a9eeda85d9ae069ce1ac9cfc9fcb89 /source/blender/modifiers/intern/MOD_mirror.c
parent6b9f1ffe6e56ee4d55f4cde5c724c31a3a90292b (diff)
Extract common modifier parameters into ModifierEvalContext struct
The contents of the ModifierEvalContext struct are constant while iterating over the modifier stack. The struct thus should be only created once, outside any loop over the modifiers.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_mirror.c')
-rw-r--r--source/blender/modifiers/intern/MOD_mirror.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c
index ff3d16a85be..5c5b8e4f11d 100644
--- a/source/blender/modifiers/intern/MOD_mirror.c
+++ b/source/blender/modifiers/intern/MOD_mirror.c
@@ -330,14 +330,13 @@ static Mesh *mirrorModifier__doMirror(MirrorModifierData *mmd,
return result;
}
-static Mesh *applyModifier(ModifierData *md, struct Depsgraph *UNUSED(depsgraph),
- Object *ob, Mesh *mesh,
- ModifierApplyFlag UNUSED(flag))
+static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx,
+ Mesh *mesh)
{
Mesh *result;
MirrorModifierData *mmd = (MirrorModifierData *) md;
- result = mirrorModifier__doMirror(mmd, ob, mesh);
+ result = mirrorModifier__doMirror(mmd, ctx->object, mesh);
BKE_mesh_calc_normals(result);
return result;